|
|
@@ -67,6 +67,7 @@ import com.cyksj.service.order.OrderDonService;
|
|
|
import com.cyksj.service.order.UserRealOrderBenefitsService;
|
|
|
import com.cyksj.service.relation.GroupRelationClearService;
|
|
|
import com.cyksj.service.relation.GroupRelationFrontService;
|
|
|
+import com.cyksj.service.sys.SysConfigService;
|
|
|
import com.cyksj.service.template.TemplateCommonService;
|
|
|
import com.cyksj.service.wechat.WeChatService;
|
|
|
import com.cyksj.task.JobManager;
|
|
|
@@ -189,6 +190,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
|
|
|
private final UserRenewChangeTicketRecordMapper userRenewChangeTicketRecordMapper;
|
|
|
|
|
|
+ private final SysConfigService sysConfigService;
|
|
|
+
|
|
|
private final List<String> noChekGoodsTemp = List.of("Apple One", "Youtube", "Spotify");
|
|
|
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
@@ -373,7 +376,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
|
|
|
String toWechatAttach = Codec.DoBase64.custom()
|
|
|
.setData(Jsons.toJson(attach)).encodeAsText();
|
|
|
- String shopId = ShopConfig.WX_DEFAULT_APP_ID;
|
|
|
+ //获取微信默认商户
|
|
|
+ String shopId = sysConfigService.getDefaultShopConfigByType("wx");
|
|
|
|
|
|
ShopConfig shopConfig = shopConfigMapper.getByChannelPopularizeId(orderDon.getPopularizeId(),"wx");
|
|
|
if (shopConfig != null) {
|
|
|
@@ -410,7 +414,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
String toWechatAttach = Codec.DoBase64.custom()
|
|
|
.setData(Jsons.toJson(attach)).encodeAsText();
|
|
|
|
|
|
- String shopId = ShopConfig.WX_DEFAULT_APP_ID;
|
|
|
+ //获取微信默认商户
|
|
|
+ String shopId = sysConfigService.getDefaultShopConfigByType("wx");
|
|
|
|
|
|
ShopConfig shopConfig = shopConfigMapper.getByChannelPopularizeId(orderDon.getPopularizeId(),"wx");
|
|
|
if (shopConfig != null) {
|
|
|
@@ -754,7 +759,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
@Override
|
|
|
public AliPayParams aliPay(Long orderId, String returnUrl, String productCode, String qrPayMode) throws Exception {
|
|
|
OrderDon orderDon = getById(orderId);
|
|
|
- String appId = ShopConfig.ZFB_DEFAULT_APP_ID;
|
|
|
+ //获取支付宝默认商户
|
|
|
+ String appId = sysConfigService.getDefaultShopConfigByType("zfb");
|
|
|
|
|
|
if (orderDon.getPopularizeId() != null) {
|
|
|
ShopConfig shopConfig = shopConfigMapper.getByChannelPopularizeId(orderDon.getPopularizeId(),"zfb");
|
|
|
@@ -958,9 +964,11 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
//退款请求号
|
|
|
model.setOutRequestNo(outRefundNo);
|
|
|
request.setBizModel(model);
|
|
|
- if (orderDon.getShopId() != null && orderDon.getShopId().equals(ShopConfig.DISTRIBUTE_ZFB_DEFAULT_APP_ID)) {
|
|
|
+ String shopId = orderDon.getShopId();
|
|
|
+ ShopConfig shopConfig = shopConfigMapper.selectOne(Wrappers.lambdaQuery(ShopConfig.class).eq(ShopConfig::getAppId, orderDon.getShopId()));
|
|
|
+ if (shopId != null && shopConfig != null && shopConfig.getIsCert()) {
|
|
|
response = alipayClient.certificateExecute(request);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
response = alipayClient.execute(request);
|
|
|
}
|
|
|
}
|