From be7fa95113947a1a9eb81be3a697c7955cff2fc0 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 28 Apr 2021 14:29:28 +0800 Subject: [PATCH 1/4] businessCircle --- .../service/impl/AliBusinessCircleOrderServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java index 7d4515841..26a8f4cc1 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java @@ -94,9 +94,9 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder userQ.setAlipayUserId(record.getBuyerId()); AliPayCUser aliUser = aliPayCUserService.getByAliPayUserId(userQ); // WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(aliUser, aliUser.getPhone()); - WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.registerByPhone(aliUser, aliUser.getPhone()); - if(infoByPhone != null ){ - record.setCUserId(infoByPhone.getId()); +// WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.registerByPhone(aliUser, aliUser.getPhone()); + if(aliUser != null ){ + record.setCUserId(aliUser.getUserId()); }else{ logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); } From b217063a47885303aa79a16f54c82264780bf1f1 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 28 Apr 2021 14:44:25 +0800 Subject: [PATCH 2/4] businessCircle --- .../iformall/controller/callback/AliPayController.java | 1 + .../resources/mapper/AliBusinessCircleOrderMapper.xml | 8 ++++---- .../main/resources/mapper/WxThirdPartyOrdersMapper.xml | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java b/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java index a4bf0112d..7b13171cc 100644 --- a/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java +++ b/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java @@ -250,6 +250,7 @@ public class AliPayController extends BaseController { aliBusinessCircleOrder.setAmount(amount); aliBusinessCircleOrder.setPayAmount(payAmount); aliBusinessCircleOrder.setTimeEnd(endTime); + aliBusinessCircleOrder.setMallStoreId(mallStoreId); aliBusinessCircleOrder.setBuyerId(buyerId); aliBusinessCircleOrder.setMallId(mallId); diff --git a/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml b/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml index 1c4d44c30..7c08d652c 100644 --- a/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml @@ -150,12 +150,12 @@ INSERT INTO ali_business_circle_order ( `id`, `tenant_id`, `parent_tenant_id`, `notice_id`, `notice_create_time`, `notice_event_type`, - `notice_resource_type`, `summary`, `mall_id`, `mall_name`, `mall_store_id`, `buyer_id`,`time_end`, `amount`, `pay_amount`, `transaction_id`, `commit_tag`, `create_time`, `update_time`, + `notice_resource_type`, `summary`, `mall_id`, `mall_name`, `mall_store_id`, `buyer_id`,`time_end`, `amount`, `pay_amount`, `transaction_id`, `create_time`, `update_time`, `merchant_id`, `c_user_id`, `earn_points`, `is_refund` ) VALUES( #{id},#{tenantId},#{parentTenantId},#{noticeId},#{noticeCreateTime},#{noticeEventType}, - #{noticeResourceType},#{summary},#{mallId},#{mallName},#{mallStoreId},#{buyerId},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{commitTag},#{createTime},#{updateTime}, + #{noticeResourceType},#{summary},#{mallId},#{mallName},#{mallStoreId},#{buyerId},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{createTime},#{updateTime}, #{merchantId},#{cUserId},0,0 ); @@ -170,12 +170,12 @@ INSERT INTO ali_business_circle_order ( `id`, `tenant_id`, `parent_tenant_id`,`notice_id`, `notice_create_time`, `notice_event_type`, - `notice_resource_type`, `summary`,`mall_id`, `mall_name`, `mall_store_id`, `buyer_id`, `time_end`, `amount`,`pay_amount`, `transaction_id`, `commit_tag`, `create_time`, `update_time`, + `notice_resource_type`, `summary`,`mall_id`, `mall_name`, `mall_store_id`, `buyer_id`, `time_end`, `amount`,`pay_amount`, `transaction_id`, `create_time`, `update_time`, `merchant_id`, `c_user_id`, `earn_points`, `is_refund`, `refund_id`, `refund_amount` ) VALUES( #{id},#{tenantId},#{parentTenantId},#{noticeId},#{noticeCreateTime},#{noticeEventType}, - #{noticeResourceType},#{summary},#{mallId},#{mallName},#{mallStoreId},#{buyerId},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{commitTag},#{createTime},#{updateTime}, + #{noticeResourceType},#{summary},#{mallId},#{mallName},#{mallStoreId},#{buyerId},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{createTime},#{updateTime}, #{merchantId},#{cUserId},0,1,#{refundId},#{refundAmount} ); diff --git a/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml b/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml index d71df67d3..06a7ae52a 100644 --- a/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml @@ -172,12 +172,12 @@ INSERT INTO wx_third_party_orders ( `id`, `tenant_id`, `parent_tenant_id`,`source_app_id`, `source_type`, `notice_id`, `notice_create_time`, `notice_event_type`, - `notice_resource_type`, `summary`, `shop_name`, `shop_number`, `user_phone`, `user_number`,`time_end`, `amount`, `pay_amount`, `transaction_id`, `commit_tag`, `create_time`, `update_time`, + `notice_resource_type`, `summary`, `shop_name`, `shop_number`, `user_phone`, `user_number`,`time_end`, `amount`, `pay_amount`, `transaction_id`, `create_time`, `update_time`, `merchant_id`, `c_user_id`, `earn_points`, `is_refund` ) VALUES( #{id},#{tenantId},#{parentTenantId},#{sourceAppId},#{sourceType},#{noticeId},#{noticeCreateTime},#{noticeEventType}, - #{noticeResourceType},#{summary},#{shopName},#{shopNumber},#{userPhone},#{userNumber},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{commitTag},#{createTime},#{updateTime}, + #{noticeResourceType},#{summary},#{shopName},#{shopNumber},#{userPhone},#{userNumber},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{createTime},#{updateTime}, #{merchantId},#{cUserId},0,0 ); @@ -192,12 +192,12 @@ INSERT INTO wx_third_party_orders ( `id`, `tenant_id`, `parent_tenant_id`,`source_app_id`, `source_type`, `notice_id`, `notice_create_time`, `notice_event_type`, - `notice_resource_type`, `summary`,`shop_name`, `shop_number`, `user_phone`, `user_number`, `time_end`, `amount`,`pay_amount`, `transaction_id`, `commit_tag`, `create_time`, `update_time`, + `notice_resource_type`, `summary`,`shop_name`, `shop_number`, `user_phone`, `user_number`, `time_end`, `amount`,`pay_amount`, `transaction_id`, `create_time`, `update_time`, `merchant_id`, `c_user_id`, `earn_points`, `is_refund`, `refund_id`, `refund_amount` ) VALUES( #{id},#{tenantId},#{parentTenantId},#{sourceAppId},#{sourceType},#{noticeId},#{noticeCreateTime},#{noticeEventType}, - #{noticeResourceType},#{summary},#{shopName},#{shopNumber},#{userPhone},#{userNumber},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{commitTag},#{createTime},#{updateTime}, + #{noticeResourceType},#{summary},#{shopName},#{shopNumber},#{userPhone},#{userNumber},#{timeEnd},#{amount},#{payAmount},#{transactionId},#{createTime},#{updateTime}, #{merchantId},#{cUserId},0,1,#{refundId},#{refundAmount} ); From 6a61e96ef7b7ac6b72e757a9164ba347290b4283 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 28 Apr 2021 14:53:51 +0800 Subject: [PATCH 3/4] businessCircle --- .../controller/callback/AliPayController.java | 1 + .../impl/AliBusinessCircleOrderServiceImpl.java | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java b/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java index 7b13171cc..08b289153 100644 --- a/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java +++ b/mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java @@ -289,6 +289,7 @@ public class AliPayController extends BaseController { aliBusinessCircleOrder.setTransactionId(tradeNo); aliBusinessCircleOrder.setRefundAmount(refundAmount); aliBusinessCircleOrder.setTimeEnd(endTime); + aliBusinessCircleOrder.setMallStoreId(mallStoreId); aliBusinessCircleOrder.setBuyerId(buyerId); aliBusinessCircleOrder.setMallId(mallId); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java index 26a8f4cc1..3437dd9e2 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java @@ -93,10 +93,14 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder userQ.updateTenantInfo(record); userQ.setAlipayUserId(record.getBuyerId()); AliPayCUser aliUser = aliPayCUserService.getByAliPayUserId(userQ); -// WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(aliUser, aliUser.getPhone()); -// WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.registerByPhone(aliUser, aliUser.getPhone()); - if(aliUser != null ){ - record.setCUserId(aliUser.getUserId()); + if(aliUser != null){ + // WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(aliUser, aliUser.getPhone()); + WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.registerByPhone(aliUser, aliUser.getPhone()); + if(infoByPhone != null ){ + record.setCUserId(infoByPhone.getId()); + }else{ + logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); + } }else{ logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); } From 40b518e6b507267cae7bf2d9c7177302c76d4e7b Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 28 Apr 2021 15:06:49 +0800 Subject: [PATCH 4/4] businessCircle --- .../src/main/resources/mapper/AliBusinessCircleOrderMapper.xml | 2 +- .../src/main/resources/mapper/WxThirdPartyOrdersMapper.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml b/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml index 7c08d652c..81dcd1e25 100644 --- a/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/AliBusinessCircleOrderMapper.xml @@ -163,7 +163,7 @@ update ali_business_circle_order set `earn_points` = 1, `increased_points` = #{increasedPoints}, `points_update_time` = #{pointsUpdateTime}, - `is_refund_points` = 0, `update_time` = #{updateTime} + `update_time` = #{updateTime} where `id` = #{id} and `tenant_id` = #{tenantId} diff --git a/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml b/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml index 06a7ae52a..59b22deac 100644 --- a/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxThirdPartyOrdersMapper.xml @@ -185,7 +185,7 @@ update wx_third_party_orders set `earn_points` = 1, `increased_points` = #{increasedPoints}, `points_update_time` = #{pointsUpdateTime}, - `is_refund_points` = 0, `update_time` = #{updateTime} + `update_time` = #{updateTime} where `id` = #{id} and `tenant_id` = #{tenantId}