Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init

This commit is contained in:
苏竹红
2024-03-26 11:29:32 +08:00
31 changed files with 748 additions and 91 deletions

View File

@@ -49,8 +49,8 @@ public class LineCalendarsEventDAO {
* @param endTime
* @return
*/
public Boolean isOccupied(Integer interviewType, Long regionId, String interviewerUserId, String startTime, String endTime){
return lineCalendarsEventMapper.getOccupiedCount(interviewType, regionId, interviewerUserId, startTime, endTime) > 0;
public Boolean isOccupied(Integer interviewType, Long regionId, String interviewerUserId, String startTime, String endTime, Long excludeInterviewId){
return lineCalendarsEventMapper.getOccupiedCount(interviewType, regionId, interviewerUserId, startTime, endTime, excludeInterviewId) > 0;
}
/**

View File

@@ -1,6 +1,11 @@
package com.cool.store.dao;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.LineInfoMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
@@ -38,6 +43,28 @@ public class LineInfoDAO {
return lineInfoMapper.updateByPrimaryKeySelective(param);
}
public Integer updateWorkflowStage(Long lineId, WorkflowSubStageEnum workflowSubStage, WorkflowSubStageStatusEnum workflowSubStageStatus) {
if(Objects.isNull(workflowSubStage) && Objects.isNull(workflowSubStageStatus)){
log.info("更新线索阶段,子阶段 和 子阶段状态不能同时为空");
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
LineInfoDO lineInfo = new LineInfoDO();
lineInfo.setId(lineId);
lineInfo.setWorkflowSubStage(workflowSubStage.getCode());
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus.getCode());
return lineInfoMapper.updateByPrimaryKeySelective(lineInfo);
}
public Integer updateWorkflowStageAndInterviewer(Long lineId, WorkflowSubStageStatusEnum workflowSubStageStatus, String firstInterviewer, String secondInterviewer) {
LineInfoDO lineInfo = new LineInfoDO();
lineInfo.setId(lineId);
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus.getCode());
lineInfo.setFirstInterviewer(firstInterviewer);
lineInfo.setSecondInterviewer(secondInterviewer);
return lineInfoMapper.updateByPrimaryKeySelective(lineInfo);
}
public LineInfoDO getByPartnerId(String partnerId) {
LineInfoDO lineInfo = lineInfoMapper.getByPartnerId(partnerId);
if(Objects.nonNull(lineInfo) && !lineInfo.getDeleted()){

View File

@@ -0,0 +1,12 @@
package com.cool.store.mapper;
import com.cool.store.entity.SigningBaseInfoDO;
import com.cool.store.request.IntentAgreementSubmitRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface IntentAgreementMapper {
boolean insert(@Param("request") SigningBaseInfoDO request);
}

View File

@@ -16,12 +16,14 @@ public interface LineCalendarsEventMapper extends Mapper<LineCalendarsEventDO> {
* 被占用次数
* @param interviewType
* @param regionId
* @param interviewer
* @param interviewerUserId
* @param startTime
* @param endTime
* @param excludeInterviewId
* @return
*/
Integer getOccupiedCount(@Param("interviewType") Integer interviewType, @Param("regionId") Long regionId, @Param("interviewerUserId") String interviewerUserId, @Param("startTime") String startTime, @Param("endTime") String endTime);
Integer getOccupiedCount(@Param("interviewType") Integer interviewType, @Param("regionId") Long regionId, @Param("interviewerUserId") String interviewerUserId,
@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("excludeInterviewId")Long excludeInterviewId);
}

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.IntentAgreementMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.SigningBaseInfoDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_base_info_id" jdbcType="VARCHAR" property="partnerBaseInfoId" />
<result column="sign_name" jdbcType="VARCHAR" property="signName" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="sex" jdbcType="TINYINT" property="sex" />
<result column="id_card_front" jdbcType="VARCHAR" property="idCardFront" />
<result column="id_card_reverse" jdbcType="VARCHAR" property="idCardReverse" />
<result column="id_card_no" jdbcType="VARCHAR" property="idCardNo" />
<result column="id_card_address" jdbcType="VARCHAR" property="idCardAddress" />
<result column="current_residence" jdbcType="VARCHAR" property="currentResidence" />
<result column="address_detail" jdbcType="VARCHAR" property="addressDetail" />
<result column="business_license" jdbcType="VARCHAR" property="businessLicense" />
<result column="business_license_code" jdbcType="VARCHAR" property="businessLicenseCode" />
<result column="business_license_address" jdbcType="VARCHAR" property="businessLicenseAddress" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="TINYINT" property="deleted"/>
</resultMap>
<sql id="Base_Column_List">
id,
partner_base_info_id,
sign_name
mobile,
sex,
id_card_front,
id_card_reverse,
id_card_no,
id_card_address,
current_residence,
address_detail,
business_license,
business_license_code,
business_license_address,
create_time,
update_time,
deleted
</sql>
<insert id="insert" parameterType="com.cool.store.entity.SigningBaseInfoDO" useGeneratedKeys="true" keyProperty="id">
insert into xfsg_signing_base_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="request.partnerId != null">partner_id,</if>
<if test="request.lineId != null">line_id,</if>
<if test="request.signName != null">sign_name,</if>
<if test="request.mobile != null">mobile,</if>
<if test="request.sex != null">sex,</if>
<if test="request.idCardFront != null">id_card_front,</if>
<if test="request.idCardReverse != null">id_card_reverse,</if>
<if test="request.idCardNo != null">id_card_no,</if>
<if test="request.idCardAddress != null">id_card_address,</if>
<if test="request.currentResidence != null">current_residence,</if>
<if test="request.addressDetail != null">address_detail,</if>
<if test="request.businessLicense != null">business_license,</if>
<if test="request.businessLicenseCode != null">business_license_code,</if>
<if test="request.businessLicenseAddress != null">business_license_address,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="request.partnerId != null">#{request.partnerId},</if>
<if test="request.lineId != null">#{request.lineId},</if>
<if test="request.signName != null">#{request.signName},</if>
<if test="request.mobile != null">#{request.mobile},</if>
<if test="request.sex != null">#{request.sex},</if>
<if test="request.idCardFront != null">#{request.idCardFront},</if>
<if test="request.idCardReverse != null">#{request.idCardReverse},</if>
<if test="request.idCardNo != null">#{request.idCardNo},</if>
<if test="request.idCardAddress != null">#{request.idCardAddress},</if>
<if test="request.currentResidence != null">#{request.currentResidence},</if>
<if test="request.addressDetail != null">#{request.addressDetail},</if>
<if test="request.businessLicense != null">#{request.businessLicense},</if>
<if test="request.businessLicenseCode != null">#{request.businessLicenseCode},</if>
<if test="request.businessLicenseAddress != null">#{request.businessLicenseAddress},</if>
</trim>
</insert>
</mapper>

View File

@@ -40,5 +40,8 @@
<if test="regionId == 1">
and region_id = #{regionId}
</if>
<if test="excludeInterviewId != null">
and id != #{excludeInterviewId}
</if>
</select>
</mapper>

View File

@@ -71,6 +71,9 @@
<if test="lineSource != null and lineSource != ''">
and b.line_source = #{lineSource}
</if>
<if test="interviewStartTime != null and interviewEndTime != null ">
and a.start_time between #{interviewStartTime} and #{interviewEndTime}
</if>
<if test="interviewerUserId != null and interviewerUserId != ''">
and a.interviewer_user_id = #{interviewerUserId}
</if>