| @@ -250,6 +250,7 @@ public class AliPayController extends BaseController { | |||||
| aliBusinessCircleOrder.setAmount(amount); | aliBusinessCircleOrder.setAmount(amount); | ||||
| aliBusinessCircleOrder.setPayAmount(payAmount); | aliBusinessCircleOrder.setPayAmount(payAmount); | ||||
| aliBusinessCircleOrder.setTimeEnd(endTime); | aliBusinessCircleOrder.setTimeEnd(endTime); | ||||
| aliBusinessCircleOrder.setMallStoreId(mallStoreId); | |||||
| aliBusinessCircleOrder.setBuyerId(buyerId); | aliBusinessCircleOrder.setBuyerId(buyerId); | ||||
| aliBusinessCircleOrder.setMallId(mallId); | aliBusinessCircleOrder.setMallId(mallId); | ||||
| @@ -288,6 +289,7 @@ public class AliPayController extends BaseController { | |||||
| aliBusinessCircleOrder.setTransactionId(tradeNo); | aliBusinessCircleOrder.setTransactionId(tradeNo); | ||||
| aliBusinessCircleOrder.setRefundAmount(refundAmount); | aliBusinessCircleOrder.setRefundAmount(refundAmount); | ||||
| aliBusinessCircleOrder.setTimeEnd(endTime); | aliBusinessCircleOrder.setTimeEnd(endTime); | ||||
| aliBusinessCircleOrder.setMallStoreId(mallStoreId); | |||||
| aliBusinessCircleOrder.setBuyerId(buyerId); | aliBusinessCircleOrder.setBuyerId(buyerId); | ||||
| aliBusinessCircleOrder.setMallId(mallId); | aliBusinessCircleOrder.setMallId(mallId); | ||||
| @@ -93,10 +93,14 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder | |||||
| userQ.updateTenantInfo(record); | userQ.updateTenantInfo(record); | ||||
| userQ.setAlipayUserId(record.getBuyerId()); | userQ.setAlipayUserId(record.getBuyerId()); | ||||
| AliPayCUser aliUser = aliPayCUserService.getByAliPayUserId(userQ); | 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()); | |||||
| 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{ | }else{ | ||||
| logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); | logger.error("--Ali商圈付款通知消息未找到会员--aliUserId="+record.getBuyerId()); | ||||
| } | } | ||||
| @@ -150,12 +150,12 @@ | |||||
| <insert id="insertNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | <insert id="insertNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | ||||
| INSERT INTO ali_business_circle_order ( | INSERT INTO ali_business_circle_order ( | ||||
| `id`, `tenant_id`, `parent_tenant_id`, `notice_id`, `notice_create_time`, `notice_event_type`, | `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` | `merchant_id`, `c_user_id`, `earn_points`, `is_refund` | ||||
| ) | ) | ||||
| VALUES( | VALUES( | ||||
| #{id},#{tenantId},#{parentTenantId},#{noticeId},#{noticeCreateTime},#{noticeEventType}, | #{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 | #{merchantId},#{cUserId},0,0 | ||||
| ); | ); | ||||
| </insert> | </insert> | ||||
| @@ -163,19 +163,19 @@ | |||||
| <update id="updatePoints" parameterType="com.iformall.domain.po.WxThirdPartyOrders"> | <update id="updatePoints" parameterType="com.iformall.domain.po.WxThirdPartyOrders"> | ||||
| update ali_business_circle_order set | update ali_business_circle_order set | ||||
| `earn_points` = 1, `increased_points` = #{increasedPoints}, `points_update_time` = #{pointsUpdateTime}, | `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} | where `id` = #{id} and `tenant_id` = #{tenantId} | ||||
| </update> | </update> | ||||
| <insert id="insertRefundNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | <insert id="insertRefundNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | ||||
| INSERT INTO ali_business_circle_order ( | INSERT INTO ali_business_circle_order ( | ||||
| `id`, `tenant_id`, `parent_tenant_id`,`notice_id`, `notice_create_time`, `notice_event_type`, | `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` | `merchant_id`, `c_user_id`, `earn_points`, `is_refund`, `refund_id`, `refund_amount` | ||||
| ) | ) | ||||
| VALUES( | VALUES( | ||||
| #{id},#{tenantId},#{parentTenantId},#{noticeId},#{noticeCreateTime},#{noticeEventType}, | #{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} | #{merchantId},#{cUserId},0,1,#{refundId},#{refundAmount} | ||||
| ); | ); | ||||
| </insert> | </insert> | ||||
| @@ -172,12 +172,12 @@ | |||||
| <insert id="insertNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | <insert id="insertNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | ||||
| INSERT INTO wx_third_party_orders ( | 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`, | `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` | `merchant_id`, `c_user_id`, `earn_points`, `is_refund` | ||||
| ) | ) | ||||
| VALUES( | VALUES( | ||||
| #{id},#{tenantId},#{parentTenantId},#{sourceAppId},#{sourceType},#{noticeId},#{noticeCreateTime},#{noticeEventType}, | #{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 | #{merchantId},#{cUserId},0,0 | ||||
| ); | ); | ||||
| </insert> | </insert> | ||||
| @@ -185,19 +185,19 @@ | |||||
| <update id="updatePoints" parameterType="com.iformall.domain.po.WxThirdPartyOrders"> | <update id="updatePoints" parameterType="com.iformall.domain.po.WxThirdPartyOrders"> | ||||
| update wx_third_party_orders set | update wx_third_party_orders set | ||||
| `earn_points` = 1, `increased_points` = #{increasedPoints}, `points_update_time` = #{pointsUpdateTime}, | `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} | where `id` = #{id} and `tenant_id` = #{tenantId} | ||||
| </update> | </update> | ||||
| <insert id="insertRefundNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | <insert id="insertRefundNoticeOrder" parameterType="com.iformall.domain.po.WxThirdPartyOrders" > | ||||
| INSERT INTO wx_third_party_orders ( | 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`, | `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` | `merchant_id`, `c_user_id`, `earn_points`, `is_refund`, `refund_id`, `refund_amount` | ||||
| ) | ) | ||||
| VALUES( | VALUES( | ||||
| #{id},#{tenantId},#{parentTenantId},#{sourceAppId},#{sourceType},#{noticeId},#{noticeCreateTime},#{noticeEventType}, | #{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} | #{merchantId},#{cUserId},0,1,#{refundId},#{refundAmount} | ||||
| ); | ); | ||||
| </insert> | </insert> | ||||