|
@@ -7,12 +7,14 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
-import com.fs.common.core.domain.R;
|
|
|
|
|
|
|
+import com.fs.common.core.domain.entity.SysDictData;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
import com.fs.common.core.redis.RedisCache;
|
|
|
|
|
+import com.fs.common.exception.CustomException;
|
|
|
import com.fs.common.service.impl.SmsServiceImpl;
|
|
import com.fs.common.service.impl.SmsServiceImpl;
|
|
|
import com.fs.common.utils.CloudHostUtils;
|
|
import com.fs.common.utils.CloudHostUtils;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.SecurityUtils;
|
|
import com.fs.common.utils.SecurityUtils;
|
|
|
|
|
+import com.fs.company.domain.Company;
|
|
|
import com.fs.company.domain.CompanyMoneyLogs;
|
|
import com.fs.company.domain.CompanyMoneyLogs;
|
|
|
import com.fs.company.domain.CompanyUser;
|
|
import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.company.domain.CompanyVoiceCaller;
|
|
import com.fs.company.domain.CompanyVoiceCaller;
|
|
@@ -21,6 +23,7 @@ import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.company.service.ICompanyUserService;
|
|
import com.fs.company.service.ICompanyUserService;
|
|
|
import com.fs.company.vo.QwIpadTotalVo;
|
|
import com.fs.company.vo.QwIpadTotalVo;
|
|
|
import com.fs.company.vo.RedPacketMoneyVO;
|
|
import com.fs.company.vo.RedPacketMoneyVO;
|
|
|
|
|
+import com.fs.core.utils.OrderCodeUtils;
|
|
|
import com.fs.course.dto.BatchSendCourseAllDTO;
|
|
import com.fs.course.dto.BatchSendCourseAllDTO;
|
|
|
import com.fs.course.mapper.FsCourseRedPacketLogMapper;
|
|
import com.fs.course.mapper.FsCourseRedPacketLogMapper;
|
|
|
import com.fs.course.mapper.FsUserCompanyUserMapper;
|
|
import com.fs.course.mapper.FsUserCompanyUserMapper;
|
|
@@ -58,7 +61,10 @@ import com.fs.hisStore.mapper.FsStorePaymentScrmMapper;
|
|
|
import com.fs.hisStore.service.IFsStoreOrderScrmService;
|
|
import com.fs.hisStore.service.IFsStoreOrderScrmService;
|
|
|
import com.fs.hisStore.service.IFsStorePaymentScrmService;
|
|
import com.fs.hisStore.service.IFsStorePaymentScrmService;
|
|
|
import com.fs.huifuPay.domain.HuiFuQueryOrderResult;
|
|
import com.fs.huifuPay.domain.HuiFuQueryOrderResult;
|
|
|
|
|
+import com.fs.huifuPay.domain.HuifuOrderConfirm;
|
|
|
|
|
+import com.fs.huifuPay.domain.HuifuOrderConfirmResult;
|
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
|
|
|
|
|
+import com.fs.huifuPay.sdk.opps.core.utils.DateTools;
|
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
|
import com.fs.im.dto.*;
|
|
import com.fs.im.dto.*;
|
|
|
import com.fs.im.service.IImService;
|
|
import com.fs.im.service.IImService;
|
|
@@ -68,12 +74,14 @@ import com.fs.qw.domain.QwUser;
|
|
|
import com.fs.qw.mapper.QwRestrictionPushRecordMapper;
|
|
import com.fs.qw.mapper.QwRestrictionPushRecordMapper;
|
|
|
import com.fs.qw.mapper.QwUserMapper;
|
|
import com.fs.qw.mapper.QwUserMapper;
|
|
|
import com.fs.qw.service.*;
|
|
import com.fs.qw.service.*;
|
|
|
|
|
+import com.fs.qw.service.impl.ConversationSyncService;
|
|
|
import com.fs.qwApi.service.QwApiService;
|
|
import com.fs.qwApi.service.QwApiService;
|
|
|
import com.fs.sop.domain.QwSopTempVoice;
|
|
import com.fs.sop.domain.QwSopTempVoice;
|
|
|
import com.fs.sop.service.IQwSopTempVoiceService;
|
|
import com.fs.sop.service.IQwSopTempVoiceService;
|
|
|
import com.fs.system.domain.SysConfig;
|
|
import com.fs.system.domain.SysConfig;
|
|
|
import com.fs.system.mapper.SysConfigMapper;
|
|
import com.fs.system.mapper.SysConfigMapper;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
|
|
+import com.fs.system.service.ISysDictTypeService;
|
|
|
import com.fs.utils.OrderContextHolder;
|
|
import com.fs.utils.OrderContextHolder;
|
|
|
import com.google.gson.Gson;
|
|
import com.google.gson.Gson;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -86,6 +94,7 @@ import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
@@ -219,6 +228,9 @@ public class Task {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysConfigService sysConfigService;
|
|
private ISysConfigService sysConfigService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ISysDictTypeService dictTypeService;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
|
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -242,6 +254,17 @@ public class Task {
|
|
|
private FsUserCompanyUserMapper fsUserCompanyUserMapper;
|
|
private FsUserCompanyUserMapper fsUserCompanyUserMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private FsStoreOrderScrmMapper fsStoreOrderScrmMapper;
|
|
private FsStoreOrderScrmMapper fsStoreOrderScrmMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private FsStorePaymentMapper fsStorePaymentMapper;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private FsSubMerchantMapper fsSubMerchantMapper;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsShareAmountDetailService shareAmountDetailService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ConversationSyncService syncService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 定时任务,处理ai禁止回复之后的消息
|
|
* 定时任务,处理ai禁止回复之后的消息
|
|
@@ -716,8 +739,36 @@ public class Task {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void isArtificial() throws Exception {
|
|
public void isArtificial() throws Exception {
|
|
|
- fastGptChatSessionMapper.updateFastGptChatSessionByIsReply();
|
|
|
|
|
|
|
+ Integer artificialTime = resolveIsArtificialTimeMinutes();
|
|
|
|
|
+ if (artificialTime != null && artificialTime > 0) {
|
|
|
|
|
+ fastGptChatSessionMapper.updateFastGptChatSessionByIsReplyWithTime(artificialTime);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fastGptChatSessionMapper.updateFastGptChatSessionByIsReply();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询字典 is_artificial_time,返回大于 0 的有效分钟数(取第一条有效配置)
|
|
|
|
|
+ */
|
|
|
|
|
+ private Integer resolveIsArtificialTimeMinutes() {
|
|
|
|
|
+ List<SysDictData> dictList = dictTypeService.selectDictDataByType("is_artificial_time");
|
|
|
|
|
+ if (CollectionUtil.isEmpty(dictList)) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ for (SysDictData dictData : dictList) {
|
|
|
|
|
+ if (dictData == null || StringUtils.isBlank(dictData.getDictValue())) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ int minutes = Integer.parseInt(dictData.getDictValue().trim());
|
|
|
|
|
+ if (minutes > 0) {
|
|
|
|
|
+ return minutes;
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
|
|
+ log.warn("is_artificial_time 字典值无效:{}", dictData.getDictValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void expirationQwAppCountWay() {
|
|
public void expirationQwAppCountWay() {
|
|
@@ -926,35 +977,40 @@ public class Task {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void CreateWeizouErpPush() {
|
|
public void CreateWeizouErpPush() {
|
|
|
- List<Long> omsList = fsStoreOrderMapper.selectFsStoreOrderNoCreateOms();
|
|
|
|
|
- List<Long> integrals = fsIntegralOrderMapper.selectFsStoreOrderNoCreateOms();
|
|
|
|
|
- List<Long> scrms = fsStoreOrderScrmMapper.selectFsStoreOrderNoCreateOms();
|
|
|
|
|
- logger.info("推送订单id====>{}", omsList);
|
|
|
|
|
- logger.info("推送积分订单id====>{}", integrals);
|
|
|
|
|
- logger.info("推送SCRM订单id====>{}", scrms);
|
|
|
|
|
-
|
|
|
|
|
- for (Long l : omsList) {
|
|
|
|
|
- try {
|
|
|
|
|
- fsStoreOrderService.weizouPush(l);
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- logger.error("推送订单异常:", e);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ List<Long> omsList = fsStoreOrderMapper.selectFsStoreOrderNoCreateOms();
|
|
|
|
|
+ List<Long> integrals = fsIntegralOrderMapper.selectFsStoreOrderNoCreateOms();
|
|
|
|
|
+ List<Long> scrms = fsStoreOrderScrmMapper.selectFsStoreOrderNoCreateOms();
|
|
|
|
|
+ logger.info("推送订单id====>{}", omsList);
|
|
|
|
|
+ logger.info("推送积分订单id====>{}", integrals);
|
|
|
|
|
+ logger.info("推送SCRM订单id====>{}", scrms);
|
|
|
|
|
+
|
|
|
|
|
+ for (Long l : omsList) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ fsStoreOrderService.weizouPush(l);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("推送订单异常:", e);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- for (Long l : integrals) {
|
|
|
|
|
- try {
|
|
|
|
|
- fsStoreOrderService.weizouPushIntergral(l);
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- logger.error("推送积分订单异常:", e);
|
|
|
|
|
|
|
+ for (Long l : integrals) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ fsStoreOrderService.weizouPushIntergral(l);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("推送积分订单异常:", e);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- for (Long l : scrms) {
|
|
|
|
|
- try {
|
|
|
|
|
- fsStoreOrderService.weizouPushScrm(l);
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- logger.error("推送SCRM订单异常:", e);
|
|
|
|
|
|
|
+ for (Long l : scrms) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ fsStoreOrderService.weizouPushScrm(l);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("推送SCRM订单异常:", e);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ logger.error("推送订单异常:", e);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public void CreateOmsAndHis() {
|
|
public void CreateOmsAndHis() {
|
|
|
List<Long> omsList = fsStoreOrderMapper.selectFsStoreOrderNoCreateOms();
|
|
List<Long> omsList = fsStoreOrderMapper.selectFsStoreOrderNoCreateOms();
|
|
|
logger.info("推送订单id====>{}", omsList);
|
|
logger.info("推送订单id====>{}", omsList);
|
|
@@ -1996,5 +2052,145 @@ public class Task {
|
|
|
allFutures.join(); // 等待所有任务完成
|
|
allFutures.join(); // 等待所有任务完成
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 同步企业会话记录
|
|
|
|
|
+ public void syncAllCorps() {
|
|
|
|
|
+ List<QwCompany> companies = qwCompanyService.selectQwCompanyList(new QwCompany()); // 获取所有企业
|
|
|
|
|
+ for (QwCompany company : companies) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ syncService.syncConversationsForCorp(company.getCorpId());
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("同步企业 {} 会话失败", company.getCorpName());
|
|
|
|
|
+ log.error(e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
+ public void shareAmount(){
|
|
|
|
|
+ List<FsStorePayment> payments = fsStorePaymentMapper.selectSharePaymentList();
|
|
|
|
|
+ if (CollectionUtil.isEmpty(payments)) return;
|
|
|
|
|
+ logger.info("开始处理分享金额");
|
|
|
|
|
+ for (FsStorePayment storePayment : payments) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ Thread.sleep(1000);
|
|
|
|
|
+ //查询订单确认金额
|
|
|
|
|
+ V2TradePaymentScanpayQueryRequest request = new V2TradePaymentScanpayQueryRequest();
|
|
|
|
|
+ request.setOrgReqDate(DateTools.formatYYYYMMDD(storePayment.getPayTime()));
|
|
|
|
|
+ request.setOrgReqSeqId(storePayment.getShareCode()+"-"+storePayment.getPayCode());
|
|
|
|
|
+ request.setAppId(storePayment.getAppId());
|
|
|
|
|
+ HuiFuQueryOrderResult queryOrderResult = huiFuService.queryOrder(request);
|
|
|
|
|
+ logger.info("汇付订单查询返回:{}" , queryOrderResult);
|
|
|
|
|
+ if (queryOrderResult != null && "00000000".equals(queryOrderResult.getResp_code())) {
|
|
|
|
|
+ //未开启延迟支付的跳出当前循环 执行下次循环
|
|
|
|
|
+ if (queryOrderResult.getDelay_acct_flag().equals("N")) {
|
|
|
|
|
+ FsStorePayment mapPayment = new FsStorePayment();
|
|
|
|
|
+ mapPayment.setPaymentId(storePayment.getPaymentId());
|
|
|
|
|
+ mapPayment.setIsShare(0);
|
|
|
|
|
+ fsStorePaymentService.updateFsStorePayment(mapPayment);
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ logger.info("分账订单号:{}",storePayment.getBusinessCode());
|
|
|
|
|
+
|
|
|
|
|
+ //待确认金额
|
|
|
|
|
+ BigDecimal unConfirmAmt = new BigDecimal(queryOrderResult.getUnconfirm_amt());
|
|
|
|
|
+ //分账金额
|
|
|
|
|
+ BigDecimal divAmount = null;
|
|
|
|
|
+ //默认全部进入收款主账户
|
|
|
|
|
+ BigDecimal mainAmount = unConfirmAmt;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ FsSubMerchant fsSubMerchant = null;
|
|
|
|
|
+ FsPackageOrder order = null;
|
|
|
|
|
+
|
|
|
|
|
+ //是否分账到合作人
|
|
|
|
|
+ boolean isDiv = false;
|
|
|
|
|
+ HuifuOrderConfirm confirm = new HuifuOrderConfirm();
|
|
|
|
|
+ confirm.setAppId(storePayment.getAppId());
|
|
|
|
|
+
|
|
|
|
|
+ //支付金额大于等于0.1的进行分账 最低分账金额为0.1
|
|
|
|
|
+ if (storePayment.getPayMoney().compareTo(new BigDecimal("0.1")) > -1) {
|
|
|
|
|
+ //分账订单
|
|
|
|
|
+ order = fsPackageOrderMapper.selectFsPackageOrderByOrderSn(storePayment.getBusinessCode());
|
|
|
|
|
+ if (order != null && order.getPackageId() != null && order.getCompanyId() != null) {
|
|
|
|
|
+ //获取套餐包信息
|
|
|
|
|
+ FsPackage fsPackage = fsPackageMapper.selectFsPackageByPackageId(order.getPackageId());
|
|
|
|
|
+ //公司信息
|
|
|
|
|
+ Company company = companyMapper.selectCompanyById(order.getCompanyId());
|
|
|
|
|
+ //分账比列大于0且公司有分账商户
|
|
|
|
|
+ if (fsPackage != null && (fsPackage.getShareRate() != null && fsPackage.getShareRate() > 0)
|
|
|
|
|
+ && company != null && company.getSubMerchantId() != null) {
|
|
|
|
|
+ //分账商户
|
|
|
|
|
+ fsSubMerchant = fsSubMerchantMapper.selectFsSubMerchantById(company.getSubMerchantId());
|
|
|
|
|
+ if (fsSubMerchant != null && fsSubMerchant.getMerchantNo() != null) {
|
|
|
|
|
+ //金额全部进入分账商户 分账比列为100
|
|
|
|
|
+ if (fsPackage.getShareRate() == 100) {
|
|
|
|
|
+ divAmount = unConfirmAmt;
|
|
|
|
|
+ mainAmount = BigDecimal.ZERO;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //金额进行分账
|
|
|
|
|
+ divAmount = unConfirmAmt.multiply(BigDecimal.valueOf(fsPackage.getShareRate())).divide(new BigDecimal(100));
|
|
|
|
|
+ mainAmount = unConfirmAmt.subtract(divAmount);
|
|
|
|
|
+ }
|
|
|
|
|
+ isDiv = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ logger.info("开始确认订单分账..........");
|
|
|
|
|
+ String orderCode = OrderCodeUtils.getOrderSn();
|
|
|
|
|
+ if (StringUtils.isEmpty(orderCode)) {
|
|
|
|
|
+ throw new CustomException("订单生成失败,请重试");
|
|
|
|
|
+ }
|
|
|
|
|
+ confirm.setReqSeqId(orderCode);
|
|
|
|
|
+ if (isDiv) {
|
|
|
|
|
+ //合作人分账金额和商户号
|
|
|
|
|
+ confirm.setDivAmt(divAmount);
|
|
|
|
|
+ confirm.setDivHfId(fsSubMerchant.getMerchantNo());
|
|
|
|
|
+ //分账明细数据
|
|
|
|
|
+ FsShareAmountDetail shareAmountDetail = new FsShareAmountDetail();
|
|
|
|
|
+ shareAmountDetail.setShareAmount(divAmount);
|
|
|
|
|
+ shareAmountDetail.setMerchantId(fsSubMerchant.getId());
|
|
|
|
|
+ shareAmountDetail.setOrderCode(order.getOrderSn());
|
|
|
|
|
+ shareAmountDetail.setOrderId(order.getOrderId());
|
|
|
|
|
+ //添加分账明细
|
|
|
|
|
+ shareAmountDetailService.insertFsShareAmountDetail(shareAmountDetail);
|
|
|
|
|
+ }
|
|
|
|
|
+ confirm.setMainDivAmt(mainAmount);
|
|
|
|
|
+ confirm.setOrgReqDate(queryOrderResult.getOrg_req_date());
|
|
|
|
|
+ confirm.setOrgReqSeqId(queryOrderResult.getOrg_req_seq_id());
|
|
|
|
|
+ confirm.setMainHfId(queryOrderResult.getHuifu_id());
|
|
|
|
|
+ confirm.setTotalAmount(storePayment.getPayMoney());
|
|
|
|
|
+
|
|
|
|
|
+ //执行分账
|
|
|
|
|
+ HuifuOrderConfirmResult result = huiFuService.confirmOrder(confirm);
|
|
|
|
|
+ if (result != null && result.getResp_code().equals("00000000") && (result.getTrans_stat().equals("S") || result.getTrans_stat().equals("P"))) {
|
|
|
|
|
+ logger.info("分账成功,订单号:{}",storePayment.getBusinessCode());
|
|
|
|
|
+ FsStorePayment mapPayment = new FsStorePayment();
|
|
|
|
|
+ //分账标识
|
|
|
|
|
+ mapPayment.setPaymentId(storePayment.getPaymentId());
|
|
|
|
|
+ mapPayment.setShareStatus(1);
|
|
|
|
|
+ mapPayment.setShareDate(result.getReq_date());
|
|
|
|
|
+ mapPayment.setShareCode(result.getReq_seq_id());
|
|
|
|
|
+ logger.info("更新支付记录");
|
|
|
|
|
+ fsStorePaymentMapper.updateFsStorePayment(mapPayment);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ throw new CustomException("分账失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (queryOrderResult != null) {
|
|
|
|
|
+ throw new CustomException(queryOrderResult.getResp_desc());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ FsStorePayment mapPayment = new FsStorePayment();
|
|
|
|
|
+ //分账标识
|
|
|
|
|
+ mapPayment.setPaymentId(storePayment.getPaymentId());
|
|
|
|
|
+ mapPayment.setShareStatus(1);
|
|
|
|
|
+ mapPayment.setShareCode(e.getMessage());
|
|
|
|
|
+ fsStorePaymentMapper.updateFsStorePayment(mapPayment);
|
|
|
|
|
+ logger.info("分账失败,订单号:{},原因:{}", storePayment.getBusinessCode(),e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|