fix 缴纳意向金

This commit is contained in:
shuo.wang
2024-11-18 14:37:12 +08:00
parent 14ad2a7da7
commit 081ae420df

View File

@@ -72,6 +72,7 @@ public class LinePayServiceImpl implements LinePayService {
ShopInfoMapper shopInfoMapper;
@Autowired
private RedisUtilPool redisUtilPool;
@Override
public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) {
LinePayVO result = null;
@@ -86,6 +87,7 @@ public class LinePayServiceImpl implements LinePayService {
}
return result;
}
@Override
public Boolean setAmount(Long lineId, String amount) {
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineId);
@@ -105,13 +107,13 @@ public class LinePayServiceImpl implements LinePayService {
@Override
public Boolean skipPay(Long lineId, LoginUserInfo user) {
log.info("skipPay lineId:{},操作人:{}",lineId,user.getName());
log.info("skipPay lineId:{},操作人:{}", lineId, user.getName());
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if (lineInfo == null) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if ( !WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
if (!WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode());
@@ -125,7 +127,7 @@ public class LinePayServiceImpl implements LinePayService {
@Transactional(rollbackFor = Exception.class)
public Long submitPayInfo(LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {
log.info("submitPayInfo request{}partnerUser{}", JSONObject.toJSONString(request), JSONObject.toJSONString(partnerUser));
if (Objects.isNull(request.getPayBusinessType())){
if (Objects.isNull(request.getPayBusinessType())) {
request.setPayBusinessType(Constants.ZERO_INTEGER);
}
LineInfoDO lineInfo = new LineInfoDO();
@@ -145,11 +147,11 @@ public class LinePayServiceImpl implements LinePayService {
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72);
Map<String, String> requestMap = new HashMap<>();
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
requestMap.put("storeName",shopInfoDO.getShopName());
requestMap.put("partnerName",lineInfo.getUsername());
requestMap.put("partnerMobile",lineInfo.getMobile());
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
requestMap.put("shopId",String.valueOf(shopInfoDO.getId()));
requestMap.put("storeName", shopInfoDO.getShopName());
requestMap.put("partnerName", lineInfo.getUsername());
requestMap.put("partnerMobile", lineInfo.getMobile());
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
//commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
}
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
@@ -157,17 +159,17 @@ public class LinePayServiceImpl implements LinePayService {
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
lineInfoDAO.insertOrUpdate(lineInfo);
Map<String, String> requestMap = new HashMap<>();
requestMap.put("partnerUsername",lineInfo.getUsername());
requestMap.put("payTime",DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, linePayDO.getPayTime()));
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
requestMap.put("partnerUsername", lineInfo.getUsername());
requestMap.put("payTime", DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, linePayDO.getPayTime()));
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
// commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_5,requestMap);
}
return payId == null ? null : payId;
}
private LinePayDO checkAndFill(LinePayDO linePayDO,
LinePaySubmitRequest request,
PartnerUserInfoVO partnerUser) {
LinePaySubmitRequest request,
PartnerUserInfoVO partnerUser) {
if (Objects.isNull(linePayDO)) {
linePayDO = new LinePayDO();
fillLinePay(Boolean.TRUE, linePayDO, request, partnerUser);
@@ -188,7 +190,7 @@ public class LinePayServiceImpl implements LinePayService {
linePayDO.setBankName(request.getBankName());
linePayDO.setBranchBankCode(request.getBranchBankCode());
linePayDO.setBranchBankName(request.getBranchBankName());
linePayDO.setPayTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss",request.getPayTime()));
linePayDO.setPayTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss", request.getPayTime()));
linePayDO.setPayPic(request.getPayPic());
linePayDO.setPromisePic(request.getPromisePic());
linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
@@ -208,13 +210,14 @@ public class LinePayServiceImpl implements LinePayService {
linePayDO.setUpdateUserId(partnerUser.getPartnerId());
}
}
if(PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())){
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, request.getLineId());
String getAmount = redisUtilPool.getString(key);
if (StringUtils.isBlank(getAmount)){
if (StringUtils.isBlank(getAmount)) {
linePayDO.setAmount(new BigDecimal(3000));
} else {
linePayDO.setAmount(new BigDecimal(getAmount));
}
linePayDO.setAmount(new BigDecimal(getAmount));
}
}