|
|
|
@@ -59,6 +59,11 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR |
|
|
|
return wxProfitSharingReceiverApplyMapper.selectById(id); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public WxProfitSharingReceiverApply findResultStateById(Long id) { |
|
|
|
return wxProfitSharingReceiverApplyMapper.findResultStateById(id); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public WxProfitSharingReceiverApply selectByPlat(TenantEntity tenantEntity, Long merchantId, EnumAppPlat plat) { |
|
|
|
WxProfitSharingReceiverApply receiverApply = new WxProfitSharingReceiverApply(); |
|
|
|
@@ -150,10 +155,12 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR |
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
public ResultData handApplymentStates(WxProfitSharingReceiverApply receiverApply) { |
|
|
|
if(receiverApply == null || !EnumSharingReceiverApplymentState.getNeedSyncList().contains(receiverApply.getApplymentState())){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该状态无需同步"); |
|
|
|
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该状态无需同步"); |
|
|
|
return new ResultData(receiverApply); |
|
|
|
} |
|
|
|
WxPayService wxPayService = wxPayAccountService.getWxPayService(receiverApply.getTenantId()); |
|
|
|
|
|
|
|
try { |
|
|
|
WxPayService wxPayService = wxPayAccountService.getWxPayService(receiverApply.getTenantId()); |
|
|
|
ApplymentStateQueryResult applymentStateQueryResult = wxPayService.getApplyment4SubService().queryApplyStatusByBusinessCode(receiverApply.getOutRequestNo()); |
|
|
|
EnumSharingReceiverApplymentState enumApplymentState = EnumSharingReceiverApplymentState.getEnum(applymentStateQueryResult.getApplymentState()); |
|
|
|
if(enumApplymentState != null && !enumApplymentState.getCode().equals(receiverApply.getApplymentState())){ |
|
|
|
@@ -190,8 +197,15 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR |
|
|
|
} |
|
|
|
wxProfitSharingReceiverService.saveOrUpdate(receiverUpd); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
|
|
|
|
receiverApply.setSubMchid(receiverApplyUpd.getSubMchid()); |
|
|
|
receiverApply.setSignUrl(receiverApplyUpd.getSignUrl()); |
|
|
|
receiverApply.setApplymentState(receiverApplyUpd.getApplymentState()); |
|
|
|
receiverApply.setApplymentStateDesc(receiverApplyUpd.getApplymentStateDesc()); |
|
|
|
receiverApply.setAuditDetail(receiverApplyUpd.getAuditDetail()); |
|
|
|
receiverApply.setUpdateTime(receiverApplyUpd.getUpdateTime()); |
|
|
|
} |
|
|
|
return new ResultData(receiverApply); |
|
|
|
} catch (WxPayException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(),e.getMessage()); |
|
|
|
|