|
|
@@ -26,13 +26,14 @@ import com.fs.huifuPay.service.HuiFuService;
|
|
|
import com.fs.system.domain.SysConfig;
|
|
|
import com.fs.system.mapper.SysConfigMapper;
|
|
|
import com.google.gson.Gson;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.util.*;
|
|
|
|
|
|
-
|
|
|
+@Slf4j
|
|
|
public class HuiFuUtils {
|
|
|
private static ICompanyDivConfigService companyDivConfigService = SpringUtils.getBean(ICompanyDivConfigService.class);
|
|
|
private static ICompanyDivItemService companyDivItemService = SpringUtils.getBean(ICompanyDivItemService.class);
|
|
|
@@ -193,6 +194,24 @@ public class HuiFuUtils {
|
|
|
if (companyDivItem != null) {
|
|
|
companyDivItem.setIsPay(1);
|
|
|
companyDivItemService.updateCompanyDivItem(companyDivItem);
|
|
|
+ try {
|
|
|
+ //查询是否分账payment
|
|
|
+ FsStorePayment fsStorePayment = fsStorePaymentMapper.selectFsStorePaymentByPaymentCode(payCode);
|
|
|
+ if (fsStorePayment == null) {
|
|
|
+ FsStorePaymentScrm fsStorePaymentScrm = fsStorePaymentScrmMapper.selectFsStorePaymentByPaymentCode(payCode);
|
|
|
+ if (fsStorePaymentScrm != null) {
|
|
|
+ fsStorePaymentScrm.setShareStatus(1);
|
|
|
+ fsStorePaymentScrm.setShareMoney(fsStorePaymentScrm.getPayMoney());
|
|
|
+ fsStorePaymentScrmMapper.updateFsStorePayment(fsStorePaymentScrm);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ fsStorePayment.setShareStatus(1);
|
|
|
+ fsStorePayment.setShareMoney(fsStorePayment.getPayMoney());
|
|
|
+ fsStorePaymentMapper.updateFsStorePayment(fsStorePayment);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("更新payment表分账状态失败{}", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -359,6 +378,9 @@ public class HuiFuUtils {
|
|
|
break;
|
|
|
}
|
|
|
confirmOrder.setOrgReqSeqId(orgReqSeqId);
|
|
|
+ if (payTime == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
confirmOrder.setOrgReqDate(DateUtils.parseDateToStr("yyyyMMdd", payTime));
|
|
|
confirmOrder.setAppId(appId);
|
|
|
HuiFuQueryOrderResult huiFuResult = huiFuService.delayTransConfirm(confirmOrder);
|