redisUtilPool
This commit is contained in:
@@ -26,6 +26,8 @@ public class CommonConstants {
|
||||
|
||||
public static final int AN_HOUR_SECONDS = 3600;
|
||||
|
||||
public static final int TEN_SECONDS = 10;
|
||||
|
||||
/**
|
||||
* 跟进任务通知缓存时间 1小时
|
||||
*/
|
||||
|
||||
@@ -36,9 +36,15 @@ public class OpenAcceptanceInfoListVO {
|
||||
@ApiModelProperty("战区Id")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty("所属区域")
|
||||
@ApiModelProperty("所属战区区域")
|
||||
private String regionNodeName;
|
||||
|
||||
@ApiModelProperty("大区Id")
|
||||
private Long bigRegionId;
|
||||
|
||||
@ApiModelProperty("所属大区区域")
|
||||
private String bigRegionNodeName;
|
||||
|
||||
@ApiModelProperty("计划开业时间")
|
||||
private Date planOpenTime;
|
||||
@ApiModelProperty("新店开业结束时间")
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.cool.store.response.SubmitLicenseResponse;
|
||||
import com.cool.store.service.ApplyLicenseService;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
@@ -28,13 +29,11 @@ import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@@ -84,7 +83,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Resource
|
||||
StringRedisTemplate stringRedisTemplate;
|
||||
RedisUtilPool redisUtilPool;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -97,13 +96,13 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
String lockKey = "submitLicense:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = Boolean.FALSE;
|
||||
acquired = stringRedisTemplate.opsForValue().setIfAbsent(lockKey, lockValue, 1, TimeUnit.SECONDS);
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, 10);
|
||||
if (!acquired) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
LicenseTransactDO licenseTransactDO = request.toLicenseTransactDO();
|
||||
//防止一直在页面提交
|
||||
if (licenseTransactDO.getId() == null){
|
||||
if (licenseTransactDO.getId() == null) {
|
||||
LicenseTransactDO license = applyLicenseMapper.selectByShopId(request.getShopId());
|
||||
licenseTransactDO.setId(license.getId());
|
||||
}
|
||||
@@ -138,7 +137,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
List<UserAuthMappingDO> userAuthByMappingIds = userAuthMappingMapper.getUserAuthByMappingIds(Collections.singletonList(String.valueOf(regionId)));
|
||||
if (CollectionUtils.isNotEmpty(userAuthByMappingIds)) {
|
||||
List<String> sendUserIds = userAuthByMappingIds.stream().map(UserAuthMappingDO::getUserId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(sendUserIds)){
|
||||
if (CollectionUtils.isNotEmpty(sendUserIds)) {
|
||||
sendUsers = enterpriseUserRoleMapper.getUserIdsByRoleIds(Collections.singletonList("130000000"), sendUserIds);
|
||||
}
|
||||
}
|
||||
@@ -209,7 +208,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
submitLicenseResponse.setLicenseLegalPerson(storeDocument.getStoreDirector());
|
||||
submitLicenseResponse.setIssueTime(DateUtil.parseDate(storeDocument.getStoreBusinessDate()));
|
||||
submitLicenseResponse.setLicenseAddress(storeDocument.getStoreBusinessAdd());
|
||||
submitLicenseResponse.setValidity(storeBusinessValidPeriod ? null : DateUtil.parse(storeDocument.getStoreBusinessValidPeriod(),"yyyy-MM-dd"));
|
||||
submitLicenseResponse.setValidity(storeBusinessValidPeriod ? null : DateUtil.parse(storeDocument.getStoreBusinessValidPeriod(), "yyyy-MM-dd"));
|
||||
submitLicenseResponse.setValidityType(storeBusinessValidPeriod ? 0 : 1);
|
||||
submitLicenseResponse.setOperator(storeDocument.getStoreDirector());
|
||||
submitLicenseResponse.setFoodLicenseLegalPerson(storeDocument.getStoreFoodLicenseLegalRepresentative());
|
||||
|
||||
@@ -24,14 +24,12 @@ import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
@Service
|
||||
@@ -75,10 +73,6 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
@Resource
|
||||
AliyunService aliyunService;
|
||||
|
||||
@Resource
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||
@@ -150,8 +144,8 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
requestMap.put("partnerUsername", lineInfo.getUsername());
|
||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()),MessageEnum.MESSAGE_32,requestMap);
|
||||
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.INTENTION_PAYMENT_PASS);
|
||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_32, requestMap);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PAYMENT_PASS);
|
||||
}
|
||||
//更新auditId
|
||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfo.getId());
|
||||
@@ -209,7 +203,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = false;
|
||||
try {
|
||||
acquired = stringRedisTemplate.opsForValue().setIfAbsent(lockKey, lockValue, 10, TimeUnit.SECONDS);
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, 10);
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
fillSignatureInfo(requestMap);
|
||||
@@ -231,14 +225,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
return new ResponseResult(200000, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
}finally {
|
||||
} finally {
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
String currentValue = stringRedisTemplate.opsForValue().get(lockKey);
|
||||
String currentValue = redisUtilPool.getString(lockKey);
|
||||
if (lockValue.equals(currentValue)) {
|
||||
stringRedisTemplate.delete(lockKey);
|
||||
redisUtilPool.delKey(lockKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -272,11 +266,10 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
}
|
||||
|
||||
String lockKey = "saveFranchise:" + request.getLineId();
|
||||
//流水
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = false;
|
||||
try {
|
||||
acquired = stringRedisTemplate.opsForValue().setIfAbsent(lockKey, lockValue, 10, TimeUnit.SECONDS);
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, 10);
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
fillSignatureInfo(requestMap);
|
||||
@@ -298,15 +291,15 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (StringUtil.isNotBlank(lineInfoDO.getPartnerNum())){
|
||||
if (StringUtil.isNotBlank(lineInfoDO.getPartnerNum())) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
if (lineInfoDO.getPartnerNum() != null){
|
||||
return new ResponseResult(200000,null,null);
|
||||
if (lineInfoDO.getPartnerNum() != null) {
|
||||
return new ResponseResult(200000, null, null);
|
||||
}
|
||||
if ("1".equals(lineInfoDO.getSex())){
|
||||
if ("1".equals(lineInfoDO.getSex())) {
|
||||
franchiseeDO.setSex(1);
|
||||
}else if ("2".equals(lineInfoDO.getSex())){
|
||||
} else if ("2".equals(lineInfoDO.getSex())) {
|
||||
franchiseeDO.setSex(0);
|
||||
}
|
||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoDO.getWantShopAreaId());
|
||||
@@ -315,8 +308,8 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
franchiseeDO.setOperator(user.getJobNumber());
|
||||
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(lineInfoDO.getId());
|
||||
//如果是企业加盟,需要传有效期和法人
|
||||
if (Objects.nonNull(memberQuestionDO) && Constants.TWO_INTEGER.equals(memberQuestionDO.getJoinType())){
|
||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null,lineInfoDO.getId());
|
||||
if (Objects.nonNull(memberQuestionDO) && Constants.TWO_INTEGER.equals(memberQuestionDO.getJoinType())) {
|
||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfoDO.getId());
|
||||
BusinessLicenseInfoVO businessLicenseInfo = aliyunService.getBusinessLicenseInfo(signingBaseInfoDO.getBusinessLicense());
|
||||
franchiseeDO.setBusinessTerm(businessLicenseInfo.getValidPeriod());
|
||||
franchiseeDO.setLegalPerson(businessLicenseInfo.getLegalPerson());
|
||||
@@ -338,14 +331,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
} else {
|
||||
return new ResponseResult(200000, initiatingResponse.getMessage(), initiatingResponse.getData());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
}finally {
|
||||
} finally {
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
String currentValue = stringRedisTemplate.opsForValue().get(lockKey);
|
||||
String currentValue = redisUtilPool.getString(lockKey);
|
||||
if (lockValue.equals(currentValue)) {
|
||||
stringRedisTemplate.delete(lockKey);
|
||||
redisUtilPool.delKey(lockKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,7 +357,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
String auditResult = redisUtilPool.getString(redisKey);
|
||||
if (WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfoDO.getWorkflowSubStageStatus())){
|
||||
if (WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfoDO.getWorkflowSubStageStatus())) {
|
||||
//鲜丰系统不稳定,会出现调用成功但内部状态未更改的情况,这时直接返回true即可
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.*;
|
||||
@@ -19,17 +19,16 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.service.SignFranchiseService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -82,9 +81,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
@Resource
|
||||
CommonService commonService;
|
||||
|
||||
|
||||
@Resource
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
RedisUtilPool redisUtilPool;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -148,7 +146,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
boolean acquired = false;
|
||||
try {
|
||||
//10s过期
|
||||
acquired = stringRedisTemplate.opsForValue().setIfAbsent(lockKey, lockValue, 10, TimeUnit.SECONDS);
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
||||
if (Objects.isNull(request.getId())) {
|
||||
@@ -160,7 +158,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
FranchiseAgreementRequest franchiseAgreementRequest = convertFranchiseAgreement(request, shopInfoDO, user);
|
||||
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(shopInfoDO.getLineId());
|
||||
log.info("submitSignFranchise franchiseAgreementRequest :{}",JSONObject.toJSONString(franchiseAgreementRequest));
|
||||
log.info("submitSignFranchise franchiseAgreementRequest :{}", JSONObject.toJSONString(franchiseAgreementRequest));
|
||||
ResponseResult responseResult = coolStoreStartFlowService.franchiseAgreement(franchiseAgreementRequest, memberQuestionDO.getJoinType());
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
@@ -168,15 +166,15 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||
return responseResult;
|
||||
}else {
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
|
||||
}finally {
|
||||
} finally {
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
String currentValue = stringRedisTemplate.opsForValue().get(lockKey);
|
||||
String currentValue = redisUtilPool.getString(lockKey);
|
||||
if (lockValue.equals(currentValue)) {
|
||||
stringRedisTemplate.delete(lockKey);
|
||||
redisUtilPool.delKey(lockKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,47 +190,47 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
Long shopId = request.getShopId();
|
||||
//线索信息
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("lineInfoDO").getErrorMessage());
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("lineInfoDO").getErrorMessage());
|
||||
}
|
||||
//缴费信息
|
||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
|
||||
if (Objects.isNull(franchiseFeeDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("franchiseFeeDO").getErrorMessage());
|
||||
if (Objects.isNull(franchiseFeeDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("franchiseFeeDO").getErrorMessage());
|
||||
}
|
||||
//线索id
|
||||
Long lineId = shopInfoDO.getLineId();
|
||||
//签约信息
|
||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineId);
|
||||
if (Objects.isNull(signingBaseInfoDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("signingBaseInfoDO").getErrorMessage());
|
||||
if (Objects.isNull(signingBaseInfoDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("signingBaseInfoDO").getErrorMessage());
|
||||
}
|
||||
//缴款信息
|
||||
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId);
|
||||
if (Objects.isNull(linePayDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("linePayDO").getErrorMessage());
|
||||
if (Objects.isNull(linePayDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("linePayDO").getErrorMessage());
|
||||
}
|
||||
//铺位信息
|
||||
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
||||
if (Objects.isNull(pointInfoDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("pointInfoDO").getErrorMessage());
|
||||
if (Objects.isNull(pointInfoDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("pointInfoDO").getErrorMessage());
|
||||
}
|
||||
//建店数据
|
||||
SystemBuildingShopDO systemBuildingShopDO = systemBuildingShopMapper.selectOne(SystemBuildingShopDO.builder().shopId(shopId).lineId(lineId).build());
|
||||
if (Objects.isNull(systemBuildingShopDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("systemBuildingShopDO").getErrorMessage());
|
||||
if (Objects.isNull(systemBuildingShopDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("systemBuildingShopDO").getErrorMessage());
|
||||
}
|
||||
//证照办理
|
||||
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
|
||||
if (Objects.isNull(licenseTransactDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("licenseTransactDO").getErrorMessage());
|
||||
if (Objects.isNull(licenseTransactDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("licenseTransactDO").getErrorMessage());
|
||||
}
|
||||
ThirdDepartmentDO thirdDepartmentDO = new ThirdDepartmentDO();
|
||||
if (Objects.nonNull(systemBuildingShopDO)) {
|
||||
//三方部门表
|
||||
thirdDepartmentDO = thirdDepartmentMapper.getByName(systemBuildingShopDO.getBigName());
|
||||
if (Objects.isNull(thirdDepartmentDO)){
|
||||
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("thirdDepartmentDO").getErrorMessage());
|
||||
if (Objects.isNull(thirdDepartmentDO)) {
|
||||
throw new ServiceException(109014, ApiErrorCodeEnum.getByCode("thirdDepartmentDO").getErrorMessage());
|
||||
}
|
||||
}
|
||||
//找不到的url统一用这个
|
||||
@@ -254,12 +252,12 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
.hkbzj(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
|
||||
.hkbzjdx(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
|
||||
.hkbzjwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getLoanMargin())))
|
||||
.ht_day(timeUtils(request.getContractStartTime(),"day"))
|
||||
.ht_day2(timeUtils(request.getContractStartEndTime(),"day"))
|
||||
.ht_month1(timeUtils(request.getContractStartTime(),"month"))
|
||||
.ht_month2(timeUtils(request.getContractStartEndTime(),"month"))
|
||||
.ht_year1(timeUtils(request.getContractStartTime(),"year"))
|
||||
.ht_year2(timeUtils(request.getContractStartEndTime(),"year"))
|
||||
.ht_day(timeUtils(request.getContractStartTime(), "day"))
|
||||
.ht_day2(timeUtils(request.getContractStartEndTime(), "day"))
|
||||
.ht_month1(timeUtils(request.getContractStartTime(), "month"))
|
||||
.ht_month2(timeUtils(request.getContractStartEndTime(), "month"))
|
||||
.ht_year1(timeUtils(request.getContractStartTime(), "year"))
|
||||
.ht_year2(timeUtils(request.getContractStartEndTime(), "year"))
|
||||
.idcard_1(Collections.singletonList(signingBaseInfoDO.getIdCardFront()))
|
||||
.idcard_2(Collections.singletonList(signingBaseInfoDO.getIdCardReverse()))
|
||||
.idcard_address(signingBaseInfoDO.getIdCardAddress())
|
||||
@@ -276,26 +274,26 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
.jmf2(Integer.valueOf(franchiseFeeDO.getFirstYearFee()))
|
||||
.jmf3(Integer.valueOf(franchiseFeeDO.getSecondYearFee()))
|
||||
.jmf4(Integer.valueOf(franchiseFeeDO.getThirdYearFee()))
|
||||
.jmfday1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"day"))
|
||||
.jmfday2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"day"))
|
||||
.jmfday3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"day"))
|
||||
.jmfday4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"day"))
|
||||
.jmfday5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"day"))
|
||||
.jmfday6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"day"))
|
||||
.jmfday1(timeUtils(franchiseFeeDO.getFirstYearStartTime(), "day"))
|
||||
.jmfday2(timeUtils(franchiseFeeDO.getFirstYearEndTime(), "day"))
|
||||
.jmfday3(timeUtils(franchiseFeeDO.getSecondYearStartTime(), "day"))
|
||||
.jmfday4(timeUtils(franchiseFeeDO.getSecondYearEndTime(), "day"))
|
||||
.jmfday5(timeUtils(franchiseFeeDO.getThirdYearStartTime(), "day"))
|
||||
.jmfday6(timeUtils(franchiseFeeDO.getThirdYearEndTime(), "day"))
|
||||
.jmfdx(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee()))
|
||||
.jmfmonth1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"month"))
|
||||
.jmfmonth2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"month"))
|
||||
.jmfmonth3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"month"))
|
||||
.jmfmonth4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"month"))
|
||||
.jmfmonth5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"month"))
|
||||
.jmfmonth6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"month"))
|
||||
.jmfmonth1(timeUtils(franchiseFeeDO.getFirstYearStartTime(), "month"))
|
||||
.jmfmonth2(timeUtils(franchiseFeeDO.getFirstYearEndTime(), "month"))
|
||||
.jmfmonth3(timeUtils(franchiseFeeDO.getSecondYearStartTime(), "month"))
|
||||
.jmfmonth4(timeUtils(franchiseFeeDO.getSecondYearEndTime(), "month"))
|
||||
.jmfmonth5(timeUtils(franchiseFeeDO.getThirdYearStartTime(), "month"))
|
||||
.jmfmonth6(timeUtils(franchiseFeeDO.getThirdYearEndTime(), "month"))
|
||||
.jmfwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee())))
|
||||
.jmfyear1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"year"))
|
||||
.jmfyear2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"year"))
|
||||
.jmfyear3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"year"))
|
||||
.jmfyear4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"year"))
|
||||
.jmfyear5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"year"))
|
||||
.jmfyear6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"year"))
|
||||
.jmfyear1(timeUtils(franchiseFeeDO.getFirstYearStartTime(), "year"))
|
||||
.jmfyear2(timeUtils(franchiseFeeDO.getFirstYearEndTime(), "year"))
|
||||
.jmfyear3(timeUtils(franchiseFeeDO.getSecondYearStartTime(), "year"))
|
||||
.jmfyear4(timeUtils(franchiseFeeDO.getSecondYearEndTime(), "year"))
|
||||
.jmfyear5(timeUtils(franchiseFeeDO.getThirdYearStartTime(), "year"))
|
||||
.jmfyear6(timeUtils(franchiseFeeDO.getThirdYearEndTime(), "year"))
|
||||
.jmsdkjt(temp)
|
||||
.jmsdm(lineInfoDO.getPartnerNum())
|
||||
.jmshtzt(0)
|
||||
@@ -472,7 +470,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean rePay(Long shopId) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74);
|
||||
shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_8);
|
||||
return true;
|
||||
}
|
||||
@@ -480,13 +478,13 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
private int timeUtils(Date time, String type) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
switch (type){
|
||||
switch (type) {
|
||||
case "year":
|
||||
return calendar.get(Calendar.YEAR);
|
||||
case "month":
|
||||
return calendar.get(Calendar.MONTH) + 1;
|
||||
case "day":
|
||||
return calendar.get(Calendar.DAY_OF_MONTH);
|
||||
return calendar.get(Calendar.DAY_OF_MONTH);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user