fix 修改意向金

This commit is contained in:
shuo.wang
2024-11-07 20:37:48 +08:00
parent 3f35f7f5ed
commit e91a9dc08e
2 changed files with 18 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
package com.cool.store.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.QualificationsInfoDAO;
import com.cool.store.dao.RegionAreaConfigDao;
@@ -14,13 +15,17 @@ import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.JoinIntentionRequest;
import com.cool.store.service.JoinIntentionService;
import com.cool.store.service.UserAuthMappingService;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.poi.StringUtils;
import com.cool.store.vo.PartnerBaseInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -31,6 +36,10 @@ import java.util.Objects;
@Slf4j
public class JoinIntentionServiceImpl extends LineFlowService implements JoinIntentionService {
@Autowired
private RedisUtilPool redisUtilPool;
@Value("${mybatis.configuration.variables.enterpriseId}")
private String eid;
@Resource
JoinIntentionMapper joinIntentionMapper;
@@ -115,6 +124,8 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
//更新加盟问卷信息
qualificationsInfoDAO.updateAuditIdByLineId(auditId, lineInfo.getId());
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
redisUtilPool.delKey(key);
return Boolean.TRUE;
}

View File

@@ -38,6 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.MessageFormat;
import java.util.*;
@@ -207,7 +208,12 @@ public class LinePayServiceImpl implements LinePayService {
linePayDO.setUpdateUserId(partnerUser.getPartnerId());
}
}
linePayDO.setAmount(request.getAmount());
if(PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())){
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, request.getLineId());
String getAmount = redisUtilPool.getString(key);
linePayDO.setAmount(new BigDecimal(getAmount));
}
}
}