| @@ -111,6 +111,7 @@ public class ShiroConfig { | |||||
| filterChainDefinitionMap.put("/business/circle/**", "anon"); // 商圈回调 | filterChainDefinitionMap.put("/business/circle/**", "anon"); // 商圈回调 | ||||
| filterChainDefinitionMap.put("/alipay/notify/**", "anon"); | filterChainDefinitionMap.put("/alipay/notify/**", "anon"); | ||||
| filterChainDefinitionMap.put("/ttPay/notify/**", "anon"); | |||||
| filterChainDefinitionMap.put("/jinmao/notify/**", "anon"); | filterChainDefinitionMap.put("/jinmao/notify/**", "anon"); | ||||
| @@ -3,7 +3,6 @@ package com.iformall.service.impl; | |||||
| import com.alibaba.fastjson.JSONArray; | import com.alibaba.fastjson.JSONArray; | ||||
| import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
| import com.aliyun.openservices.shade.com.alibaba.fastjson.JSON; | import com.aliyun.openservices.shade.com.alibaba.fastjson.JSON; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| @@ -29,8 +28,6 @@ import com.iformall.pay.WxPayConstant; | |||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import com.iformall.service.order.OrderAdapterService; | import com.iformall.service.order.OrderAdapterService; | ||||
| import com.iformall.service.order.OrderFactory; | import com.iformall.service.order.OrderFactory; | ||||
| import com.iformall.service.order.entity.WxComposeChildOrderPrice; | |||||
| import com.iformall.service.order.entity.WxComposeChildOrderShare; | |||||
| import com.iformall.service.order.entity.WxComposeOrder; | import com.iformall.service.order.entity.WxComposeOrder; | ||||
| import com.iformall.service.order.util.OrderHelper; | import com.iformall.service.order.util.OrderHelper; | ||||
| import com.iformall.service.pay.PayServiceFactory; | import com.iformall.service.pay.PayServiceFactory; | ||||
| @@ -767,6 +764,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| if (couponOrder.getCouponPrice() > 0) { | if (couponOrder.getCouponPrice() > 0) { | ||||
| recordAfterVerified(couponOrder, merchant.getId()); | recordAfterVerified(couponOrder, merchant.getId()); | ||||
| //TODO (系统设置不分账抖音也需要分账)抖音先记账, 定时去处理分账业务 | |||||
| WxPayOrder wxPayOrder = new WxPayOrder(); | WxPayOrder wxPayOrder = new WxPayOrder(); | ||||
| Long orderId = couponOrder.getOrderId(); | Long orderId = couponOrder.getOrderId(); | ||||
| if (!EnumComposeOrder.isSingle(couponOrder.getComposeOrderType())) { | if (!EnumComposeOrder.isSingle(couponOrder.getComposeOrderType())) { | ||||
| @@ -776,6 +774,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| wxPayOrder.setOrderId(orderId); | wxPayOrder.setOrderId(orderId); | ||||
| wxPayOrder.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); | wxPayOrder.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); | ||||
| wxPayOrder = wxPayOrderMapper.selectOne(new QueryWrapper(wxPayOrder)); | wxPayOrder = wxPayOrderMapper.selectOne(new QueryWrapper(wxPayOrder)); | ||||
| wxProfitSharingOrderService.finishDouyinSharingOrder(wxPayOrder); | wxProfitSharingOrderService.finishDouyinSharingOrder(wxPayOrder); | ||||
| } | } | ||||
| @@ -546,17 +546,14 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||
| } | } | ||||
| final IdWorker idworker = IdWorker.get(); | |||||
| WxAppinfo appInfo = getAppinfo(wxPayOrder.getTenantId(),wxPayOrder.getPayVendor()); | WxAppinfo appInfo = getAppinfo(wxPayOrder.getTenantId(),wxPayOrder.getPayVendor()); | ||||
| WxPayAccount payAccount = wxPayAccountMapper.selectById(appInfo.getPayId()); | WxPayAccount payAccount = wxPayAccountMapper.selectById(appInfo.getPayId()); | ||||
| //分账检查是否已创建分账订单 | //分账检查是否已创建分账订单 | ||||
| WxProfitSharingOrder record = new WxProfitSharingOrder(); | WxProfitSharingOrder record = new WxProfitSharingOrder(); | ||||
| //创建分账订单 | //创建分账订单 | ||||
| Date currentDate = new Date(); | Date currentDate = new Date(); | ||||
| final IdWorker idworker = IdWorker.get(); | |||||
| record.setId(idworker.nextId()); | record.setId(idworker.nextId()); | ||||
| record.updateTenantInfo(payAccount); | record.updateTenantInfo(payAccount); | ||||
| record.setTransactionId(wxPayOrder.getTransactionId()); | record.setTransactionId(wxPayOrder.getTransactionId()); | ||||
| @@ -571,21 +568,21 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||||
| record.setType(EnumProfitSharingOrderType.PROFIT_SHARING_DOUYIN_SINGLE.getCode()); | record.setType(EnumProfitSharingOrderType.PROFIT_SHARING_DOUYIN_SINGLE.getCode()); | ||||
| wxProfitSharingOrderMapper.insert(record); | wxProfitSharingOrderMapper.insert(record); | ||||
| //分账提交 | |||||
| PayShareResult shareResult = payServiceFactory.getPayShareAdapterService(wxPayOrder.getPayVendor()).noReciverShare(appInfo,payAccount,record,wxPayOrder.getPayOrderNo(),wxPayOrder.getShareAmount()); | |||||
| if (!shareResult.isSuccess()) { | |||||
| record.setSharingStatus(shareResult.getCode()); | |||||
| record.setErrorMsg(shareResult.getMsg()); | |||||
| record.setUpdateTime(new Date()); | |||||
| wxProfitSharingOrderMapper.updateById(record); | |||||
| return new ResultData(ErrorCode.PROFIT_SHARING_REQUEST_FAILED.getCode(),record.getErrorMsg()); | |||||
| } | |||||
| record.setSharingOrderNo(shareResult.getShareOrderNo()); | |||||
| record.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_ACCEPTED.getCode()); | |||||
| record.setUpdateTime(new Date()); | |||||
| wxProfitSharingOrderMapper.updateById(record); | |||||
| return new ResultData(shareResult.getData()); | |||||
| // //分账提交 | |||||
| // PayShareResult shareResult = payServiceFactory.getPayShareAdapterService(wxPayOrder.getPayVendor()).noReciverShare(appInfo,payAccount,record,wxPayOrder.getPayOrderNo(),wxPayOrder.getShareAmount()); | |||||
| // if (!shareResult.isSuccess()) { | |||||
| // record.setSharingStatus(shareResult.getCode()); | |||||
| // record.setErrorMsg(shareResult.getMsg()); | |||||
| // record.setUpdateTime(new Date()); | |||||
| // wxProfitSharingOrderMapper.updateById(record); | |||||
| // return new ResultData(ErrorCode.PROFIT_SHARING_REQUEST_FAILED.getCode(),record.getErrorMsg()); | |||||
| // } | |||||
| // | |||||
| // record.setSharingOrderNo(shareResult.getShareOrderNo()); | |||||
| // record.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_ACCEPTED.getCode()); | |||||
| // record.setUpdateTime(new Date()); | |||||
| // wxProfitSharingOrderMapper.updateById(record); | |||||
| return new ResultData(); | |||||
| } | } | ||||
| @Override | @Override | ||||