yanghb
2024-04-15 cb902ccd4035ef00bd2e8a598b37a8bf014f2a4b
Merge remote-tracking branch 'origin/master'
7个文件已修改
59 ■■■■ 已修改文件
common-buiness/src/main/java/cn/stylefeng/guns/modular/business/mapper/mapping/MentalAnalysisTimeConfigMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common-buiness/src/main/java/cn/stylefeng/guns/modular/business/service/impl/MentalAppointmentServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common-buiness/src/main/java/cn/stylefeng/guns/utils/ReqDebugUtil.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/mapper/CustomerMapper.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/mapper/mapping/CustomerMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/CustomerService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/impl/CustomerServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common-buiness/src/main/java/cn/stylefeng/guns/modular/business/mapper/mapping/MentalAnalysisTimeConfigMapper.xml
@@ -11,6 +11,7 @@
            t_mental_analysis_time_config o
            LEFT JOIN toc_customer tu ON tu.customer_id = o.counselling_info_id
        <where>
            AND tu.status_flag = 1
            <if test="nickName != null and nickName != ''">
                AND tu.nick_name LIKE CONCAT('%',#{nickName},'%')
            </if>
@@ -25,6 +26,7 @@
            LEFT JOIN toc_customer u ON tc.counselling_info_id = u.customer_id
            LEFT JOIN t_counselling_special_time_config stc ON stc.counselling_info_id = u.customer_id
        <where>
            AND u.status_flag = 1
            <if test="mentalAnalysisStatus != null">
                AND u.mental_analysis_status = #{mentalAnalysisStatus}
            </if>
common-buiness/src/main/java/cn/stylefeng/guns/modular/business/service/impl/MentalAppointmentServiceImpl.java
@@ -185,7 +185,7 @@
        // 获取当前星期
        Integer weekDay = DateUtil.dayOfWeekEnum(appointmentDay).getIso8601Value();
        // 预约时间段配置匹配的性格分析师
        List<MentalAnalysisTimeConfig> eqWorkerTimeConfigList = mentalAnalysisTimeConfigService.getWorkerListByAppointmentTime(1, weekDay, appointmentDayYmd, beginTimePoint, endTimePoint);
        List<MentalAnalysisTimeConfig> eqWorkerTimeConfigList = mentalAnalysisTimeConfigService.getWorkerListByAppointmentTime(CustomerMentalAnalysisStatusEnum.ON_WORK.getCode(), weekDay, appointmentDayYmd, beginTimePoint, endTimePoint);
        // 分析师ID(预约时间段配置匹配)
        List<Long> eqWorkerIdByTimeConfigList = eqWorkerTimeConfigList.isEmpty() ? Collections.singletonList(0L) :
                eqWorkerTimeConfigList.stream()
@@ -243,9 +243,9 @@
        }
        // 分配性格分析师
        Long consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(ImStatusEnum.ON_LINE.getCode(), null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList);
        Long consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(ImStatusEnum.ON_LINE.getCode(), null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), CustomerMentalAnalysisStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList);
        if (consultWorkerId == null) {
            consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(null, null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList);
            consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(null, null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), CustomerMentalAnalysisStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList);
        }
        return consultWorkerId;
common-buiness/src/main/java/cn/stylefeng/guns/utils/ReqDebugUtil.java
@@ -26,7 +26,7 @@
 * @author goupan
 */
@Slf4j
@Component
//@Component
public class ReqDebugUtil implements Filter {
    private static final ImmutableSet<String> IGNORED_HEADERS;
@@ -83,7 +83,8 @@
                        }
                    }
                    log.info(
                    //log.info(
                    System.out.println(
                            "请求url: " + url + "  method: " + request.getMethod()
                                    + "\nheader: " + JSONUtil.toJsonStr(header)
                                    + "\nparams: " + request.getQueryString()
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/mapper/CustomerMapper.java
@@ -16,11 +16,36 @@
 */
public interface CustomerMapper extends BaseMapper<Customer> {
    List<Long> getWorkerIdByLineStatusAndPostType(@Param("lineStatus") String lineStatus, @Param("postType") Integer postType, @Param("postId") Integer postId, @Param("workStatus") Integer workStatus);
    List<Customer> randomWorkerByLineStatusAndPostNeWorkerId(@Param("lineStatus") String lineStatus, @Param("postType") Integer postType, @Param("postId") Integer postId, @Param("workStatus") Integer workStatus, @Param("eqWorkerIdList") List<Long> eqWorkerIdList, @Param("neWorkerIdList") List<Long> neWorkerIdList);
    List<Long> getWorkerIdByLineStatusAndPostType(
            @Param("lineStatus") String lineStatus,
            @Param("postType") Integer postType,
            @Param("postId") Integer postId,
            @Param("workStatus") Integer workStatus
    );
    List<Long> randomWorkerByLineStatusAndPostNeWorkerId(
            @Param("lineStatus") String lineStatus,
            @Param("postType") Integer postType,
            @Param("postId") Integer postId,
            @Param("workStatus") Integer workStatus,
            @Param("mentalAnalysisStatus") Integer mentalAnalysisStatus,
            @Param("eqWorkerIdList") List<Long> eqWorkerIdList,
            @Param("neWorkerIdList") List<Long> neWorkerIdList
    );
    List<Customer> getWorkerListByLineStatusAndPostType(@Param("lineStatus") String lineStatus, @Param("postType") Integer postType, @Param("postId") Integer postId, @Param("workStatus") Integer workStatus);
    List<Customer> getWorkerListByLineStatusAndPostType(
            @Param("lineStatus") String lineStatus,
            @Param("postType") Integer postType,
            @Param("postId") Integer postId,
            @Param("workStatus") Integer workStatus
    );
    Page<UserManagePageResponseDTO> getCustomerPage(@Param("page") Page<Object> page, @Param("userType") Integer userType, @Param("id") Long id, @Param("name") String name, @Param("telephone") String telephone, @Param("statusFlag") Integer statusFlag);
    Page<UserManagePageResponseDTO> getCustomerPage(
            @Param("page") Page<Object> page,
            @Param("userType") Integer userType,
            @Param("id") Long id,
            @Param("name") String name,
            @Param("telephone") String telephone,
            @Param("statusFlag") Integer statusFlag
    );
}
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/mapper/mapping/CustomerMapper.xml
@@ -27,7 +27,7 @@
        SELECT customer_id FROM <include refid="getWorkerByLineStatusAndPostType"/>
    </select>
    <select id="randomWorkerByLineStatusAndPostNeWorkerId" resultType="cn.stylefeng.roses.kernel.customer.modular.entity.Customer">
    <select id="randomWorkerByLineStatusAndPostNeWorkerId" resultType="java.lang.Long">
        SELECT customer_id FROM toc_customer o
        LEFT JOIN im_user_status ius ON o.customer_id = ius.userid
        <where>
@@ -44,6 +44,9 @@
            <if test="workStatus != null">
                AND o.work_status = #{workStatus}
            </if>
            <if test="mentalAnalysisStatus != null">
                AND o.mental_analysis_status = #{mentalAnalysisStatus}
            </if>
            <if test="eqWorkerIdList != null and eqWorkerIdList.size != 0">
                AND o.customer_id IN
                <foreach collection="eqWorkerIdList" item="item" open="(" separator="," close=")">
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/CustomerService.java
@@ -168,7 +168,7 @@
     * @return
     */
    Long randomWorkerIdByLineStatusAndPost(String lineStatus, Integer postType, Integer postId, Integer workStatus);
    Long randomWorkerIdByLineStatusAndPostNeWorkerId(String lineStatus, Integer postType, Integer postId, Integer workStatus, List<Long> eqWorkerIdList, List<Long> neWorkerIdList);
    Long randomWorkerIdByLineStatusAndPostNeWorkerId(String lineStatus, Integer postType, Integer postId, Integer workStatus, Integer mentalAnalysisStatus, List<Long> eqWorkerIdList, List<Long> neWorkerIdList);
    /**
     * 更新用户信息,删除缓存
roses/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/impl/CustomerServiceImpl.java
@@ -643,12 +643,12 @@
    }
    @Override
    public Long randomWorkerIdByLineStatusAndPostNeWorkerId(String lineStatus, Integer postType, Integer postId, Integer workStatus, List<Long> eqWorkerIdList, List<Long> neWorkerIdList) {
    public Long randomWorkerIdByLineStatusAndPostNeWorkerId(String lineStatus, Integer postType, Integer postId, Integer workStatus, Integer mentalAnalysisStatus, List<Long> eqWorkerIdList, List<Long> neWorkerIdList) {
        // 获取指定在线状态,指定岗位的工作人员ID
        List<Customer> list = this.baseMapper.randomWorkerByLineStatusAndPostNeWorkerId(lineStatus, postType, postId, workStatus, eqWorkerIdList, neWorkerIdList);
        List<Long> list = this.baseMapper.randomWorkerByLineStatusAndPostNeWorkerId(lineStatus, postType, postId, workStatus, mentalAnalysisStatus, eqWorkerIdList, neWorkerIdList);
        if (CollUtil.isNotEmpty(list)) {
            // 随机一个工作人员ID
            return list.get(RandomUtil.randomInt(list.size())).getCustomerId();
            return list.get(RandomUtil.randomInt(list.size()));
        }
        return null;
    }