feat
This commit is contained in:
@@ -53,6 +53,7 @@ public enum ErrorCodeEnum {
|
||||
IDENTITY_CARD_PARSE_FAIL(1021080, "身份证解析失败", null),
|
||||
WECHAT_BIND_OTHER_MOBILE(1021081, "授权号码有误,请核对", null),
|
||||
BUSINESS_LICENSE_PARSE_FAIL(1021082, "营业证照解析失败", null),
|
||||
BUSINESS_LICENSE_OR_ID_CARD_REPEAT(1021083, "身份证或企业信用编码重复", null),
|
||||
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
||||
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
||||
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
||||
|
||||
@@ -12,4 +12,11 @@ public interface IntentAgreementMapper {
|
||||
|
||||
SigningBaseInfoDO selectByPartnerIdOrLineId(@Param("partnerId") String partnerId,
|
||||
@Param("lineId") Long lineId);
|
||||
|
||||
/**
|
||||
* 判断身份证或营业执照是否有重复
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
SigningBaseInfoDO judge(@Param("request") IntentAgreementSubmitRequest request);
|
||||
}
|
||||
|
||||
@@ -90,6 +90,20 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="judge" resultType="com.cool.store.entity.SigningBaseInfoDO">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM xfsg_signing_base_info
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="request.idCardNo != null and request.idCardNo != ''">
|
||||
AND id_card_no = #{request.idCardNo}
|
||||
</if>
|
||||
<if test="request.businessLicenseCode != null and request.businessLicenseCode != ''">
|
||||
AND business_license_code = #{request.businessLicenseCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -176,8 +176,8 @@
|
||||
<if test="param.userPortrait != null and param.userPortrait != ''">
|
||||
#{param.userPortrait},
|
||||
</if>
|
||||
<if test="param.isJoin != null">
|
||||
#{param.isJoin},
|
||||
<if test="param.joinStatus != null">
|
||||
#{param.joinStatus},
|
||||
</if>
|
||||
<if test="param.lineStatus != null">
|
||||
#{param.lineStatus},
|
||||
@@ -200,33 +200,84 @@
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
<if test="param.partnerId != null and param.partnerId != ''">
|
||||
partner_id = #{param.partnerId},
|
||||
</if>
|
||||
<if test="param.regionId != null">
|
||||
region_id = #{param.regionId},
|
||||
</if>
|
||||
<if test="param.mobile != null and param.mobile != ''">
|
||||
mobile = #{param.mobile},
|
||||
</if>
|
||||
<if test="param.username != null and param.username != ''">
|
||||
username = #{param.username},
|
||||
</if>
|
||||
<if test="param.sex != null and param.sex != ''">
|
||||
sex = #{param.sex},
|
||||
</if>
|
||||
<if test="param.wantShopAreaId != null">
|
||||
want_shop_area_id = #{param.wantShopAreaId},
|
||||
</if>
|
||||
<if test="param.liveAddress != null and param.liveAddress != ''">
|
||||
live_address = #{param.liveAddress},
|
||||
</if>
|
||||
<if test="param.workflowStage != null">
|
||||
workflow_stage = #{param.workflowStage},
|
||||
</if>
|
||||
<if test="param.workflowSubStage != null">
|
||||
workflow_sub_stage = #{param.workflowSubStage}
|
||||
</if>
|
||||
<if test="param.partnerId != null and param.partnerId != ''">
|
||||
partner_id = #{param.partnerId},
|
||||
</if>
|
||||
<if test="param.regionId != null">
|
||||
region_id = #{param.regionId},
|
||||
</if>
|
||||
<if test="param.mobile != null and param.mobile != ''">
|
||||
mobile = #{param.mobile},
|
||||
</if>
|
||||
<if test="param.username != null and param.username != ''">
|
||||
username = #{param.username},
|
||||
</if>
|
||||
<if test="param.sex != null and param.sex != ''">
|
||||
sex = #{param.sex},
|
||||
</if>
|
||||
<if test="param.wantShopAreaId != null">
|
||||
want_shop_area_id = #{param.wantShopAreaId},
|
||||
</if>
|
||||
<if test="param.liveAddress != null and param.liveAddress != ''">
|
||||
live_address = #{param.liveAddress},
|
||||
</if>
|
||||
<if test="param.workflowStage != null">
|
||||
workflow_stage = #{param.workflowStage},
|
||||
</if>
|
||||
<if test="param.workflowSubStage != null">
|
||||
workflow_sub_stage = #{param.workflowSubStage},
|
||||
</if>
|
||||
<if test="param.workflowSubStageStatus != null">
|
||||
workflow_sub_stage_status = #{param.workflowSubStageStatus},
|
||||
</if>
|
||||
<if test="param.selectSiteNum != null">
|
||||
select_site_num = #{param.selectSiteNum},
|
||||
</if>
|
||||
<if test="param.prepareShopNum != null">
|
||||
prepare_shop_num = #{param.prepareShopNum},
|
||||
</if>
|
||||
<if test="param.openShopNum != null">
|
||||
open_shop_num = #{param.openShopNum},
|
||||
</if>
|
||||
<if test="param.lineSource != null">
|
||||
line_source = #{param.lineSource},
|
||||
</if>
|
||||
<if test="param.investmentManager != null and param.investmentManager != ''">
|
||||
investment_manager = #{param.investmentManager},
|
||||
</if>
|
||||
<if test="param.developmentManager != null and param.developmentManager != ''">
|
||||
development_manager = #{param.developmentManager},
|
||||
</if>
|
||||
<if test="param.firstInterviewer != null and param.firstInterviewer != ''">
|
||||
first_interviewer = #{param.firstInterviewer},
|
||||
</if>
|
||||
<if test="param.secondInterviewer != null and param.secondInterviewer != ''">
|
||||
second_interviewer = #{param.secondInterviewer},
|
||||
</if>
|
||||
<if test="param.userPortrait != null and param.userPortrait != ''">
|
||||
user_portrait = #{param.userPortrait},
|
||||
</if>
|
||||
<if test="param.joinStatus != null">
|
||||
join_status = #{param.joinStatus},
|
||||
</if>
|
||||
<if test="param.lineStatus != null">
|
||||
line_status = #{param.lineStatus},
|
||||
</if>
|
||||
<if test="param.createTime != null">
|
||||
create_time = #{param.createTime},
|
||||
</if>
|
||||
<if test="param.updateTime != null">
|
||||
update_time = #{param.updateTime},
|
||||
</if>
|
||||
<if test="param.createUserId != null and param.createUserId != ''">
|
||||
create_user_id = #{param.createUserId},
|
||||
</if>
|
||||
<if test="param.updateUserId != null and param.updateUserId != ''">
|
||||
update_user_id = #{param.updateUserId},
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
deleted = #{param.deleted}
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public class PartnerBaseInfoVO {
|
||||
@ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
|
||||
private Integer joinType;
|
||||
@ApiModelProperty("姓名")
|
||||
private String username;
|
||||
private String userName;
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
@ApiModelProperty("1男 2女")
|
||||
@@ -92,7 +92,7 @@ public class PartnerBaseInfoVO {
|
||||
//LineInfoDO
|
||||
partnerBaseInfoVO.setId(lineInfoDO.getId());
|
||||
partnerBaseInfoVO.setPartnerId(lineInfoDO.getPartnerId());
|
||||
partnerBaseInfoVO.setUsername(lineInfoDO.getUsername());
|
||||
partnerBaseInfoVO.setUserName(lineInfoDO.getUsername());
|
||||
partnerBaseInfoVO.setMobile(lineInfoDO.getMobile());
|
||||
partnerBaseInfoVO.setLiveAddress(lineInfoDO.getLiveAddress());
|
||||
partnerBaseInfoVO.setLineId(lineInfoDO.getId());
|
||||
|
||||
@@ -43,6 +43,12 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
||||
if(Objects.nonNull(request.getIdCardNo()) || Objects.nonNull(request.getBusinessLicenseCode())){
|
||||
SigningBaseInfoDO isExist = intentAgreementMapper.judge(request);
|
||||
if (Objects.nonNull(isExist)){
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_LICENSE_OR_ID_CARD_REPEAT);
|
||||
}
|
||||
}
|
||||
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||
if (submitStatus){
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
||||
|
||||
Reference in New Issue
Block a user