From a31bee549dc16304d85a42bb7a86f42c33f2c8f3 Mon Sep 17 00:00:00 2001 From: Jack <46790855@qq.com> Date: Sat, 18 Jan 2025 00:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=89=E5=8D=A1=E6=8B=89=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../suisung/mall/common/modules/sync/SyncApp.java | 3 --- .../pay/service/impl/PayUserPayServiceImpl.java | 3 ++- .../sync/controller/SyncThirdDataController.java | 14 +++++++------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/mall-common/src/main/java/com/suisung/mall/common/modules/sync/SyncApp.java b/mall-common/src/main/java/com/suisung/mall/common/modules/sync/SyncApp.java index a7d39508..7275bb22 100644 --- a/mall-common/src/main/java/com/suisung/mall/common/modules/sync/SyncApp.java +++ b/mall-common/src/main/java/com/suisung/mall/common/modules/sync/SyncApp.java @@ -33,9 +33,6 @@ public class SyncApp implements Serializable { @TableId(value = "id", type = IdType.AUTO) private Long id; - @ApiModelProperty(value = "app id") - private String app_id; - @ApiModelProperty(value = "app key") private String app_key; diff --git a/mall-pay/src/main/java/com/suisung/mall/pay/service/impl/PayUserPayServiceImpl.java b/mall-pay/src/main/java/com/suisung/mall/pay/service/impl/PayUserPayServiceImpl.java index 3a46ac46..252f1838 100644 --- a/mall-pay/src/main/java/com/suisung/mall/pay/service/impl/PayUserPayServiceImpl.java +++ b/mall-pay/src/main/java/com/suisung/mall/pay/service/impl/PayUserPayServiceImpl.java @@ -243,10 +243,11 @@ public class PayUserPayServiceImpl extends BaseServiceImpl trade_titles = trade_rows.stream().map(PayConsumeTrade::getTrade_title).distinct().collect(Collectors.toList()); trade_row.setTrade_title(CollUtil.join(trade_titles, ",")); - // 付款金额 + // 多条付款金额累加 BigDecimal payment_amount = trade_rows.stream().map(PayConsumeTrade::getTrade_payment_amount).reduce(BigDecimal::add).get(); trade_row.setTrade_payment_amount(payment_amount); if (payment_amount.compareTo(BigDecimal.ZERO) > 0) { + // 订单金额大于0的情况 List order_state_ids = trade_rows.stream().map(PayConsumeTrade::getOrder_state_id).distinct().collect(Collectors.toList()); if (!order_state_ids.contains(StateCode.ORDER_STATE_CANCEL)) { trade_row.setTrade_title(I18nUtil._("在线购物")); diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/SyncThirdDataController.java b/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/SyncThirdDataController.java index 2064650c..42192d57 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/SyncThirdDataController.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/SyncThirdDataController.java @@ -31,25 +31,25 @@ public class SyncThirdDataController { @ApiOperation(value = "商品分类数据同步", notes = "商品分类数据同步") @RequestMapping(value = "/goods/category", method = RequestMethod.POST) public ThirdApiRes syncGoodsCategory(HttpServletRequest request, - @RequestParam String appId, + @RequestParam String appKey, @RequestParam String sign, @RequestBody JSONArray categoryListJSON) { - return syncThirdDataService.saveOrUpdateShopBaseProductCategoryBatch(appId, sign, categoryListJSON); + return syncThirdDataService.saveOrUpdateShopBaseProductCategoryBatch(appKey, sign, categoryListJSON); } @ApiOperation(value = "商品品牌数据同步", notes = "商品品牌数据同步") @RequestMapping(value = "/goods/brand", method = RequestMethod.POST) public ThirdApiRes syncGoodsBrand(HttpServletRequest request, - @RequestParam String appId, + @RequestParam String appKey, @RequestParam String sign, @RequestBody JSONArray brandListJSON) { - return syncThirdDataService.saveOrUpdateShopBaseProductBrandBatch(appId, sign, brandListJSON); + return syncThirdDataService.saveOrUpdateShopBaseProductBrandBatch(appKey, sign, brandListJSON); } @ApiOperation(value = "商品辅助属性数据同步", notes = "商品辅助属性数据同步") @RequestMapping(value = "/goods/assist", method = RequestMethod.POST) public ThirdApiRes syncGoodsAssist(HttpServletRequest request, - @RequestParam String appId, + @RequestParam String appKey, @RequestParam String sign, @RequestBody String reqBody) { return null; @@ -58,7 +58,7 @@ public class SyncThirdDataController { @ApiOperation(value = "商品数据同步", notes = "商品数据同步") @RequestMapping(value = "/goods", method = RequestMethod.POST) public ThirdApiRes syncGoods(HttpServletRequest request, - @RequestParam String appId, + @RequestParam String appKey, @RequestParam String sign, @RequestBody String reqBody) { return null; @@ -67,7 +67,7 @@ public class SyncThirdDataController { @ApiOperation(value = "会员数据同步", notes = "会员数据同步") @RequestMapping(value = "/member", method = RequestMethod.POST) public ThirdApiRes syncMember(HttpServletRequest request, - @RequestParam String appId, + @RequestParam String appKey, @RequestParam String sign, @RequestBody List memberList) { return null;