规格代码相关改版

This commit is contained in:
Chopper
2021-06-23 16:46:52 +08:00
parent a5fa7cadcd
commit 7851e8af39
25 changed files with 122 additions and 879 deletions

View File

@@ -89,8 +89,8 @@ public class GoodsBuyerController {
Map<String, Object> map = goodsSkuService.getGoodsSkuDetail(goodsId, skuId);
return ResultUtil.data(map);
} catch (ServiceException se) {
log.error(se.getMsg(), se);
return ResultUtil.error(se.getResultCode().code(), se.getResultCode().message());
log.info(se.getMsg(), se);
throw se;
} catch (Exception e) {
log.error(ResultCode.GOODS_ERROR.message(), e);
return ResultUtil.error(ResultCode.GOODS_ERROR);

View File

@@ -56,7 +56,7 @@ public class CartController {
return ResultUtil.success();
} catch (ServiceException se) {
log.info(se.getMsg(), se);
return ResultUtil.error(se.getResultCode().code(), se.getResultCode().message());
throw se;
} catch (Exception e) {
log.error(ResultCode.CART_ERROR.message(), e);
throw new ServiceException(ResultCode.CART_ERROR);
@@ -161,7 +161,7 @@ public class CartController {
return ResultUtil.data(this.cartService.getCheckedTradeDTO(CartTypeEnum.valueOf(way)));
} catch (ServiceException se) {
log.error(se.getMsg(), se);
return ResultUtil.error(se.getResultCode().code(), se.getResultCode().message());
throw se;
} catch (Exception e) {
log.error(ResultCode.CART_ERROR.message(), e);
throw new ServiceException(ResultCode.CART_ERROR);
@@ -205,7 +205,7 @@ public class CartController {
return ResultUtil.success();
} catch (ServiceException se) {
log.error(se.getMsg(), se);
return ResultUtil.error(se.getResultCode().code(), se.getResultCode().message());
throw se;
} catch (Exception e) {
log.error(ResultCode.CART_ERROR.message(), e);
throw new ServiceException(ResultCode.CART_ERROR);
@@ -243,7 +243,7 @@ public class CartController {
return ResultUtil.data(this.cartService.createTrade(tradeParams));
} catch (ServiceException se) {
log.info(se.getMsg(), se);
return ResultUtil.error(se.getResultCode().code(), se.getResultCode().message());
throw se;
} catch (Exception e) {
log.error(ResultCode.ORDER_ERROR.message(), e);
throw new ServiceException(ResultCode.ORDER_ERROR);