Merge branch 'cc_20241119_optimize' into 'master'
Cc 20241119 optimize See merge request hangzhou/java/custom_zxjp!29
This commit is contained in:
@@ -23,6 +23,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@@ -51,6 +52,15 @@ public class LineInfoDAO {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Boolean getLineInfoByMobile(String mobile) {
|
||||
Example example = new Example(LineInfoDO.class);
|
||||
example.createCriteria().andEqualTo("mobile", mobile);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoMapper.selectByExample(example);
|
||||
if(CollectionUtils.isNotEmpty(lineInfoDOS)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Integer updateLineInfo(LineInfoDO param){
|
||||
if(Objects.isNull(param.getId())){
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
submit_status,
|
||||
create_time,
|
||||
update_time,
|
||||
deleted
|
||||
deleted,
|
||||
two_certificates_one
|
||||
</sql>
|
||||
<update id="updateByShopId">
|
||||
update xfsg_license_transact
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<if test="param.partnerNum != null">
|
||||
partner_num,
|
||||
</if>
|
||||
<if test="param.franchiseBrand != null">
|
||||
franchise_brand,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="param.id != null and param.id != ''">
|
||||
@@ -219,6 +222,9 @@
|
||||
<if test="param.partnerNum != null">
|
||||
#{param.partnerNum},
|
||||
</if>
|
||||
<if test="param.franchiseBrand != null">
|
||||
#{param.franchiseBrand},
|
||||
</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
@@ -309,6 +315,9 @@
|
||||
<if test="param.partnerNum != null">
|
||||
partner_num = #{param.partnerNum}
|
||||
</if>
|
||||
<if test="param.franchiseBrand != null">
|
||||
partner_num = #{param.franchiseBrand}
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="toExperiencing">
|
||||
|
||||
@@ -71,7 +71,7 @@ public class LicenseTransactDO {
|
||||
private Date updateTime;
|
||||
@Column(name = "deleted")
|
||||
private Integer deleted;
|
||||
|
||||
|
||||
@Column(name = "two_certificates_one")
|
||||
private Integer twoCertificatesOne;
|
||||
|
||||
}
|
||||
|
||||
@@ -75,9 +75,9 @@ public class AddSignFranchiseRequest {
|
||||
signFranchiseDO.setContractStartTime(this.contractStartTime);
|
||||
signFranchiseDO.setContractEndTime(this.contractStartEndTime);
|
||||
signFranchiseDO.setImpressionNum(this.impressionNum);
|
||||
signFranchiseDO.setBusinessStartHours(setMill(this.businessStartHours));
|
||||
signFranchiseDO.setBusinessEndHours(setMill(this.businessEndHours));
|
||||
signFranchiseDO.setIrregularReason(this.irregularReason);
|
||||
// signFranchiseDO.setBusinessStartHours(setMill(this.businessStartHours));
|
||||
// signFranchiseDO.setBusinessEndHours(setMill(this.businessEndHours));
|
||||
// signFranchiseDO.setIrregularReason(this.irregularReason);
|
||||
signFranchiseDO.setRemark(this.remark);
|
||||
signFranchiseDO.setResign(this.resign);
|
||||
signFranchiseDO.setMobile(this.mobile);
|
||||
|
||||
@@ -79,7 +79,6 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("市")
|
||||
private String city;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty("区/县")
|
||||
private String district;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -51,9 +52,14 @@ public class FoodLicenseRequest {
|
||||
|
||||
@ApiModelProperty("0:保存 1:提交到待审核")
|
||||
private Integer submitStatus;
|
||||
@ApiModelProperty("二证合一标识;0否 1 是")
|
||||
private Integer twoCertificatesOne;
|
||||
|
||||
|
||||
public LicenseTransactDO toLicenseTransactDO(LicenseTransactDO licenseTransactDO) {
|
||||
if (Objects.isNull(licenseTransactDO)){
|
||||
licenseTransactDO = new LicenseTransactDO();
|
||||
}
|
||||
licenseTransactDO.setMainBusiness(this.mainBusiness);
|
||||
licenseTransactDO.setOperator(this.operator);
|
||||
licenseTransactDO.setFoodLicenseLegalPerson(this.foodLicenseLegalPerson);
|
||||
@@ -65,6 +71,7 @@ public class FoodLicenseRequest {
|
||||
licenseTransactDO.setFoodBusinessStartTime(this.foodLicenseStartTime);
|
||||
licenseTransactDO.setFoodBusinessEndTime(this.foodLicenseEndTime);
|
||||
licenseTransactDO.setFoodBusinessLicenseUrl(this.foodLicenseUrl);
|
||||
licenseTransactDO.setTwoCertificatesOne(this.twoCertificatesOne);
|
||||
return licenseTransactDO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,8 @@ public class SubmitLicenseResponse {
|
||||
|
||||
@ApiModelProperty("鲜丰拉取方法体")
|
||||
private StoreDocument storeDocument;
|
||||
@ApiModelProperty("二证合一标识;0否 1 是")
|
||||
private Integer twoCertificatesOne;
|
||||
|
||||
@Data
|
||||
public static class StoreDocument {
|
||||
@@ -237,6 +239,7 @@ public class SubmitLicenseResponse {
|
||||
submitLicenseResponse.setFoodLicenseCode(licenseTransactDO.getFoodBusinessLicenseCode());
|
||||
submitLicenseResponse.setFoodLicenseStartTime(licenseTransactDO.getFoodBusinessStartTime());
|
||||
submitLicenseResponse.setFoodLicenseEndTime(licenseTransactDO.getFoodBusinessEndTime());
|
||||
submitLicenseResponse.setTwoCertificatesOne(licenseTransactDO.getTwoCertificatesOne());
|
||||
return submitLicenseResponse;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,11 @@ import org.apache.commons.lang3.StringUtils;
|
||||
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.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -128,6 +130,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||
lineInfoDO.setMobile(hyPartnerUserInfoDO.getMobile());
|
||||
lineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
lineInfoDO.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_0.getCode());
|
||||
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
lineInfoDAO.insertOrUpdate(lineInfoDO);
|
||||
@@ -179,6 +182,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String updateUserPhoneNumber(MobileUpdateRequest request, PartnerUserInfoVO userInfoVO) {
|
||||
String newMobile = "";
|
||||
HyPartnerUserInfoDO oldUserInfo = hyPartnerUserInfoDAO.selectByMobile(userInfoVO.getMobile());
|
||||
@@ -195,11 +199,16 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
return newMobile;
|
||||
}
|
||||
HyPartnerUserInfoDO newUserInfo = hyPartnerUserInfoDAO.selectByMobile(newMobile);
|
||||
if (newUserInfo != null) {
|
||||
Boolean lineInfoByMobile = lineInfoDAO.getLineInfoByMobile(newMobile);
|
||||
if (newUserInfo != null&& lineInfoByMobile) {
|
||||
throw new ServiceException(ErrorCodeEnum.NEW_MOBILE_HAS_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getByPartnerId(userInfoVO.getPartnerId());
|
||||
lineInfoDO.setMobile(newMobile);
|
||||
lineInfoDO.setUpdateTime(new Date());
|
||||
oldUserInfo.setMobile(newMobile);
|
||||
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(oldUserInfo);
|
||||
lineInfoDAO.updateLineInfo(lineInfoDO);
|
||||
//修改意向申请信息中的手机号
|
||||
// hyPartnerBaseInfoDAO.updateByPartnerId(null, newMobile, oldUserInfo.getPartnerId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user