Merge remote-tracking branch 'origin/master'
| | |
| | | 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> |
| | |
| | | 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> |
| | |
| | | // 获取当前星期 |
| | | 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() |
| | |
| | | } |
| | | |
| | | // 分配性格分析师 |
| | | 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; |
| | |
| | | * @author goupan |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | //@Component |
| | | public class ReqDebugUtil implements Filter { |
| | | |
| | | private static final ImmutableSet<String> IGNORED_HEADERS; |
| | |
| | | } |
| | | } |
| | | |
| | | log.info( |
| | | //log.info( |
| | | System.out.println( |
| | | "请求url: " + url + " method: " + request.getMethod() |
| | | + "\nheader: " + JSONUtil.toJsonStr(header) |
| | | + "\nparams: " + request.getQueryString() |
| | |
| | | */ |
| | | 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 |
| | | ); |
| | | |
| | | } |
| | |
| | | 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> |
| | |
| | | <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=")"> |
| | |
| | | * @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); |
| | | |
| | | /** |
| | | * 更新用户信息,删除缓存 |
| | |
| | | } |
| | | |
| | | @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; |
| | | } |