feat
This commit is contained in:
@@ -53,6 +53,7 @@ public enum ErrorCodeEnum {
|
|||||||
IDENTITY_CARD_PARSE_FAIL(1021080, "身份证解析失败", null),
|
IDENTITY_CARD_PARSE_FAIL(1021080, "身份证解析失败", null),
|
||||||
WECHAT_BIND_OTHER_MOBILE(1021081, "授权号码有误,请核对", null),
|
WECHAT_BIND_OTHER_MOBILE(1021081, "授权号码有误,请核对", null),
|
||||||
BUSINESS_LICENSE_PARSE_FAIL(1021082, "营业证照解析失败", null),
|
BUSINESS_LICENSE_PARSE_FAIL(1021082, "营业证照解析失败", null),
|
||||||
|
BUSINESS_LICENSE_OR_ID_CARD_REPEAT(1021083, "身份证或企业信用编码重复", null),
|
||||||
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
||||||
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
||||||
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
||||||
|
|||||||
@@ -12,4 +12,11 @@ public interface IntentAgreementMapper {
|
|||||||
|
|
||||||
SigningBaseInfoDO selectByPartnerIdOrLineId(@Param("partnerId") String partnerId,
|
SigningBaseInfoDO selectByPartnerIdOrLineId(@Param("partnerId") String partnerId,
|
||||||
@Param("lineId") Long lineId);
|
@Param("lineId") Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断身份证或营业执照是否有重复
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SigningBaseInfoDO judge(@Param("request") IntentAgreementSubmitRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,20 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
@@ -176,8 +176,8 @@
|
|||||||
<if test="param.userPortrait != null and param.userPortrait != ''">
|
<if test="param.userPortrait != null and param.userPortrait != ''">
|
||||||
#{param.userPortrait},
|
#{param.userPortrait},
|
||||||
</if>
|
</if>
|
||||||
<if test="param.isJoin != null">
|
<if test="param.joinStatus != null">
|
||||||
#{param.isJoin},
|
#{param.joinStatus},
|
||||||
</if>
|
</if>
|
||||||
<if test="param.lineStatus != null">
|
<if test="param.lineStatus != null">
|
||||||
#{param.lineStatus},
|
#{param.lineStatus},
|
||||||
@@ -225,7 +225,58 @@
|
|||||||
workflow_stage = #{param.workflowStage},
|
workflow_stage = #{param.workflowStage},
|
||||||
</if>
|
</if>
|
||||||
<if test="param.workflowSubStage != null">
|
<if test="param.workflowSubStage != null">
|
||||||
workflow_sub_stage = #{param.workflowSubStage}
|
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>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class PartnerBaseInfoVO {
|
|||||||
@ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
|
@ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
|
||||||
private Integer joinType;
|
private Integer joinType;
|
||||||
@ApiModelProperty("姓名")
|
@ApiModelProperty("姓名")
|
||||||
private String username;
|
private String userName;
|
||||||
@ApiModelProperty("手机号")
|
@ApiModelProperty("手机号")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
@ApiModelProperty("1男 2女")
|
@ApiModelProperty("1男 2女")
|
||||||
@@ -92,7 +92,7 @@ public class PartnerBaseInfoVO {
|
|||||||
//LineInfoDO
|
//LineInfoDO
|
||||||
partnerBaseInfoVO.setId(lineInfoDO.getId());
|
partnerBaseInfoVO.setId(lineInfoDO.getId());
|
||||||
partnerBaseInfoVO.setPartnerId(lineInfoDO.getPartnerId());
|
partnerBaseInfoVO.setPartnerId(lineInfoDO.getPartnerId());
|
||||||
partnerBaseInfoVO.setUsername(lineInfoDO.getUsername());
|
partnerBaseInfoVO.setUserName(lineInfoDO.getUsername());
|
||||||
partnerBaseInfoVO.setMobile(lineInfoDO.getMobile());
|
partnerBaseInfoVO.setMobile(lineInfoDO.getMobile());
|
||||||
partnerBaseInfoVO.setLiveAddress(lineInfoDO.getLiveAddress());
|
partnerBaseInfoVO.setLiveAddress(lineInfoDO.getLiveAddress());
|
||||||
partnerBaseInfoVO.setLineId(lineInfoDO.getId());
|
partnerBaseInfoVO.setLineId(lineInfoDO.getId());
|
||||||
|
|||||||
@@ -43,6 +43,12 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean submit(IntentAgreementSubmitRequest request) {
|
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||||
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
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);
|
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||||
if (submitStatus){
|
if (submitStatus){
|
||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
||||||
|
|||||||
Reference in New Issue
Block a user