Merge remote-tracking branch 'hs/dev/feat/partner1.3_20230828' into dev/feat/partner1.3_20230828

This commit is contained in:
zhangchenbiao
2023-08-14 10:51:38 +08:00
70 changed files with 2746 additions and 72 deletions

View File

@@ -0,0 +1,25 @@
package com.cool.store.enums;
public enum CallStatusEnum {
PENDING_CALL(0, "待呼叫"),
CALL_ANSWERED(1, "呼叫接听"),
CALL_MISSED(2, "呼叫未接听"),
CALL_FAILED(3, "呼叫失败");
private final int code;
private final String message;
CallStatusEnum(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public String getMessage() {
return message;
}
}

View File

@@ -80,6 +80,11 @@ public enum ErrorCodeEnum {
INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面试人{0} 手机号:{1}", null), INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面试人{0} 手机号:{1}", null),
INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null), INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null),
ROOM_STATUS_ERROR(10211156, "当前面试房间状态不允许进行该操作!", null), ROOM_STATUS_ERROR(10211156, "当前面试房间状态不允许进行该操作!", null),
MOBILE_APP_NOT_ONLINE_ERROR(10211157, "拨出手机APP不在线", null),
CALL_RECORD_NOT_EXIST_ERROR(10211158, "通话记录不存在!", null),
CREATE_CALL_REQUEST_ERROR(10211158, "创建电话请求失败!", null),
CALL_UP_ERROR(10211159, "拨出电话异常!", null),
CONTENT_DUPLICATED(10211200, "动态标题重复!", null), CONTENT_DUPLICATED(10211200, "动态标题重复!", null),
SIGN_FAIL(600000, "验签失败", null), SIGN_FAIL(600000, "验签失败", null),
GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误", null), GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误", null),
@@ -88,7 +93,11 @@ public enum ErrorCodeEnum {
INSPECTION_INFO_NOT_EXIST(600005, "稽核信息不存在!", null), INSPECTION_INFO_NOT_EXIST(600005, "稽核信息不存在!", null),
OPEN_AREA_NULL(600006,"归属地区不能为空",null), OPEN_AREA_NULL(600006,"归属地区不能为空",null),
OUTBOUND_NUMBER_EXIST(110001, "手机号已存在!", null); OUTBOUND_NUMBER_EXIST(110001, "该呼出号码已被绑定,请更改后重试", null),
LABEL_GROUP_IN_USE(120001, "该标签组下存在标签不可删除请确保该标签组下标签数量为0后再进行删除", null),
LABEL_GROUP_EXIST(120002, "该标签组已存在,请重新输入", null),
LABEL_EXIST(120003, "该标签已存在,请重新输入", null),
; ;

View File

@@ -5,6 +5,7 @@ import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.cool.store.mapper.HyPartnerIntentInfoMapper; import com.cool.store.mapper.HyPartnerIntentInfoMapper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -40,11 +41,12 @@ public class HyPartnerIntentInfoDAO {
} }
public List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(String userId, String workflowStage, String workflowStatus){ public List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(String userId, String workflowStage, String workflowStatus, String keyword, Integer callStatus,
List<String> userPortraitIdList, String lastFollowStartTime, String lastFollowEndTime, String userChannelIdList){
if (StringUtils.isEmpty(userId)){ if (StringUtils.isEmpty(userId)){
return new ArrayList<>(); return new ArrayList<>();
} }
return hyPartnerIntentInfoMapper.selectPartnerIntentApplyInfoList(userId,workflowStage,workflowStatus); return hyPartnerIntentInfoMapper.selectPartnerIntentApplyInfoList(userId,workflowStage,workflowStatus,keyword,callStatus,userPortraitIdList,lastFollowStartTime,lastFollowEndTime,userChannelIdList);
} }

View File

@@ -0,0 +1,29 @@
package com.cool.store.mapper;
import com.cool.store.entity.CallRecordDO;
import org.apache.ibatis.annotations.Param;
/**
* @author zhangchenbiao
* @date 2023-08-11 01:03
*/
public interface CallRecordMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2023-08-11 01:03
*/
int insertSelective(CallRecordDO record);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2023-08-11 01:03
*/
int updateByPrimaryKeySelective(CallRecordDO record);
int updateByTransNoSelective(CallRecordDO record);
CallRecordDO selectByTransNo(String transNo);
}

View File

@@ -38,8 +38,14 @@ public interface HyPartnerIntentInfoMapper {
* @return * @return
*/ */
List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(@Param("userId") String userId, List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage , @Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus); @Param("workflowStatus") String workflowStatus,
@Param("keyword") String keyword,
@Param("callStatus") Integer callStatus,
@Param("userPortraitIdList") List<String> userPortraitIdList,
@Param("lastFollowStartTime") String lastFollowStartTime,
@Param("lastFollowEndTime") String lastFollowEndTime,
@Param("userChannelIdList") String userChannelIdList);
/** /**
* 根据线索ID查询数据 * 根据线索ID查询数据

View File

@@ -0,0 +1,32 @@
package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerLabelGroupDO;
import com.cool.store.vo.LabelGroupListVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author Fun Li 2023/8/10 13:25
* @version 1.0
*/
@Mapper
public interface HyPartnerLabelGroupMapper {
int deleteByPrimaryKey(Long id);
int insert(HyPartnerLabelGroupDO record);
int insertSelective(HyPartnerLabelGroupDO record);
HyPartnerLabelGroupDO selectByPrimaryKey(Long id);
List<HyPartnerLabelGroupDO> selectSelective(HyPartnerLabelGroupDO record);
List<LabelGroupListVo> getLabelGroupList(HyPartnerLabelGroupDO record);
int updateByPrimaryKeySelective(HyPartnerLabelGroupDO record);
int updateByPrimaryKey(HyPartnerLabelGroupDO record);
}

View File

@@ -0,0 +1,38 @@
package com.cool.store.mapper;
import com.cool.store.dto.label.LabelListDTO;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.vo.LabelListVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author Fun Li
* @date 2023-08-10
*/
public interface HyPartnerLabelMapper {
int deleteByPrimaryKey(Long id);
int insert(HyPartnerLabelDO record);
int insertSelective(HyPartnerLabelDO record);
HyPartnerLabelDO selectByPrimaryKey(Long id);
List<HyPartnerLabelDO> selectSelective(HyPartnerLabelDO labelDO);
int updateByPrimaryKeySelective(HyPartnerLabelDO record);
int updateByPrimaryKey(HyPartnerLabelDO record);
List<LabelListVo> getLabelList(LabelListDTO dto);
/**
* 某个标签组内是否有未删除的标签
* @param labelGroupId 标签组 id
*/
Boolean whetherGroupInUse(@Param("labelGroupId") Long labelGroupId);
List<HyPartnerLabelDO> getLabelListByIds(@Param("labelIds") List<Long> labelIds);
}

View File

@@ -4,6 +4,8 @@ import com.cool.store.entity.HyPartnerUserChannelDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper @Mapper
public interface HyPartnerUserChannelMapper { public interface HyPartnerUserChannelMapper {
@@ -22,4 +24,8 @@ public interface HyPartnerUserChannelMapper {
HyPartnerUserChannelDO selectByChannelId(@Param("channelId") Long id); HyPartnerUserChannelDO selectByChannelId(@Param("channelId") Long id);
HyPartnerUserChannelDO selectByChannelName(@Param("channelName") String channelName); HyPartnerUserChannelDO selectByChannelName(@Param("channelName") String channelName);
List<HyPartnerUserChannelDO> getAllUserChannel();
List<HyPartnerUserChannelDO> getUserChannelByIds(List<Integer> userChannelIds);
} }

View File

@@ -0,0 +1,242 @@
<?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.CallRecordMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.CallRecordDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
<result column="trans_no" jdbcType="VARCHAR" property="transNo" />
<result column="outgoing_mobile" jdbcType="VARCHAR" property="outgoingMobile" />
<result column="outgoing_user_id" jdbcType="VARCHAR" property="outgoingUserId" />
<result column="incoming_mobile" jdbcType="VARCHAR" property="incomingMobile" />
<result column="incoming_user_id" jdbcType="VARCHAR" property="incomingUserId" />
<result column="call_start_time" jdbcType="TIMESTAMP" property="callStartTime" />
<result column="call_end_time" jdbcType="TIMESTAMP" property="callEndTime" />
<result column="record_url" jdbcType="VARCHAR" property="recordUrl" />
<result column="call_status" jdbcType="TINYINT" property="callStatus" />
<result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
<result column="creater" jdbcType="VARCHAR" property="creater" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="updater" jdbcType="VARCHAR" property="updater" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, partner_line_id, trans_no, outgoing_mobile, outgoing_user_id, incoming_mobile,
incoming_user_id, call_start_time, call_end_time, record_url, call_status, fail_reason,
creater, create_time, updater, update_time, remark
</sql>
<insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into call_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="partnerLineId != null">
partner_line_id,
</if>
<if test="transNo != null">
trans_no,
</if>
<if test="outgoingMobile != null">
outgoing_mobile,
</if>
<if test="outgoingUserId != null">
outgoing_user_id,
</if>
<if test="incomingMobile != null">
incoming_mobile,
</if>
<if test="incomingUserId != null">
incoming_user_id,
</if>
<if test="callStartTime != null">
call_start_time,
</if>
<if test="callEndTime != null">
call_end_time,
</if>
<if test="recordUrl != null">
record_url,
</if>
<if test="callStatus != null">
call_status,
</if>
<if test="failReason != null">
fail_reason,
</if>
<if test="creater != null">
creater,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updater != null">
updater,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="partnerLineId != null">
#{partnerLineId},
</if>
<if test="transNo != null">
#{transNo},
</if>
<if test="outgoingMobile != null">
#{outgoingMobile},
</if>
<if test="outgoingUserId != null">
#{outgoingUserId},
</if>
<if test="incomingMobile != null">
#{incomingMobile},
</if>
<if test="incomingUserId != null">
#{incomingUserId},
</if>
<if test="callStartTime != null">
#{callStartTime},
</if>
<if test="callEndTime != null">
#{callEndTime},
</if>
<if test="recordUrl != null">
#{recordUrl},
</if>
<if test="callStatus != null">
#{callStatus},
</if>
<if test="failReason != null">
#{failReason},
</if>
<if test="creater != null">
#{creater},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updater != null">
#{updater},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="remark != null">
#{remark},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update call_record
<set>
<if test="partnerLineId != null">
partner_line_id = #{partnerLineId},
</if>
<if test="transNo != null">
trans_no = #{transNo},
</if>
<if test="outgoingMobile != null">
outgoing_mobile = #{outgoingMobile},
</if>
<if test="outgoingUserId != null">
outgoing_user_id = #{outgoingUserId},
</if>
<if test="incomingMobile != null">
incoming_mobile = #{incomingMobile},
</if>
<if test="incomingUserId != null">
incoming_user_id = #{incomingUserId},
</if>
<if test="callStartTime != null">
call_start_time = #{callStartTime},
</if>
<if test="callEndTime != null">
call_end_time = #{callEndTime},
</if>
<if test="recordUrl != null">
record_url = #{recordUrl},
</if>
<if test="callStatus != null">
call_status = #{callStatus},
</if>
<if test="failReason != null">
fail_reason = #{failReason},
</if>
<if test="creater != null">
creater = #{creater},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updater != null">
updater = #{updater},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="remark != null">
remark = #{remark},
</if>
</set>
where id = #{id}
</update>
<update id="updateByTransNoSelective">
update call_record
<set>
<if test="partnerLineId != null">
partner_line_id = #{partnerLineId},
</if>
<if test="outgoingMobile != null">
outgoing_mobile = #{outgoingMobile},
</if>
<if test="outgoingUserId != null">
outgoing_user_id = #{outgoingUserId},
</if>
<if test="incomingMobile != null">
incoming_mobile = #{incomingMobile},
</if>
<if test="incomingUserId != null">
incoming_user_id = #{incomingUserId},
</if>
<if test="callStartTime != null">
call_start_time = #{callStartTime},
</if>
<if test="callEndTime != null">
call_end_time = #{callEndTime},
</if>
<if test="recordUrl != null">
record_url = #{recordUrl},
</if>
<if test="callStatus != null">
call_status = #{callStatus},
</if>
<if test="failReason != null">
fail_reason = #{failReason},
</if>
<if test="creater != null">
creater = #{creater},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updater != null">
updater = #{updater},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="remark != null">
remark = #{remark},
</if>
</set>
where trans_no = #{transNo}
</update>
<select id="selectByTransNo" resultType="com.cool.store.entity.CallRecordDO">
select
<include refid="Base_Column_List" />
from call_record
where trans_no = #{transNo}
</select>
</mapper>

View File

@@ -5,6 +5,7 @@
<id column="id" property="id" /> <id column="id" property="id" />
<result column="mobile" property="mobile" /> <result column="mobile" property="mobile" />
<result column="remark" property="remark" /> <result column="remark" property="remark" />
<result column="edit_user_id" property="editUserId" />
<result column="create_user_id" property="createUserId" /> <result column="create_user_id" property="createUserId" />
<result column="update_user_id" property="updateUserId" /> <result column="update_user_id" property="updateUserId" />
<result column="deleted" property="deleted" /> <result column="deleted" property="deleted" />
@@ -12,7 +13,7 @@
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, mobile, remark, create_user_id, update_user_id, deleted, create_time, update_time id, mobile, remark, edit_user_id, create_user_id, update_user_id, deleted, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
@@ -28,10 +29,13 @@
<if test="id != null"> <if test="id != null">
id = #{id} id = #{id}
</if> </if>
<if test="mobile != null"> <if test="mobile != null and mobile != ''">
and mobile = #{mobile} and mobile = #{mobile}
</if> </if>
<if test="remark != null"> <if test="editUserId != null and editUserId != ''">
and edit_user_id = #{editUserId}
</if>
<if test="remark != null and remark != ''">
and remark = #{remark} and remark = #{remark}
</if> </if>
<if test="createUserId != null"> <if test="createUserId != null">
@@ -53,10 +57,10 @@
where id = #{id} where id = #{id}
</delete> </delete>
<insert id="insert" parameterType="com.cool.store.entity.HyOutboundMobileDO"> <insert id="insert" parameterType="com.cool.store.entity.HyOutboundMobileDO">
insert into hy_outbound_mobile (id, mobile, remark, insert into hy_outbound_mobile (id, mobile, edit_user_id, remark,
create_user_id, update_user_id, deleted, create_user_id, update_user_id, deleted,
create_time, update_time) create_time, update_time)
values (#{id}, #{mobile}, #{remark}, values (#{id}, #{mobile}, #{editUserId}, #{remark},
#{createUserId}, #{updateUserId}, #{deleted}, #{createUserId}, #{updateUserId}, #{deleted},
#{createTime}, #{updateTime}) #{createTime}, #{updateTime})
</insert> </insert>
@@ -66,10 +70,13 @@
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="mobile != null"> <if test="mobile != null and mobile != ''">
mobile, mobile,
</if> </if>
<if test="remark != null"> <if test="editUserId != null and editUserId != ''">
edit_user_id,
</if>
<if test="remark != null and remark != ''">
remark, remark,
</if> </if>
<if test="createUserId != null"> <if test="createUserId != null">
@@ -92,12 +99,15 @@
<if test="id != null"> <if test="id != null">
#{id}, #{id},
</if> </if>
<if test="mobile != null"> <if test="mobile != null and mobile != ''">
#{mobile}, #{mobile},
</if> </if>
<if test="remark != null"> <if test="remark != null and remark != ''">
#{remark}, #{remark},
</if> </if>
<if test="editUserId != null and editUserId != ''">
#{editUserId},
</if>
<if test="createUserId != null"> <if test="createUserId != null">
#{createUserId}, #{createUserId},
</if> </if>
@@ -118,12 +128,15 @@
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyOutboundMobileDO"> <update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyOutboundMobileDO">
update hy_outbound_mobile update hy_outbound_mobile
<set> <set>
<if test="mobile != null"> <if test="mobile != null and mobile != ''">
mobile = #{mobile}, mobile = #{mobile},
</if> </if>
<if test="remark != null"> <if test="remark != null and remark != ''">
remark = #{remark}, remark = #{remark},
</if> </if>
<if test="editUserId != null and editUserId != ''">
edit_user_id = #{editUserId},
</if>
<if test="createUserId != null"> <if test="createUserId != null">
create_user_id = #{createUserId}, create_user_id = #{createUserId},
</if> </if>
@@ -145,6 +158,7 @@
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyOutboundMobileDO"> <update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyOutboundMobileDO">
update hy_outbound_mobile update hy_outbound_mobile
set mobile = #{mobile}, set mobile = #{mobile},
edit_user_id = #{editUserId},
remark = #{remark}, remark = #{remark},
create_user_id = #{createUserId}, create_user_id = #{createUserId},
update_user_id = #{updateUserId}, update_user_id = #{updateUserId},
@@ -158,8 +172,8 @@
<select id="getOutboundNumberList" resultType="com.cool.store.vo.HyOutboundVo"> <select id="getOutboundNumberList" resultType="com.cool.store.vo.HyOutboundVo">
SELECT t1.id, t1.mobile as outboundNumber, t2.name as updaterName, t2.mobile as updaterMobile, t1.update_time as update_time SELECT t1.id, t1.mobile as outboundNumber, t2.name as updaterName, t2.mobile as updaterMobile, t1.update_time as update_time
FROM hy_outbound_mobile t1 FROM hy_outbound_mobile t1
LEFT JOIN enterprise_user t2 ON t1.update_user_id = t2.user_id LEFT JOIN enterprise_user t2 ON t1.edit_user_id = t2.user_id
WHERE t2.deleted = 0 AND t1.deleted = 0 WHERE t2.deleted = 0 AND t1.deleted = 0
AND t1.update_user_id = #{userId} AND t1.edit_user_id = #{userId}
</select> </select>
</mapper> </mapper>

View File

@@ -261,13 +261,47 @@
b.id as id, b.id as id,
b.create_time as partnerSubmitTime, b.create_time as partnerSubmitTime,
b.deadline as deadline, b.deadline as deadline,
bi.user_portrait as userPortrait,
hpuinfo.mobile as mobile,
hpuinfo.username as partnerUserName,
hpuinfo.user_channel_id as userChannelId,
hpuinfo.live_area as liveArea, hpuinfo.live_area as liveArea,
hpuinfo.want_shop_area as wantShopArea, hpuinfo.want_shop_area as wantShopArea,
hpuinfo.accept_adjust_type as acceptAdjustType hpuinfo.accept_adjust_type as acceptAdjustType,
cr.create_time as lastFollowTime,
cr.call_status as callStatus
from hy_partner_line_info a from hy_partner_line_info a
left join hy_partner_intent_info b on a.id = b.partner_line_id left join hy_partner_intent_info b on a.id = b.partner_line_id
left join hy_partner_base_info bi on a.id = bi.partner_line_id
LEFT JOIN hy_partner_user_info hpuinfo ON a.partner_id = hpuinfo.partner_id LEFT JOIN hy_partner_user_info hpuinfo ON a.partner_id = hpuinfo.partner_id
LEFT join call_record cr on a.id = cr.partner_line_id
where deleted = 0 and line_status!=3 where deleted = 0 and line_status!=3
and (cr.id in (
select max(id) maxId
from call_record group by partner_line_id) or cr.id is null)
<if test="keyword!=null and keyword!=''">
and (hpuinfo.mobile like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
</if>
<if test="callStatus!=null and callStatus==1">
and cr.call_status = #{callStatus}
</if>
<if test="callStatus!=null and callStatus==0">
and cr.call_status != 1
</if>
<if test="lastFollowStartTime!=null and lastFollowEndTime!=null">
and cr.create_time>#{lastFollowStartTime} and cr.create_time <![CDATA[<]]> #{lastFollowEndTime}
</if>
<if test="userChannelIdList!=null and userChannelIdList.size>0">
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id in (" close=")" separator="," item="userChannelId">
#{userChannelId}
</foreach>
</if>
<if test="userPortraitIdList!=null and userPortraitIdList.size>0">
and
<foreach collection="userPortraitIdList" separator="or" open="(" close=")" item="userPortraitId">
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
</foreach>
</if>
<if test="userId!=null and userId!=''"> <if test="userId!=null and userId!=''">
and a.investment_manager = #{userId} and a.investment_manager = #{userId}
</if> </if>

View File

@@ -302,6 +302,9 @@
hpli.partner_id as partnerId, hpli.partner_id as partnerId,
hpli.deadline as deadline, hpli.deadline as deadline,
hpli.workflow_status as status, hpli.workflow_status as status,
cr.create_time as lastFollowTime,
cr.call_status as callStatus,
bi.user_portrait as userPortrait,
a.id as interviewId, a.id as interviewId,
a.auth_code as authCode, a.auth_code as authCode,
a.approve_time as approveTime, a.approve_time as approveTime,
@@ -315,24 +318,26 @@
hpci.intention_contract_no as intentionContractNo hpci.intention_contract_no as intentionContractNo
from hy_partner_line_info hpli from hy_partner_line_info hpli
left join hy_partner_interview a on hpli.id = a.partner_line_id left join hy_partner_interview a on hpli.id = a.partner_line_id
left join hy_partner_base_info bi on hpli.id = bi.partner_line_id
left join hy_partner_interview_plan b on a.interview_plan_id = b.id left join hy_partner_interview_plan b on a.interview_plan_id = b.id
left join hy_partner_certification_info hpci on hpci.partner_interview_id = a.id left join hy_partner_certification_info hpci on hpci.partner_interview_id = a.id
<where> LEFT join call_record cr on hpli.id = cr.partner_line_id
and hpli.deleted = 0 and hpli.line_status!=3 where hpli.deleted = 0 and hpli.line_status!=3
<if test="filter"> and (cr.id in (
and b.deleted = 0 select max(id) maxId
</if> from call_record group by partner_line_id) or cr.id is null)
<if test="workflowStage!=null and workflowStage!=''"> <if test="filter">
and hpli.workflow_stage = #{workflowStage} and b.deleted = 0
</if> </if>
<if test="workflowStatus!=null and workflowStatus!=''"> <if test="workflowStage!=null and workflowStage!=''">
and hpli.workflow_status = #{workflowStatus} and hpli.workflow_stage = #{workflowStage}
</if> </if>
<if test="userId!=null and userId!=''"> <if test="workflowStatus!=null and workflowStatus!=''">
and hpli.investment_manager = #{userId} and hpli.workflow_status = #{workflowStatus}
</if> </if>
</where> <if test="userId!=null and userId!=''">
and hpli.investment_manager = #{userId}
</if>
</select> </select>
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO"> <select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">

View File

@@ -0,0 +1,226 @@
<?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.HyPartnerLabelGroupMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerLabelGroupDO">
<id column="id" property="id" />
<result column="label_group_name" property="labelGroupName" />
<result column="deleted" property="deleted" />
<result column="edit_user_id" property="editUserId" />
<result column="edit_date" property="editDate" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="create_user_id" property="createUserId" />
<result column="update_user_id" property="updateUserId" />
<result column="remark" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, label_group_name, deleted, edit_user_id, edit_date, create_time, update_time,
create_user_id, update_user_id, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_label_group
where id = #{id}
order by create_time
</select>
<select id="selectSelective" resultType="com.cool.store.entity.HyPartnerLabelGroupDO">
select <include refid="Base_Column_List"></include>
from hy_partner_label_group
where deleted = 0
<if test="labelGroupName != null and labelGroupName != ''">
and label_group_name = #{labelGroupName}
</if>
<if test="editUserId != null">
and edit_user_id = #{editUserId}
</if>
<if test="editDate != null">
and edit_date = #{editDate}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateTime != null">
and update_time =#{updateTime}
</if>
<if test="createUserId != null">
and create_user_id = #{createUserId}
</if>
<if test="updateUserId != null">
and update_user_id = #{updateUserId}
</if>
<if test="remark != null and remark != ''">
and remark like concat('%', #{remark}, '%')
</if>
order by create_time
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_partner_label_group
where id = #{id}
<if test="id != null">
and id = #{id}
</if>
<if test="labelGroupName != null and labelGroupName != ''">
and label_group_name like concat('%', #{labelGroupName}, '%')
</if>
<if test="editUserId != null">
and edit_user_id = #{editUserId}
</if>
<if test="editDate != null">
and edit_date = #{editDate}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateTime != null">
and update_time =#{updateTime}
</if>
<if test="createUserId != null">
and create_user_id = #{createUserId}
</if>
<if test="updateUserId != null">
and update_user_id = #{updateUserId}
</if>
<if test="remark != null and remark != ''">
and remark like concat('%', #{remark}, '%')
</if>
</delete>
<insert id="insert" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
insert into hy_partner_label_group (id, label_group_name, deleted,
edit_user_id, edit_date, create_time,
update_time, create_user_id, update_user_id,
remark)
values (#{id}, #{labelGroupName}, #{deleted},
#{editUserId}, #{editDate}, #{createTime},
#{updateTime}, #{createUserId}, #{updateUserId},
#{remark})
</insert>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
insert into hy_partner_label_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="labelGroupName != null and labelGroupName != ''">
label_group_name,
</if>
<if test="deleted != null">
deleted,
</if>
<if test="editUserId != null">
edit_user_id,
</if>
<if test="editDate != null">
edit_date,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="labelGroupName != null">
#{labelGroupName},
</if>
<if test="deleted != null">
#{deleted},
</if>
<if test="editUserId != null">
#{editUserId},
</if>
<if test="editDate != null">
#{editDate},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="createUserId != null">
#{createUserId},
</if>
<if test="updateUserId != null">
#{updateUserId},
</if>
<if test="remark != null">
#{remark},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
update hy_partner_label_group
<set>
<if test="labelGroupName != null">
label_group_name = #{labelGroupName},
</if>
<if test="deleted != null">
deleted = #{deleted},
</if>
<if test="editUserId != null">
edit_user_id = #{editUserId},
</if>
<if test="editDate != null">
edit_date = #{editDate},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId},
</if>
<if test="remark != null">
remark = #{remark},
</if>
</set>
where id = #{id}
</update>
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
update hy_partner_label_group
set label_group_name = #{labelGroupName},
deleted = #{deleted},
edit_user_id = #{editUserId},
edit_date = #{editDate},
create_time = #{createTime},
update_time = #{updateTime},
create_user_id = #{createUserId},
update_user_id = #{updateUserId},
remark = #{remark}
where id = #{id}
</update>
<!-- 获取标签分组信息列表 -->
<select id="getLabelGroupList" resultType="com.cool.store.vo.LabelGroupListVo">
SELECT t1.id, t1.label_group_name, t2.`name` AS editName, t2.mobile AS editMobile, t1.edit_date
FROM hy_partner_label_group t1
LEFT JOIN enterprise_user t2 ON t1.edit_user_id = t2.user_id
WHERE t1.deleted = 0
<if test="labelGroupName != null and labelGroupName != ''">
AND t1.label_group_name LIKE CONCAT('%', #{labelGroupName}, '%')
</if>
ORDER BY t1.create_time DESC
</select>
</mapper>

View File

@@ -0,0 +1,234 @@
<?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.HyPartnerLabelMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerLabelDO">
<id column="id" property="id" />
<result column="label_group_id" property="labelGroupId" />
<result column="label_name" property="labelName" />
<result column="edit_user_id" property="editUserId" />
<result column="edit_date" property="editDate" />
<result column="deleted" property="deleted" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="create_user_id" property="createUserId" />
<result column="update_user_id" property="updateUserId" />
<result column="remark" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, label_group_id, label_name, edit_user_id, edit_date, deleted, create_time, update_time,
create_user_id, update_user_id, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_label
where deleted = 0
and id = #{id}
order by create_time desc
</select>
<select id="selectSelective" resultType="com.cool.store.entity.HyPartnerLabelDO">
select <include refid="Base_Column_List"></include>
from hy_partner_label
where deleted = 0
<if test="labelGroupId != null">
and label_group_id = #{labelGroupId}
</if>
<if test="labelName != null and labelName != ''">
and label_name = #{labelName}
</if>
<if test="editUserId != null">
and edit_user_id = #{editUserId}
</if>
<if test="editDate != null">
and edit_date = #{editDate}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="createUserId != null">
and create_user_id = #{createUserId}
</if>
<if test="updateUserId != null">
and update_user_id = #{updateUserId}
</if>
<if test="remark != null">
and remark = #{remark}
</if>
order by create_time desc
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_partner_label
where id = #{id}
</delete>
<insert id="insert" parameterType="com.cool.store.entity.HyPartnerLabelDO">
insert into hy_partner_label (id, label_group_id, label_name,
edit_user_id, edit_date, deleted,
create_time, update_time, create_user_id,
update_user_id, remark)
values (#{id}, #{labelGroupId}, #{labelName},
#{editUserId}, #{editDate}, #{deleted},
#{createTime}, #{updateTime}, #{createUserId},
#{updateUserId}, #{remark})
</insert>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyPartnerLabelDO">
insert into hy_partner_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="labelGroupId != null">
label_group_id,
</if>
<if test="labelName != null">
label_name,
</if>
<if test="editUserId != null">
edit_user_id,
</if>
<if test="editDate != null">
edit_date,
</if>
<if test="deleted != null">
deleted,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="labelGroupId != null">
#{labelGroupId},
</if>
<if test="labelName != null">
#{labelName},
</if>
<if test="editUserId != null">
#{editUserId},
</if>
<if test="editDate != null">
#{editDate},
</if>
<if test="deleted != null">
#{deleted},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="createUserId != null">
#{createUserId},
</if>
<if test="updateUserId != null">
#{updateUserId},
</if>
<if test="remark != null">
#{remark},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerLabelDO">
update hy_partner_label
<set>
<if test="labelGroupId != null">
label_group_id = #{labelGroupId},
</if>
<if test="labelName != null and labelName != ''">
label_name = #{labelName},
</if>
<if test="editUserId != null">
edit_user_id = #{editUserId},
</if>
<if test="editDate != null">
edit_date = #{editDate},
</if>
<if test="deleted != null">
deleted = #{deleted},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId},
</if>
<if test="remark != null">
remark = #{remark},
</if>
</set>
where deleted = 0
and id = #{id}
</update>
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerLabelDO">
update hy_partner_label
set label_group_id = #{labelGroupId},
label_name = #{labelName},
edit_user_id = #{editUserId},
edit_date = #{editDate},
deleted = #{deleted},
create_time = #{createTime},
update_time = #{updateTime},
create_user_id = #{createUserId},
update_user_id = #{updateUserId},
remark = #{remark}
where id = #{id}
</update>
<select id="getLabelList" resultType="com.cool.store.vo.LabelListVo">
SELECT t1.id, t2.id AS labelGroupId, t1.label_name, t2.label_group_name, t3.`name` AS editName, t3.mobile AS editMobile, t1.edit_date
FROM hy_partner_label t1
LEFT JOIN hy_partner_label_group t2 ON t1.label_group_id = t2.id
LEFT JOIN enterprise_user t3 ON t1.edit_user_id = t3.user_id
WHERE t1.deleted = 0 AND t2.deleted = 0
<if test="labelName != null and labelName != ''">
AND t1.label_name LIKE CONCAT('%', #{labelName} ,'%')
</if>
<if test="labelGroupId != null">
AND t2.id = #{labelGroupId}
</if>
ORDER BY t1.create_time DESC
</select>
<select id="whetherGroupInUse" resultType="java.lang.Boolean">
SELECT COUNT(*)
FROM hy_partner_label
WHERE deleted = 0
AND label_group_id = #{labelGroupId}
</select>
<select id="getLabelListByIds" resultMap="BaseResultMap">
select * from hy_partner_label where deleted = 0
<if test="labelIds!=null and labelIds.size>0">
<foreach collection="labelIds" item="labelId" open="and id in (" close=")" separator=",">
#{labelId}
</foreach>
</if>
</select>
</mapper>

View File

@@ -441,12 +441,15 @@
a.update_time as updateTime, a.update_time as updateTime,
b.partner_id as partner_id, b.partner_id as partner_id,
b.mobile as mobile, b.mobile as mobile,
b.user_channel_id as userChannelId,
b.username as userName, b.username as userName,
b.want_shop_area as wantShopArea, b.want_shop_area as wantShopArea,
b.accept_adjust_type as acceptAdjustType, b.accept_adjust_type as acceptAdjustType,
bi.user_portrait as userPortrait,
hpl.phone_address as phoneAddress hpl.phone_address as phoneAddress
FROM hy_partner_line_info a FROM hy_partner_line_info a
inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
left join hy_partner_base_info bi on hpli.id = bi.partner_line_id
LEFT JOIN hy_open_area_info hoai ON hoai.id = b.want_shop_area LEFT JOIN hy_open_area_info hoai ON hoai.id = b.want_shop_area
LEFT JOIN hy_phone_location hpl ON hpl.phone_number = b.mobile LEFT JOIN hy_phone_location hpl ON hpl.phone_number = b.mobile
where a.line_status = 0 and a.deleted = 0 where a.line_status = 0 and a.deleted = 0
@@ -485,6 +488,7 @@
hpli.development_manager as developmentManager, hpli.development_manager as developmentManager,
hpli.line_status as lineStatus, hpli.line_status as lineStatus,
hpli.update_time as updateTime, hpli.update_time as updateTime,
hpuinfo.user_channel_id as userChannelId,
hpuinfo.want_shop_area as wantShopArea, hpuinfo.want_shop_area as wantShopArea,
hpuinfo.accept_adjust_type as acceptAdjustType, hpuinfo.accept_adjust_type as acceptAdjustType,
hpuinfo.username as partnerUserName, hpuinfo.username as partnerUserName,
@@ -493,11 +497,13 @@
hpuinfo.shop_name as storeName, hpuinfo.shop_name as storeName,
hpuinfo.recommend_partner_name as recommendPartnerName, hpuinfo.recommend_partner_name as recommendPartnerName,
hpuinfo.recommend_partner_mobile as recommendPartnerMobile, hpuinfo.recommend_partner_mobile as recommendPartnerMobile,
bi.user_portrait as userPortrait,
eu.name as investmentManagerName, eu.name as investmentManagerName,
eu.mobile as investmentManagerMobile eu.mobile as investmentManagerMobile
FROM FROM
hy_partner_line_info hpli hy_partner_line_info hpli
LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id
left join hy_partner_base_info bi on hpli.id = bi.partner_line_id
LEFT JOIN hy_partner_user_info hpuinfo ON hpli.partner_id = hpuinfo.partner_id LEFT JOIN hy_partner_user_info hpuinfo ON hpli.partner_id = hpuinfo.partner_id
LEFT JOIN enterprise_user eu ON hpli.investment_manager = eu.user_id LEFT JOIN enterprise_user eu ON hpli.investment_manager = eu.user_id
LEFT JOIN hy_open_area_info hoai ON hoai.id = hpuinfo.want_shop_area LEFT JOIN hy_open_area_info hoai ON hoai.id = hpuinfo.want_shop_area

View File

@@ -90,4 +90,19 @@
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="getAllUserChannel" resultMap="BaseResultMap">
select * from hy_partner_user_channel
</select>
<select id="getUserChannelByIds" resultMap="BaseResultMap">
select * from hy_partner_user_channel
<where>
<if test="userChannelIds!=null and userChannelIds.size>0">
<foreach collection="userChannelIds" item="userChannelId" open="channel_id in (" close=")" separator=",">
#{userChannelId}
</foreach>
</if>
</where>
</select>
</mapper> </mapper>

View File

@@ -0,0 +1,16 @@
package com.cool.store.dto.call;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-08-11 15:24
* @Description:
*/
@Data
public class CallUpDTO {
private String transNo;
private String outgoingMobile;
private String incomingMobile;
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.dto.label;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fun Li 2023/8/10 15:55
* @version 1.0
*/
@Data
public class LabelAddDTO {
@ApiModelProperty(value = "标签名称", required = true)
private String labelName;
@ApiModelProperty(value = "标签组id", required = true)
private Long labelGroupId;
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.dto.label;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fun Li 2023/8/10 16:43
* @version 1.0
*/
@Data
public class LabelDeleteDTO {
@ApiModelProperty(value = "标签id", required = true)
private Long id;
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.dto.label;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @author Fun Li 2023/8/10 13:28
* @version 1.0
*/
@Data
public class LabelGroupAddDTO {
@ApiModelProperty(value = "标签组名称", required = true)
private @NotBlank(message = "镖标签组名称不能为空")
String labelGroupName;
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.dto.label;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fun Li 2023/8/10 13:29
* @version 1.0
*/
@Data
public class LabelGroupDeleteDTO {
@ApiModelProperty("id")
private Long id;
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.dto.label;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author Fun Li 2023/8/10 13:29
* @version 1.0
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class LabelGroupListDTO extends PageBasicInfo {
@ApiModelProperty(value = "标签组名称", required = false)
private String labelGroupName;
}

View File

@@ -0,0 +1,22 @@
package com.cool.store.dto.label;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @author Fun Li 2023/8/10 13:30
* @version 1.0
*/
@Data
public class LabelGroupUpdateDTO {
@ApiModelProperty(value = "id", required = true)
private Long id;
@ApiModelProperty(value = "标签组名称", required = true)
private @NotBlank(message = "标签组名称不能为空")
String labelGroupName;
}

View File

@@ -0,0 +1,22 @@
package com.cool.store.dto.label;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author Fun Li 2023/8/10 14:46
* @version 1.0
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class LabelListDTO extends PageBasicInfo {
@ApiModelProperty(value = "标签名称")
private String labelName;
@ApiModelProperty(value = "标签组id")
private Long labelGroupId;
}

View File

@@ -0,0 +1,22 @@
package com.cool.store.dto.label;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fun Li 2023/8/10 16:03
* @version 1.0
*/
@Data
public class LabelUpdateDTO {
@ApiModelProperty(value = "标签id", required = true)
private Long id;
@ApiModelProperty(value = "标签名称", required = true)
private String labelName;
@ApiModelProperty(value = "标签组id", required = true)
private Long labelGroupId;
}

View File

@@ -19,6 +19,8 @@ public class PartnerIntentApplyInfoDTO {
@ApiModelProperty("加盟商用户名称") @ApiModelProperty("加盟商用户名称")
private String partnerUserName; private String partnerUserName;
private String mobile;
@ApiModelProperty("hy_partner_user_info.partner_id") @ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId; private String partnerId;
@@ -46,4 +48,17 @@ public class PartnerIntentApplyInfoDTO {
@ApiModelProperty("子流程状态") @ApiModelProperty("子流程状态")
private String workflowStatus; private String workflowStatus;
@ApiModelProperty("上次跟进时间")
private String lastFollowTime;
@ApiModelProperty("接通状态")
private Integer callStatus;
@ApiModelProperty("来源名称")
private String userChannelName;
private Integer userChannelId;
private String userPortrait;
} }

View File

@@ -61,4 +61,12 @@ public class PartnerInterviewInfoDTO {
@ApiModelProperty("过程信息") @ApiModelProperty("过程信息")
private String processInfo; private String processInfo;
@ApiModelProperty("上次跟进时间")
private Date lastFollowTime;
@ApiModelProperty("接通状态")
private Integer callStatus;
private String userPortrait;
} }

View File

@@ -77,4 +77,8 @@ public class PrivateSeaLineDTO {
private String recommendPartnerMobile; private String recommendPartnerMobile;
private Integer userChannelId;
private String userPortrait;
} }

View File

@@ -29,4 +29,8 @@ public class PublicSeaLineDTO {
private Date updateTime; private Date updateTime;
private String phoneAddress; private String phoneAddress;
private Integer userChannelId;
private String userPortrait;
} }

View File

@@ -0,0 +1,17 @@
package com.cool.store.dto.partner;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/8/10 11:12
* @Version 1.0
*/
@Data
public class UserChannelDTO {
private Long userChannelId;
private String userChannelName;
}

View File

@@ -0,0 +1,71 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author zhangchenbiao
* @date 2023-08-11 01:03
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CallRecordDO implements Serializable {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("线索id")
private Long partnerLineId;
@ApiModelProperty("请求编号")
private String transNo;
@ApiModelProperty("呼出人手机号")
private String outgoingMobile;
@ApiModelProperty("呼出人用户id")
private String outgoingUserId;
@ApiModelProperty("接听人手机号")
private String incomingMobile;
@ApiModelProperty("接听人用户id")
private String incomingUserId;
@ApiModelProperty("通话开始时间")
private Date callStartTime;
@ApiModelProperty("通话结束时间")
private Date callEndTime;
@ApiModelProperty("录音地址")
private String recordUrl;
@ApiModelProperty("0.待呼叫1.呼叫接听2.呼叫未接听3.呼叫失败")
private Integer callStatus;
@ApiModelProperty("失败原因")
private String failReason;
@ApiModelProperty("创建人")
private String creater;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新人")
private String updater;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("备注")
private String remark;
}

View File

@@ -25,6 +25,9 @@ public class HyOutboundMobileDO {
@ApiModelProperty("") @ApiModelProperty("")
private String mobile; private String mobile;
@ApiModelProperty("编辑人user_identerprise_user.user_id")
private String editUserId;
@ApiModelProperty("备注(保留字段)") @ApiModelProperty("备注(保留字段)")
private String remark; private String remark;

View File

@@ -0,0 +1,52 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author Fun Li
* @date 2023/08/10
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HyPartnerLabelDO {
@ApiModelProperty("")
private Long id;
@ApiModelProperty("标签组id hy_partner_label_group.id")
private Long labelGroupId;
@ApiModelProperty("标签名")
private String labelName;
@ApiModelProperty("编辑人user_identerprise_user.user_id")
private String editUserId;
@ApiModelProperty("编辑时间")
private Date editDate;
@ApiModelProperty("删除标识")
private Boolean deleted;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("创建人")
private String createUserId;
@ApiModelProperty("更新人")
private String updateUserId;
@ApiModelProperty("备注")
private String remark;
}

View File

@@ -0,0 +1,52 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author Fun Li 2023/8/10 13:31
* @version 1.0
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HyPartnerLabelGroupDO {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("标签组名称")
private String labelGroupName;
@ApiModelProperty("删除标识")
private Boolean deleted;
@ApiModelProperty("编辑人user_identerprise_user.user_id")
private String editUserId;
@ApiModelProperty("编辑时间")
private Date editDate;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("创建人enterprise_user.user_id")
private String createUserId;
@ApiModelProperty("更新人enterprise_user.user_id")
private String updateUserId;
@ApiModelProperty("备注")
private String remark;
}

View File

@@ -3,6 +3,8 @@ package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;

View File

@@ -18,5 +18,5 @@ public class AddTagsRequest {
@ApiModelProperty("加盟申请基本信息ID") @ApiModelProperty("加盟申请基本信息ID")
private Long partnerBaseInfoId; private Long partnerBaseInfoId;
@ApiModelProperty("标签列表") @ApiModelProperty("标签列表")
private List<String> Tags; private List<Long> Tags;
} }

View File

@@ -0,0 +1,21 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/8/11 14:30
* @Version 1.0
*/
@Data
@ApiModel
public class BatchTransferInvestmentManagerRequest {
private List<Long> lineIds;
private String userId;
}

View File

@@ -0,0 +1,30 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-08-11 15:46
* @Description:
*/
@Data
@ApiModel(description = "呼叫信息")
public class CallFinishBackReq {
@ApiModelProperty(value = "请求编号", required = true)
private String transNo;
@ApiModelProperty(value = "呼叫状态: 1-呼叫接听, 2-呼叫未接听, 3-呼叫失败", required = true)
private Integer callStatus;
@ApiModelProperty(value = "呼叫失败的情况下必传,说明呼叫失败的原因")
private String failReason;
@ApiModelProperty(value = "呼叫接听情况下必传通话开始时间格式yyyy-MM-dd HH:mm:ss")
private String callStartTime;
@ApiModelProperty(value = "呼叫接听情况下必传通话结束时间格式yyyy-MM-dd HH:mm:ss")
private String callEndTime;
}

View File

@@ -0,0 +1,17 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "呼叫记录信息")
public class CallRecordBackReq {
@ApiModelProperty(value = "请求编号", required = true)
private String transNo;
@ApiModelProperty(value = "录音上传地址", required = true)
private String recordUrl;
}

View File

@@ -0,0 +1,29 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-08-10 19:24
* @Description:
*/
@Data
@ApiModel
public class CallUpReq {
@ApiModelProperty(value = "线索id", required = true)
private String lineId;
@ApiModelProperty(value = "呼出人用户id", required = true)
private String outgoingUserId;
@ApiModelProperty(value = "呼出人手机号", required = true)
private String outgoingMobile;
@ApiModelProperty(value = "接听人用户id", required = true)
private String incomingUserId;
@ApiModelProperty(value = "接听人手机号", required = true)
private String incomingMobile;
}

View File

@@ -0,0 +1,30 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Fun Li 2023/8/10 13:33
* @version 1.0
*/
@Data
public class LabelGroupListVo {
@ApiModelProperty("标签组id")
private long id;
@ApiModelProperty("标签组名称")
private String labelGroupName;
@ApiModelProperty("编辑人姓名")
private String editName;
@ApiModelProperty("编辑人电话")
private String editMobile;
@ApiModelProperty("编辑时间")
private Date editDate;
}

View File

@@ -0,0 +1,36 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Fun Li 2023/8/10 14:42
* @version 1.0
*/
@Data
public class LabelListVo {
@ApiModelProperty(value = "标签名称")
private String labelName;
@ApiModelProperty(value = "标签组名称")
private String labelGroupName;
@ApiModelProperty(value = "编辑人姓名")
private String editName;
@ApiModelProperty(value = "编辑人电话")
private String editMobile;
@ApiModelProperty(value = "编辑时间")
private Date editDate;
@ApiModelProperty(value = "标签id")
private Long id;
@ApiModelProperty(value = "标签分组id")
private Long labelGroupId;
}

View File

@@ -8,8 +8,11 @@ import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -23,6 +26,7 @@ import java.util.Map;
*/ */
@Data @Data
@ApiModel @ApiModel
@Slf4j
public class PartnerIntentApplyInfoVO { public class PartnerIntentApplyInfoVO {
@ApiModelProperty("") @ApiModelProperty("")
@@ -61,8 +65,20 @@ public class PartnerIntentApplyInfoVO {
@ApiModelProperty("阶段状态") @ApiModelProperty("阶段状态")
private String WorkflowStatus; private String WorkflowStatus;
@ApiModelProperty("用户画像")
private List<String> userPortraitList;
public static List<PartnerIntentApplyInfoVO> convertList(List<PartnerIntentApplyInfoDTO> list, Map<String, HyPartnerUserInfoDO> infoDOMap, Map<String, String> wantShopAreaNameMap, String workflowStatus){ @ApiModelProperty("上次跟进时间")
private String lastFollowTime;
@ApiModelProperty("接通状态")
private Integer callStatus;
@ApiModelProperty("来源名称")
private String userChannelName;
public static List<PartnerIntentApplyInfoVO> convertList(List<PartnerIntentApplyInfoDTO> list, Map<String, String> wantShopAreaNameMap, String workflowStatus,
Map<Long, String> userChannelMap,Map<Long,String> userPortraitMap ){
if(CollectionUtils.isEmpty(list)){ if(CollectionUtils.isEmpty(list)){
return Lists.newArrayList(); return Lists.newArrayList();
} }
@@ -78,11 +94,34 @@ public class PartnerIntentApplyInfoVO {
partnerIntentApplyInfoVO.setWantShopArea(partnerIntentApplyInfoDTO.getWantShopArea()); partnerIntentApplyInfoVO.setWantShopArea(partnerIntentApplyInfoDTO.getWantShopArea());
String deadLine = DateUtil.format(partnerIntentApplyInfoDTO.getDeadline(), CoolDateUtils.DATE_FORMAT_SEC_2); String deadLine = DateUtil.format(partnerIntentApplyInfoDTO.getDeadline(), CoolDateUtils.DATE_FORMAT_SEC_2);
partnerIntentApplyInfoVO.setDeadline(deadLine); partnerIntentApplyInfoVO.setDeadline(deadLine);
HyPartnerUserInfoDO infoDOMapOrDefault = infoDOMap.getOrDefault(partnerIntentApplyInfoDTO.getPartnerId(), new HyPartnerUserInfoDO()); partnerIntentApplyInfoVO.setPartnerUserName(partnerIntentApplyInfoDTO.getPartnerUserName());
partnerIntentApplyInfoVO.setPartnerUserName(infoDOMapOrDefault.getUsername()); partnerIntentApplyInfoVO.setPartnerUserPhone(partnerIntentApplyInfoDTO.getMobile());
partnerIntentApplyInfoVO.setPartnerUserPhone(infoDOMapOrDefault.getMobile());
partnerIntentApplyInfoVO.setWorkflowStatus(workflowStatus); partnerIntentApplyInfoVO.setWorkflowStatus(workflowStatus);
partnerIntentApplyInfoVO.setWantShopAreaName(wantShopAreaNameMap.get(partnerIntentApplyInfoDTO.getWantShopArea())); partnerIntentApplyInfoVO.setWantShopAreaName(wantShopAreaNameMap.get(partnerIntentApplyInfoDTO.getWantShopArea()));
partnerIntentApplyInfoVO.setLastFollowTime(partnerIntentApplyInfoDTO.getLastFollowTime());
Integer callStatus = null;
if(partnerIntentApplyInfoDTO.getCallStatus()!=null){
callStatus = partnerIntentApplyInfoDTO.getCallStatus()==1?partnerIntentApplyInfoDTO.getCallStatus():0;
}
partnerIntentApplyInfoVO.setCallStatus(callStatus);
partnerIntentApplyInfoVO.setUserChannelName(userChannelMap.getOrDefault(partnerIntentApplyInfoDTO.getUserChannelId(),""));
List<String> userPortraitList= new ArrayList<>();
if(StringUtils.isNotEmpty(partnerIntentApplyInfoDTO.getUserPortrait())){
String[] parts = partnerIntentApplyInfoDTO.getUserPortrait().split(",");
for (String part : parts) {
String trimmedPart = part.trim();
if (!trimmedPart.isEmpty()) {
try {
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
} catch (NumberFormatException e) {
log.info("Invalid format: {}" , trimmedPart);
}
}
}
}
partnerIntentApplyInfoVO.setUserPortraitList(userPortraitList);
resultList.add(partnerIntentApplyInfoVO); resultList.add(partnerIntentApplyInfoVO);
} }
return resultList; return resultList;

View File

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @Author suzhuhong * @Author suzhuhong
@@ -71,4 +72,16 @@ public class PartnerInterviewInfoVO {
@ApiModelProperty("审批发起时间") @ApiModelProperty("审批发起时间")
private String approveTime; private String approveTime;
@ApiModelProperty("用户画像")
private List<String> userPortraitList;
@ApiModelProperty("上次跟进时间")
private String lastFollowTime;
@ApiModelProperty("接通状态")
private Integer callStatus;
@ApiModelProperty("来源名称")
private String userChannelName;
} }

View File

@@ -7,6 +7,8 @@ import com.cool.store.utils.CoolDateUtils;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import java.util.ArrayList; import java.util.ArrayList;
@@ -21,6 +23,7 @@ import java.util.Map;
*/ */
@Data @Data
@ApiModel @ApiModel
@Slf4j
public class PrivateSeaLineListVo { public class PrivateSeaLineListVo {
@@ -92,8 +95,15 @@ public class PrivateSeaLineListVo {
private String investmentManagerMobile; private String investmentManagerMobile;
@ApiModelProperty("用户画像")
private List<String> userPortraitList;
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap,Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap){ @ApiModelProperty("来源名称")
private String userChannelName;
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap,
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap,Map<Long, String> channelMap,Map<Long, String> userPortraitMap){
List<PrivateSeaLineListVo> resultList = new ArrayList<>(); List<PrivateSeaLineListVo> resultList = new ArrayList<>();
for (PrivateSeaLineDTO x : list) { for (PrivateSeaLineDTO x : list) {
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo(); PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();
@@ -127,6 +137,22 @@ public class PrivateSeaLineListVo {
privateSeaLineListVo.setStartTime(hyPartnerInterviewPlanDOMap.getOrDefault(x.getLineId(),new HyPartnerInterviewPlanDO()).getStartTime()); privateSeaLineListVo.setStartTime(hyPartnerInterviewPlanDOMap.getOrDefault(x.getLineId(),new HyPartnerInterviewPlanDO()).getStartTime());
privateSeaLineListVo.setInterviewPlanId(hyPartnerInterviewPlanDOMap.getOrDefault(x.getLineId(),new HyPartnerInterviewPlanDO()).getId()); privateSeaLineListVo.setInterviewPlanId(hyPartnerInterviewPlanDOMap.getOrDefault(x.getLineId(),new HyPartnerInterviewPlanDO()).getId());
privateSeaLineListVo.setDevelopmentManagerName(finalDevManagerMap.get(x.getDevelopmentManager())); privateSeaLineListVo.setDevelopmentManagerName(finalDevManagerMap.get(x.getDevelopmentManager()));
privateSeaLineListVo.setUserChannelName(channelMap.get(x.getUserChannelId()));
List<String> userPortraitList= new ArrayList<>();
if(StringUtils.isNotEmpty(x.getUserPortrait())){
String[] parts = x.getUserPortrait().split(",");
for (String part : parts) {
String trimmedPart = part.trim();
if (!trimmedPart.isEmpty()) {
try {
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
} catch (NumberFormatException e) {
log.info("Invalid format: {}" , trimmedPart);
}
}
}
}
privateSeaLineListVo.setUserPortraitList(userPortraitList);
resultList.add(privateSeaLineListVo); resultList.add(privateSeaLineListVo);
} }
return resultList; return resultList;

View File

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @Author suzhuhong * @Author suzhuhong
@@ -71,4 +72,10 @@ public class PublicSeaLineListVo {
private String updateTime; private String updateTime;
@ApiModelProperty("用户画像")
private List<String> userPortraitList;
@ApiModelProperty("来源名称")
private String userChannelName;
} }

View File

@@ -85,6 +85,11 @@
<artifactId>dysmsapi20170525</artifactId> <artifactId>dysmsapi20170525</artifactId>
<version>2.0.1</version> <version>2.0.1</version>
</dependency> </dependency>
<!--websocket作为服务端-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -0,0 +1,182 @@
package com.cool.store.handler;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
@Component
@Slf4j
@ServerEndpoint("/websocket/{tenantId}")
public class WebSocketServer {
/**
* 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
*/
private static int onlineCount = 0;
/**
* concurrent包的线程安全Set用来存放每个客户端对应的WebSocket对象。
*/
private static final ConcurrentHashMap<String, WebSocketServer> webSocketMap = new ConcurrentHashMap<>();
/**
* 与某个客户端的连接会话,需要通过它来给客户端发送数据
*/
private Session session;
/**
* 接收userId
*/
private String tenantId = "";
/**
* 连接建立成
* 功调用的方法
*/
@OnOpen
public void onOpen(Session session, @PathParam("tenantId") String tenantId) {
this.session = session;
this.tenantId = tenantId;
if (webSocketMap.containsKey(tenantId)) {
webSocketMap.remove(tenantId);
//加入set中
webSocketMap.put(tenantId, this);
} else {
//加入set中
webSocketMap.put(tenantId, this);
//在线数加1
addOnlineCount();
}
log.info("用户连接:" + tenantId + ",当前在线人数为:" + getOnlineCount());
sendMessage("连接成功");
}
/**
* 连接关闭
* 调用的方法
*/
@OnClose
public void onClose() {
if (webSocketMap.containsKey(tenantId)) {
webSocketMap.remove(tenantId);
//从set中删除
subOnlineCount();
}
log.info("用户退出:" + tenantId + ",当前在线人数为:" + getOnlineCount());
}
/**
* 收到客户端消
* 息后调用的方法
*
* @param message 客户端发送过来的消息
**/
@OnMessage
public void onMessage(String message, Session session) {
log.info("用户消息:" + tenantId + ",报文:" + message);
//可以群发消息
//消息保存到数据库、redis
if (StringUtils.isNotBlank(message)) {
try {
//解析发送的报文
JSONObject jsonObject = JSON.parseObject(message);
//追加发送人(防止串改)
jsonObject.put("fromUserId", this.tenantId);
String toUserId = jsonObject.getString("toUserId");
//传送给对应toUserId用户的websocket
if (StringUtils.isNotBlank(toUserId) && webSocketMap.containsKey(toUserId)) {
webSocketMap.get(toUserId).sendMessage(message);
} else {
//否则不在这个服务器上发送到mysql或者redis
log.error("请求的userId:" + toUserId + "不在该服务器上");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* @param session Session
* @param error Throwable
*/
@OnError
public void onError(Session session, Throwable error) {
log.error("用户错误:" + this.tenantId + ",原因:" + error.getMessage());
error.printStackTrace();
}
/**
* 实现服务
* 器主动推送
*/
public boolean sendMessage(String message) {
boolean flag = false;
try {
this.session.getBasicRemote().sendText(message);
flag = true;
} catch (IOException e) {
log.error("发送消息失败:" + this.tenantId + ",原因:" + e.getMessage());
e.printStackTrace();
}
return flag;
}
/**
* 发送自定
* 义消息
**/
public static boolean sendInfo(String message, String tenantId) {
boolean flag = false;
log.info("发送消息到:" + tenantId + ",报文:" + message);
if (StringUtils.isNotBlank(tenantId) && webSocketMap.containsKey(tenantId)) {
webSocketMap.get(tenantId).sendMessage(message);
flag = true;
} else {
log.error("用户" + tenantId + ",不在线!");
}
return flag;
}
/**
* 获得此时的
* 在线人数
*
* @return int
*/
public static synchronized int getOnlineCount() {
return onlineCount;
}
/**
* 在线人
* 数加1
*/
public static synchronized void addOnlineCount() {
WebSocketServer.onlineCount++;
}
/**
* 在线人
* 数减1
*/
public static synchronized void subOnlineCount() {
WebSocketServer.onlineCount--;
}
/**
* 判断用户是否在线
* @param tenantId
* @return
*/
public static boolean isOnline(String tenantId) {
return webSocketMap.containsKey(tenantId);
}
}

View File

@@ -0,0 +1,17 @@
package com.cool.store.service;
import com.cool.store.exception.ApiException;
import com.cool.store.request.CallFinishBackReq;
import com.cool.store.request.CallRecordBackReq;
import com.cool.store.request.CallUpReq;
/**
* @Author: young.yu
* @Date: 2023-08-10 18:56
* @Description:
*/
public interface CallService {
void callUp(CallUpReq request) throws ApiException;
void callFinishBack(CallFinishBackReq request) throws ApiException;
void callRecordBack(CallRecordBackReq request) throws ApiException;
}

View File

@@ -10,6 +10,8 @@ import com.cool.store.vo.PartnerIntentInfoVO;
import com.cool.store.vo.PartnerUserInfoVO; import com.cool.store.vo.PartnerUserInfoVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import java.util.List;
/** /**
* @Author suzhuhong * @Author suzhuhong
* @Date 2023/6/9 14:54 * @Date 2023/6/9 14:54
@@ -26,7 +28,8 @@ public interface HyPartnerIntentInfoService {
* @param pageNumber * @param pageNumber
* @return * @return
*/ */
PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber); PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber,String keyword, Integer callStatus,
List<String> userPortraitIdList, Long lastFollowStartTime, Long lastFollowEndTime, String userChannelIdList);
/** /**
* 根据线索查询加盟商意向申请信息 * 根据线索查询加盟商意向申请信息

View File

@@ -3,10 +3,7 @@ package com.cool.store.service;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.entity.HyPartnerLineInfoDO; import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.request.CloseFollowRequest; import com.cool.store.request.*;
import com.cool.store.request.LineRequest;
import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.request.TransferInvestmentManagerRequest;
import com.cool.store.vo.*; import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO; import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@@ -60,6 +57,8 @@ public interface HyPartnerLineInfoService {
*/ */
Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request) throws ApiException; Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request) throws ApiException;
Boolean batchTransferInvestmentManager(LoginUserInfo user, BatchTransferInvestmentManagerRequest request) throws ApiException;
/** /**
* 分配招商经理 * 分配招商经理
* @param userId * @param userId
@@ -117,7 +116,7 @@ public interface HyPartnerLineInfoService {
* @param privateSeaLineListRequest * @param privateSeaLineListRequest
* @return * @return
*/ */
PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest privateSeaLineListRequest) ; PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest privateSeaLineListRequest,Boolean allPrivateSeaFlag) ;
PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId); PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId);

View File

@@ -0,0 +1,21 @@
package com.cool.store.service;
import com.cool.store.dto.partner.UserChannelDTO;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/8/10 11:12
* @Version 1.0
*/
public interface HyPartnerUserChannelService {
/**
* 查询所有的线索来源
* @return
*/
List<UserChannelDTO> queryAllUserChannelList();
}

View File

@@ -0,0 +1,47 @@
package com.cool.store.service;
import com.cool.store.dto.label.LabelGroupAddDTO;
import com.cool.store.dto.label.LabelGroupDeleteDTO;
import com.cool.store.dto.label.LabelGroupListDTO;
import com.cool.store.dto.label.LabelGroupUpdateDTO;
import com.cool.store.exception.ApiException;
import com.cool.store.vo.LabelGroupListVo;
import java.util.List;
/**
* @author Fun Li 2023/8/10 13:34
* @version 1.0
*/
public interface LabelGroupService {
/**
* 查询标签组信息列表
* @param dto 查询条件
*/
List<LabelGroupListVo> getLabelGroupList(LabelGroupListDTO dto);
/**
* 添加标签组
* @param dto 新增标签组信息
*/
void addLabelGroup(LabelGroupAddDTO dto) throws ApiException;
/**
* 修改标签组信息
* @param dto 修改内容
*/
void updateLabelGroup(LabelGroupUpdateDTO dto);
/**
* 删除标签组
* @param dto 待删除标签组信息
*/
void deleteLabelGroup(LabelGroupDeleteDTO dto) throws ApiException;
/**
* 获取所有标签组
*/
List<LabelGroupListVo> getAllLabelGroupList();
}

View File

@@ -0,0 +1,58 @@
package com.cool.store.service;
import com.cool.store.dto.label.LabelAddDTO;
import com.cool.store.dto.label.LabelDeleteDTO;
import com.cool.store.dto.label.LabelListDTO;
import com.cool.store.dto.label.LabelUpdateDTO;
import com.cool.store.exception.ApiException;
import com.cool.store.vo.LabelListVo;
import java.util.List;
import java.util.Map;
/**
* @author Fun Li 2023/8/10 14:23
* @version 1.0
*/
public interface LabelService {
/**
* 获取数组列表
*
* @param dto 查询条件
*/
List<LabelListVo> getLabelList(LabelListDTO dto);
/**
* 添加标签组
* @param dto 新增标签组信息
*/
void addLabel(LabelAddDTO dto) throws ApiException;
/**
* 标签MAP
* @param userPortraitStrList
* @return
*/
Map<Long,String> getUserPortraitMap(List<String> userPortraitStrList);
/**
* 查询标签中文名称集合
* @param userPortraitMap
* @param userPortraitStr
* @return
*/
List<String> getUserPortraitList(Map<Long,String> userPortraitMap,String userPortraitStr);
/**
* 修改标签信息
* @param dto 新标签信息
*/
void updateLabel(LabelUpdateDTO dto) throws ApiException;
/**
* 删除标签
* @param dto
*/
void deleteLabel(LabelDeleteDTO dto);
}

View File

@@ -0,0 +1,109 @@
package com.cool.store.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.UUID;
import com.alibaba.fastjson.JSON;
import com.cool.store.dto.call.CallUpDTO;
import com.cool.store.entity.CallRecordDO;
import com.cool.store.enums.CallStatusEnum;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.handler.WebSocketServer;
import com.cool.store.mapper.CallRecordMapper;
import com.cool.store.mapper.HyOutboundMobileMapper;
import com.cool.store.request.CallFinishBackReq;
import com.cool.store.request.CallRecordBackReq;
import com.cool.store.request.CallUpReq;
import com.cool.store.service.CallService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
* @Author: young.yu
* @Date: 2023-08-10 18:58
* @Description:
*/
@Slf4j
@Service
public class CallServiceImpl implements CallService {
@Autowired
private CallRecordMapper callRecordMapper;
@Autowired
private HyOutboundMobileMapper hyOutboundMobileMapper;
@Override
public void callUp(CallUpReq request) throws ApiException {
try {
//校验拨出手机号APP是否在线
boolean isOnline = WebSocketServer.isOnline(request.getOutgoingMobile());
if (!isOnline) {
throw new ApiException(ErrorCodeEnum.MOBILE_APP_NOT_ONLINE_ERROR);
}
CallRecordDO callRecordDO = new CallRecordDO();
callRecordDO.setOutgoingMobile(request.getOutgoingMobile());
callRecordDO.setIncomingMobile(request.getIncomingMobile());
callRecordDO.setOutgoingUserId(request.getOutgoingUserId());
callRecordDO.setIncomingUserId(request.getIncomingUserId());
callRecordDO.setPartnerLineId(Long.valueOf(request.getLineId()));
//请求id
String transNo = UUID.fastUUID().toString().replace("-", "");
callRecordDO.setTransNo(transNo);
callRecordDO.setCreater(request.getOutgoingUserId());
callRecordDO.setCreateTime(new Date());
callRecordDO.setCallStatus(CallStatusEnum.PENDING_CALL.getCode());
//发起app通话请求
CallUpDTO callUpDTO = new CallUpDTO();
callUpDTO.setTransNo(transNo);
callUpDTO.setOutgoingMobile(request.getOutgoingMobile());
callUpDTO.setIncomingMobile(request.getIncomingMobile());
boolean sendFlag = WebSocketServer.sendInfo(JSON.toJSONString(callUpDTO), callRecordDO.getOutgoingMobile());
if (!sendFlag) {
throw new ApiException(ErrorCodeEnum.CREATE_CALL_REQUEST_ERROR);
}
//保存通话记录
callRecordMapper.insertSelective(callRecordDO);
} catch (Exception e) {
log.error("callUp error, request:{}", JSON.toJSONString(request), e);
throw new ApiException(ErrorCodeEnum.CALL_UP_ERROR);
}
}
@Override
public void callFinishBack(CallFinishBackReq request) throws ApiException {
CallRecordDO callRecordDO = callRecordMapper.selectByTransNo(request.getTransNo());
//校验通话记录是否存在
if(callRecordDO == null){
throw new ApiException(ErrorCodeEnum.CALL_RECORD_NOT_EXIST_ERROR);
}
callRecordDO.setCallStatus(request.getCallStatus());
callRecordDO.setFailReason(request.getFailReason());
callRecordDO.setUpdater("system-app");
callRecordDO.setUpdateTime(new Date());
if(StringUtils.isNotEmpty(request.getCallStartTime())&&StringUtils.isNotEmpty(request.getCallEndTime())){
callRecordDO.setCallStartTime(DateUtil.parse(request.getCallStartTime()));
callRecordDO.setCallEndTime(DateUtil.parse(request.getCallEndTime()));
}
callRecordMapper.updateByTransNoSelective(callRecordDO);
}
@Override
public void callRecordBack(CallRecordBackReq request) throws ApiException {
CallRecordDO callRecordDO = callRecordMapper.selectByTransNo(request.getTransNo());
//校验通话记录是否存在
if(callRecordDO == null){
throw new ApiException(ErrorCodeEnum.CALL_RECORD_NOT_EXIST_ERROR);
}
callRecordDO.setRecordUrl(request.getRecordUrl());
callRecordDO.setUpdater("system-app");
callRecordDO.setUpdateTime(new Date());
callRecordMapper.updateByTransNoSelective(callRecordDO);
}
}

View File

@@ -47,6 +47,7 @@ public class HyOutboundServiceImpl implements HyOutboundService {
String userId = CurrentUserHolder.getUserId(); String userId = CurrentUserHolder.getUserId();
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO(); HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
hyOutboundMobile.setMobile(dto.getOutboundNumber()); hyOutboundMobile.setMobile(dto.getOutboundNumber());
hyOutboundMobile.setEditUserId(userId);
hyOutboundMobile.setCreateUserId(userId); hyOutboundMobile.setCreateUserId(userId);
hyOutboundMobile.setUpdateUserId(userId); hyOutboundMobile.setUpdateUserId(userId);
outboundMobileMapper.insertSelective(hyOutboundMobile); outboundMobileMapper.insertSelective(hyOutboundMobile);
@@ -65,7 +66,7 @@ public class HyOutboundServiceImpl implements HyOutboundService {
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO(); HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
hyOutboundMobile.setId(dto.getId()); hyOutboundMobile.setId(dto.getId());
hyOutboundMobile.setMobile(dto.getNewOutboundNumber()); hyOutboundMobile.setMobile(dto.getNewOutboundNumber());
hyOutboundMobile.setCreateUserId(userId); hyOutboundMobile.setEditUserId(userId);
hyOutboundMobile.setUpdateUserId(userId); hyOutboundMobile.setUpdateUserId(userId);
outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile); outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile);
} }
@@ -77,7 +78,9 @@ public class HyOutboundServiceImpl implements HyOutboundService {
@Override @Override
public void deleteOutboundNumber(DeleteNumberDTO dto) { public void deleteOutboundNumber(DeleteNumberDTO dto) {
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO(); HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
String userId = CurrentUserHolder.getUserId();
hyOutboundMobile.setId(dto.getId()); hyOutboundMobile.setId(dto.getId());
hyOutboundMobile.setUpdateUserId(userId);
hyOutboundMobile.setDeleted(true); hyOutboundMobile.setDeleted(true);
outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile); outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile);
} }

View File

@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.constants.RedisConstant; import com.cool.store.constants.RedisConstant;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
@@ -36,6 +37,7 @@ import javax.annotation.Resource;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.stream.Collectors;
/** /**
* @Author suzhuhong * @Author suzhuhong
@@ -91,7 +93,8 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
throw new ServiceException(ErrorCodeEnum.PARTNER_BASE_INFO_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.PARTNER_BASE_INFO_NOT_EXIST);
} }
hyPartnerBaseInfo.setId(addTagsRequest.getPartnerBaseInfoId()); hyPartnerBaseInfo.setId(addTagsRequest.getPartnerBaseInfoId());
hyPartnerBaseInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())? JSONObject.toJSONString(addTagsRequest.getTags()):""); hyPartnerBaseInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hyPartnerBaseInfo); hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hyPartnerBaseInfo);
HyPartnerLineInfoDO line = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerBaseInfo.getPartnerId()); HyPartnerLineInfoDO line = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerBaseInfo.getPartnerId());
//添加日志 //添加日志

View File

@@ -15,14 +15,13 @@ import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyPartnerLabelMapper;
import com.cool.store.mapper.HyPartnerUserChannelMapper;
import com.cool.store.request.BaseUserInfoRequest; import com.cool.store.request.BaseUserInfoRequest;
import com.cool.store.request.IndustryCognitionInfoRequest; import com.cool.store.request.IndustryCognitionInfoRequest;
import com.cool.store.request.PartnerIntentInfoRequest; import com.cool.store.request.PartnerIntentInfoRequest;
import com.cool.store.request.PartnerWantShopInfoRequest; import com.cool.store.request.PartnerWantShopInfoRequest;
import com.cool.store.service.HyPartnerIntentInfoService; import com.cool.store.service.*;
import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.HyPhoneLocationService;
import com.cool.store.service.LogService;
import com.cool.store.utils.CoolDateUtils; import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.RedisUtilPool; import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.StringUtil; import com.cool.store.utils.StringUtil;
@@ -73,12 +72,16 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO; HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
@Autowired @Autowired
private LogService logService; private LogService logService;
@Resource
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
@Resource
LabelService labelService;
@Autowired @Autowired
private NoticeService noticeService; private NoticeService noticeService;
@Override @Override
public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber) { public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber,String keyword, Integer callStatus,
List<String> userPortraitIdList, Long lastFollowStartTime, Long lastFollowEndTime, String userChannelIdList) {
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = new PartnerIntentApplyInfoVO(); PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = new PartnerIntentApplyInfoVO();
String workflowStatus = ""; String workflowStatus = "";
if (CommonConstants.PENDING.equals(type)) { if (CommonConstants.PENDING.equals(type)) {
@@ -87,22 +90,35 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
if (CommonConstants.FOLLOW.equals(type)) { if (CommonConstants.FOLLOW.equals(type)) {
workflowStatus = WorkflowStatusEnum.INTENT_0.getCode(); workflowStatus = WorkflowStatusEnum.INTENT_0.getCode();
} }
String lastFollowStartTimeStr = null;
String lastFollowEndTimeStr = null;
if (lastFollowStartTime!=null||lastFollowEndTime!=null){
lastFollowStartTimeStr = DateUtil.format(new Date(lastFollowStartTime), CoolDateUtils.DATE_FORMAT_SEC);
lastFollowEndTimeStr = DateUtil.format(new Date(lastFollowEndTime), CoolDateUtils.DATE_FORMAT_SEC);
}
PageHelper.startPage(pageNumber,pageSize); PageHelper.startPage(pageNumber,pageSize);
PageInfo partnerIntentApplyInfo = new PageInfo(hyPartnerIntentInfoDAO.selectPartnerIntentApplyInfoList(userId, WorkflowStageEnum.INTENT.getCode(), workflowStatus)); PageInfo partnerIntentApplyInfo = new PageInfo(hyPartnerIntentInfoDAO.selectPartnerIntentApplyInfoList(userId, WorkflowStageEnum.INTENT.getCode(), workflowStatus,keyword
,callStatus,userPortraitIdList,lastFollowStartTimeStr,lastFollowEndTimeStr,userChannelIdList));
if (partnerIntentApplyInfo==null){ if (partnerIntentApplyInfo==null){
return new PageInfo<>(); return new PageInfo<>();
} }
List<PartnerIntentApplyInfoDTO> list = partnerIntentApplyInfo.getList(); List<PartnerIntentApplyInfoDTO> list = partnerIntentApplyInfo.getList();
List<String> partnerIds = list.stream().map(PartnerIntentApplyInfoDTO::getPartnerId).collect(Collectors.toList()); List<Integer> userChannelIds = list.stream().filter(x -> x.getUserChannelId() != null).map(PartnerIntentApplyInfoDTO::getUserChannelId).collect(Collectors.toList());
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds); List<HyPartnerUserChannelDO> userChannelList = new ArrayList<>();
Map<String, HyPartnerUserInfoDO> infoDOMap = hyPartnerUserInfoDOS.stream().collect(Collectors.toMap(HyPartnerUserInfoDO::getPartnerId, data -> data)); if (CollectionUtils.isNotEmpty(userChannelIds)){
userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
}
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PartnerIntentApplyInfoDTO::getUserPortrait).collect(Collectors.toList());
Map<Long, String> userChannelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
List<Long> wantShopAreaList = list.stream().filter(x->StringUtils.isNotEmpty(x.getWantShopArea())).map(PartnerIntentApplyInfoDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList()); List<Long> wantShopAreaList = list.stream().filter(x->StringUtils.isNotEmpty(x.getWantShopArea())).map(PartnerIntentApplyInfoDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList());
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList); Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
List<PartnerIntentApplyInfoVO> resultList = PartnerIntentApplyInfoVO.convertList(list, infoDOMap, wantShopAreaNameMap, workflowStatus); List<PartnerIntentApplyInfoVO> resultList = PartnerIntentApplyInfoVO.convertList(list, wantShopAreaNameMap, workflowStatus,userChannelMap,labelService.getUserPortraitMap(userPortraitList));
partnerIntentApplyInfo.setList(resultList); partnerIntentApplyInfo.setList(resultList);
return partnerIntentApplyInfo; return partnerIntentApplyInfo;
} }
@Override @Override
public Boolean updatePartnerIntentInfo(LoginUserInfo userInfo, BaseUserInfoRequest baseUserInfoRequest) { public Boolean updatePartnerIntentInfo(LoginUserInfo userInfo, BaseUserInfoRequest baseUserInfoRequest) {

View File

@@ -5,6 +5,7 @@ import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.*; import com.cool.store.dao.*;
import com.cool.store.dto.message.RemindInterviewMsgDTO; import com.cool.store.dto.message.RemindInterviewMsgDTO;
import com.cool.store.dto.message.SendCardMessageDTO; import com.cool.store.dto.message.SendCardMessageDTO;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PartnerInterviewInfoDTO; import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.MessageTypeEnum; import com.cool.store.enums.MessageTypeEnum;
@@ -16,11 +17,13 @@ import com.cool.store.http.ISVHttpRequest;
import com.cool.store.mapper.HyPartnerInterviewMapper; import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper; import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.mapper.HyPartnerLineInfoMapper; import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.mapper.HyPartnerUserChannelMapper;
import com.cool.store.request.CloseFollowRequest; import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.GetInterviewListReq; import com.cool.store.request.GetInterviewListReq;
import com.cool.store.service.HyPartnerInterviewPlanService; import com.cool.store.service.HyPartnerInterviewPlanService;
import com.cool.store.service.HyPartnerLineInfoService; import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.InterviewService; import com.cool.store.service.InterviewService;
import com.cool.store.service.LabelService;
import com.cool.store.utils.CoolDateUtils; import com.cool.store.utils.CoolDateUtils;
import com.cool.store.vo.InterviewDetailInfoVO; import com.cool.store.vo.InterviewDetailInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO; import com.cool.store.vo.PartnerInterviewInfoVO;
@@ -78,6 +81,10 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
@Autowired @Autowired
private InterviewService interviewService; private InterviewService interviewService;
@Resource
LabelService labelService;
@Resource
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
@Value("${feishu.notice.link.url:null}") @Value("${feishu.notice.link.url:null}")
@@ -129,6 +136,9 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
List<PartnerInterviewInfoVO> result = new ArrayList<>(); List<PartnerInterviewInfoVO> result = new ArrayList<>();
List<String> partnerIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerId).collect(Collectors.toList()); List<String> partnerIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerId).collect(Collectors.toList());
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds); List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds);
List<Integer> userChannelIds = hyPartnerUserInfoDOS.stream().filter(x -> x.getUserChannelId() != null).map(HyPartnerUserInfoDO::getUserChannelId).collect(Collectors.toList());
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
List<String> interviewerUserIds = list.stream().filter(x-> StringUtils.isNotEmpty(x.getInterviewer())).map(PartnerInterviewInfoDTO::getInterviewer).collect(Collectors.toList()); List<String> interviewerUserIds = list.stream().filter(x-> StringUtils.isNotEmpty(x.getInterviewer())).map(PartnerInterviewInfoDTO::getInterviewer).collect(Collectors.toList());
List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserDAO.getUserInfoByUserIds(interviewerUserIds); List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserDAO.getUserInfoByUserIds(interviewerUserIds);
Map<String, EnterpriseUserDO> interviewerUserMap = userInfoByUserIds.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, data -> data)); Map<String, EnterpriseUserDO> interviewerUserMap = userInfoByUserIds.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, data -> data));
@@ -136,8 +146,10 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
List<Long> lineIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerLineId).collect(Collectors.toList()); List<Long> lineIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerLineId).collect(Collectors.toList());
List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS= hyPartnerLineInfoDAO.getHyPartnerLineInfoListByIds(lineIds); List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS= hyPartnerLineInfoDAO.getHyPartnerLineInfoListByIds(lineIds);
Map<Long, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = hyPartnerLineInfoDOS.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getId, data -> data)); Map<Long, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = hyPartnerLineInfoDOS.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getId, data -> data));
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PartnerInterviewInfoDTO::getUserPortrait).collect(Collectors.toList());
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
list.stream().forEach(x->{ list.stream().forEach(x->{
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x); PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x,userPortraitMap,userNameMap.get(x.getPartnerId()),channelMap);
partnerInterviewInfoVO.setPartnerName(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername()); partnerInterviewInfoVO.setPartnerName(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername());
partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile()); partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile());
partnerInterviewInfoVO.setInterviewerName(interviewerUserMap.getOrDefault(x.getInterviewer(),new EnterpriseUserDO()).getName()); partnerInterviewInfoVO.setInterviewerName(interviewerUserMap.getOrDefault(x.getInterviewer(),new EnterpriseUserDO()).getName());
@@ -170,12 +182,17 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
List<String> partnerIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerId).collect(Collectors.toList()); List<String> partnerIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerId).collect(Collectors.toList());
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds); List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds);
Map<String, HyPartnerUserInfoDO> userNameMap = hyPartnerUserInfoDOS.stream().collect(Collectors.toMap(HyPartnerUserInfoDO::getPartnerId, Data->Data)); Map<String, HyPartnerUserInfoDO> userNameMap = hyPartnerUserInfoDOS.stream().collect(Collectors.toMap(HyPartnerUserInfoDO::getPartnerId, Data->Data));
List<Integer> userChannelIds = hyPartnerUserInfoDOS.stream().filter(x -> x.getUserChannelId() != null).map(HyPartnerUserInfoDO::getUserChannelId).collect(Collectors.toList());
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
List<Long> lineIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerLineId).collect(Collectors.toList()); List<Long> lineIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerLineId).collect(Collectors.toList());
List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS= hyPartnerLineInfoDAO.getHyPartnerLineInfoListByIds(lineIds); List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS= hyPartnerLineInfoDAO.getHyPartnerLineInfoListByIds(lineIds);
Map<Long, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = hyPartnerLineInfoDOS.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getId, data -> data)); Map<Long, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = hyPartnerLineInfoDOS.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getId, data -> data));
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PartnerInterviewInfoDTO::getUserPortrait).collect(Collectors.toList());
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
List<PartnerInterviewInfoVO> result = new ArrayList<>(); List<PartnerInterviewInfoVO> result = new ArrayList<>();
list.stream().forEach(x->{ list.stream().forEach(x->{
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x); PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x,userPortraitMap,userNameMap.get(x.getPartnerId()),channelMap);
partnerInterviewInfoVO.setPartnerName(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername()); partnerInterviewInfoVO.setPartnerName(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername());
partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile()); partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile());
partnerInterviewInfoVO.setLineStatus(hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerLineId(),new HyPartnerLineInfoDO()).getLineStatus()); partnerInterviewInfoVO.setLineStatus(hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerLineId(),new HyPartnerLineInfoDO()).getLineStatus());
@@ -310,7 +327,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
* @param partnerInterviewInfoDTO * @param partnerInterviewInfoDTO
* @return * @return
*/ */
private PartnerInterviewInfoVO convertPartnerInterviewInfoDTOToVo(PartnerInterviewInfoDTO partnerInterviewInfoDTO){ private PartnerInterviewInfoVO convertPartnerInterviewInfoDTOToVo(PartnerInterviewInfoDTO partnerInterviewInfoDTO,Map<Long, String> userPortraitMap, HyPartnerUserInfoDO hyPartnerUserInfoDO,Map<Long, String> channelMap){
PartnerInterviewInfoVO partnerInterviewInfoVO = new PartnerInterviewInfoVO(); PartnerInterviewInfoVO partnerInterviewInfoVO = new PartnerInterviewInfoVO();
partnerInterviewInfoVO.setInterviewId(partnerInterviewInfoDTO.getInterviewId()); partnerInterviewInfoVO.setInterviewId(partnerInterviewInfoDTO.getInterviewId());
partnerInterviewInfoVO.setInterviewPlanId(partnerInterviewInfoDTO.getId()); partnerInterviewInfoVO.setInterviewPlanId(partnerInterviewInfoDTO.getId());
@@ -325,6 +342,17 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
partnerInterviewInfoVO.setAuthCode(partnerInterviewInfoDTO.getIntentionContractNo()); partnerInterviewInfoVO.setAuthCode(partnerInterviewInfoDTO.getIntentionContractNo());
partnerInterviewInfoVO.setEndTime(DateUtil.format(partnerInterviewInfoDTO.getEndTime(),CoolDateUtils.DATE_FORMAT_SEC_2)); partnerInterviewInfoVO.setEndTime(DateUtil.format(partnerInterviewInfoDTO.getEndTime(),CoolDateUtils.DATE_FORMAT_SEC_2));
partnerInterviewInfoVO.setApproveTime(DateUtil.format(partnerInterviewInfoDTO.getApproveTime(),CoolDateUtils.DATE_FORMAT_SEC_2)); partnerInterviewInfoVO.setApproveTime(DateUtil.format(partnerInterviewInfoDTO.getApproveTime(),CoolDateUtils.DATE_FORMAT_SEC_2));
partnerInterviewInfoVO.setLastFollowTime(DateUtil.format(partnerInterviewInfoDTO.getLastFollowTime(),CoolDateUtils.DATE_FORMAT_SEC_2));
Integer callStatus = null;
if(partnerInterviewInfoDTO.getCallStatus()!=null){
callStatus = partnerInterviewInfoDTO.getCallStatus()==1?partnerInterviewInfoDTO.getCallStatus():0;
}
partnerInterviewInfoVO.setCallStatus(callStatus);
if (hyPartnerUserInfoDO!=null){
partnerInterviewInfoVO.setUserChannelName(channelMap.get(hyPartnerUserInfoDO.getUserChannelId()));
}
List<String> userPortrait = labelService.getUserPortraitList(userPortraitMap, partnerInterviewInfoDTO.getUserPortrait());
partnerInterviewInfoVO.setUserPortraitList(userPortrait);
return partnerInterviewInfoVO; return partnerInterviewInfoVO;
} }

View File

@@ -15,6 +15,7 @@ import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyPartnerUserChannelMapper;
import com.cool.store.request.*; import com.cool.store.request.*;
import com.cool.store.service.*; import com.cool.store.service.*;
import com.cool.store.utils.CoolDateUtils; import com.cool.store.utils.CoolDateUtils;
@@ -24,6 +25,7 @@ import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO; import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@@ -77,9 +79,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO; HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
@Resource @Resource
HyPhoneLocationService hyPhoneLocationService; HyPhoneLocationService hyPhoneLocationService;
@Resource
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
@Autowired @Autowired
private NoticeService noticeService; private NoticeService noticeService;
@Resource
LabelService labelService;
@Autowired @Autowired
private SmsService smsService; private SmsService smsService;
@@ -103,6 +109,15 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
} }
PartnerLineInfoAndBaseInfoVO partnerLineInfoAndBaseInfoVO = convertPartnerLineInfoAndBaseInfoDTOToVo(partnerLineInfoAndBaseInfoDTO); PartnerLineInfoAndBaseInfoVO partnerLineInfoAndBaseInfoVO = convertPartnerLineInfoAndBaseInfoDTOToVo(partnerLineInfoAndBaseInfoDTO);
String userPortrait = partnerLineInfoAndBaseInfoDTO.getUserPortrait();
if (StringUtils.isNotEmpty(userPortrait)){
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(Arrays.asList(userPortrait));
List<String> userPortraitList = userPortraitMap.values().stream()
.collect(Collectors.toList());
partnerLineInfoAndBaseInfoVO.setUserPortrait(userPortraitList);
}
List<String> userIds = new ArrayList<>(); List<String> userIds = new ArrayList<>();
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getPassUserId())){ if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getPassUserId())){
userIds.add(partnerLineInfoAndBaseInfoDTO.getPassUserId()); userIds.add(partnerLineInfoAndBaseInfoDTO.getPassUserId());
@@ -186,6 +201,24 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override
public Boolean batchTransferInvestmentManager(LoginUserInfo user, BatchTransferInvestmentManagerRequest request) throws ApiException {
if (CollectionUtils.isEmpty(request.getLineIds())||StringUtils.isEmpty(request.getUserId())){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
for (Long lineId:request.getLineIds()) {
TransferInvestmentManagerRequest transferInvestmentManagerRequest = new TransferInvestmentManagerRequest();
transferInvestmentManagerRequest.setUserId(request.getUserId());
transferInvestmentManagerRequest.setLineId(lineId);
try {
this.transferInvestmentManager(user,transferInvestmentManagerRequest);
} catch (ApiException e) {
log.info("transferInvestmentManager_success Transfer_interview_management_failed,lineId:{}",lineId);
}
}
return Boolean.TRUE;
}
@Override @Override
public Boolean allocationInvestmentManager(LoginUserInfo user, List<Long> lineIdList) { public Boolean allocationInvestmentManager(LoginUserInfo user, List<Long> lineIdList) {
if (user==null|| CollectionUtils.isEmpty(lineIdList)){ if (user==null|| CollectionUtils.isEmpty(lineIdList)){
@@ -472,6 +505,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
List<Long> wantShopAreaList = list.stream().map(PublicSeaLineDTO::getWantShopArea).filter(Objects::nonNull).map(Long::parseLong).distinct().collect(Collectors.toList()); List<Long> wantShopAreaList = list.stream().map(PublicSeaLineDTO::getWantShopArea).filter(Objects::nonNull).map(Long::parseLong).distinct().collect(Collectors.toList());
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList); Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
List<Integer> userChannelIds = list.stream().filter(x -> x.getUserChannelId() != null).map(PublicSeaLineDTO::getUserChannelId).collect(Collectors.toList());
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PublicSeaLineDTO::getUserPortrait).collect(Collectors.toList());
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
List<PublicSeaLineListVo> result = new ArrayList<>(); List<PublicSeaLineListVo> result = new ArrayList<>();
list.forEach(x->{ list.forEach(x->{
PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo(); PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo();
@@ -496,6 +536,9 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
String closeTime = DateUtil.format(hy.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC_2); String closeTime = DateUtil.format(hy.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC_2);
publicSeaLineListVo.setLastCloseDate(closeTime); publicSeaLineListVo.setLastCloseDate(closeTime);
publicSeaLineListVo.setLastInvestmentManager(nameMobileMap.get(hy.getInvestmentManager())); publicSeaLineListVo.setLastInvestmentManager(nameMobileMap.get(hy.getInvestmentManager()));
List<String> userPortrait = labelService.getUserPortraitList(userPortraitMap, x.getUserPortrait());
publicSeaLineListVo.setUserPortraitList(userPortrait);
publicSeaLineListVo.setUserChannelName(channelMap.get(x.getUserChannelId()));
result.add(publicSeaLineListVo); result.add(publicSeaLineListVo);
}); });
publicSeaLineList.setList(result); publicSeaLineList.setList(result);
@@ -506,8 +549,12 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
@Override @Override
public PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest request) { public PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest request,Boolean allPrivateSeaFlag) {
UserPositionAndUserScopeDTO userIdsByScope = enterpriseUserService.getUserIdsByScope(userId); //allPrivateSeaFlag 为true的时候 查询全量私海
UserPositionAndUserScopeDTO userIdsByScope = new UserPositionAndUserScopeDTO();
if (!allPrivateSeaFlag){
userIdsByScope = enterpriseUserService.getUserIdsByScope(userId);
}
String intentAreaName = getIntentAreaName(request.getIntentArea()); String intentAreaName = getIntentAreaName(request.getIntentArea());
PageHelper.startPage(request.getPageNum(),request.getPageSize()); PageHelper.startPage(request.getPageNum(),request.getPageSize());
PageInfo privateLineList = new PageInfo(hyPartnerLineInfoDAO.getPrivateSeaLineList(request.getKeyword(), request.getKeywordType(), request.getWorkflowStage(), PageInfo privateLineList = new PageInfo(hyPartnerLineInfoDAO.getPrivateSeaLineList(request.getKeyword(), request.getKeywordType(), request.getWorkflowStage(),
@@ -530,7 +577,15 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
} }
List<Long> wantShopAreaList = list.stream().filter(x->StringUtils.isNotEmpty(x.getWantShopArea())).map(PrivateSeaLineDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList()); List<Long> wantShopAreaList = list.stream().filter(x->StringUtils.isNotEmpty(x.getWantShopArea())).map(PrivateSeaLineDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList());
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList); Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap,hyPartnerInterviewPlanDOMap);
List<Integer> userChannelIds = list.stream().filter(x -> x.getUserChannelId() != null).map(PrivateSeaLineDTO::getUserChannelId).collect(Collectors.toList());
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PrivateSeaLineDTO::getUserPortrait).collect(Collectors.toList());
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap,hyPartnerInterviewPlanDOMap,channelMap,userPortraitMap);
privateLineList.setList(result); privateLineList.setList(result);
return privateLineList; return privateLineList;
} }
@@ -806,9 +861,6 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
partnerLineInfoAndBaseInfoVO.setId(partnerLineInfoAndBaseInfoDTO.getId()); partnerLineInfoAndBaseInfoVO.setId(partnerLineInfoAndBaseInfoDTO.getId());
partnerLineInfoAndBaseInfoVO.setPartnerUserId(partnerLineInfoAndBaseInfoDTO.getPartnerId()); partnerLineInfoAndBaseInfoVO.setPartnerUserId(partnerLineInfoAndBaseInfoDTO.getPartnerId());
partnerLineInfoAndBaseInfoVO.setInvestmentManager(partnerLineInfoAndBaseInfoDTO.getInvestmentManager()); partnerLineInfoAndBaseInfoVO.setInvestmentManager(partnerLineInfoAndBaseInfoDTO.getInvestmentManager());
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getUserPortrait())){
partnerLineInfoAndBaseInfoVO.setUserPortrait(JSONObject.parseArray(partnerLineInfoAndBaseInfoDTO.getUserPortrait(),String.class));
}
partnerLineInfoAndBaseInfoVO.setPartnerBaseInfoId(partnerLineInfoAndBaseInfoDTO.getPartnerBaseInfoId()); partnerLineInfoAndBaseInfoVO.setPartnerBaseInfoId(partnerLineInfoAndBaseInfoDTO.getPartnerBaseInfoId());
partnerLineInfoAndBaseInfoVO.setWorkflowStage(partnerLineInfoAndBaseInfoDTO.getWorkflowStage()); partnerLineInfoAndBaseInfoVO.setWorkflowStage(partnerLineInfoAndBaseInfoDTO.getWorkflowStage());
partnerLineInfoAndBaseInfoVO.setWorkflowStatus(partnerLineInfoAndBaseInfoDTO.getWorkflowStatus()); partnerLineInfoAndBaseInfoVO.setWorkflowStatus(partnerLineInfoAndBaseInfoDTO.getWorkflowStatus());

View File

@@ -0,0 +1,36 @@
package com.cool.store.service.impl;
import com.cool.store.dto.partner.UserChannelDTO;
import com.cool.store.entity.HyPartnerUserChannelDO;
import com.cool.store.mapper.HyPartnerUserChannelMapper;
import com.cool.store.service.HyPartnerUserChannelService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/8/10 11:14
* @Version 1.0
*/
@Service
public class HyPartnerUserChannelServiceImpl implements HyPartnerUserChannelService {
@Resource
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
@Override
public List<UserChannelDTO> queryAllUserChannelList() {
List<HyPartnerUserChannelDO> allUserChannel = hyPartnerUserChannelMapper.getAllUserChannel();
List<UserChannelDTO> result = new ArrayList<>();
allUserChannel.forEach(x->{
UserChannelDTO userChannelDTO = new UserChannelDTO();
userChannelDTO.setUserChannelId(x.getChannelId());
userChannelDTO.setUserChannelName(x.getChannelName());
result.add(userChannelDTO);
});
return result;
}
}

View File

@@ -0,0 +1,115 @@
package com.cool.store.service.impl;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.label.LabelGroupAddDTO;
import com.cool.store.dto.label.LabelGroupDeleteDTO;
import com.cool.store.dto.label.LabelGroupListDTO;
import com.cool.store.dto.label.LabelGroupUpdateDTO;
import com.cool.store.entity.HyPartnerLabelGroupDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.mapper.HyPartnerLabelGroupMapper;
import com.cool.store.mapper.HyPartnerLabelMapper;
import com.cool.store.service.LabelGroupService;
import com.cool.store.vo.LabelGroupListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* @author Fun Li 2023/8/10 13:35
* @version 1.0
*/
@Service
public class LabelGroupServiceImpl implements LabelGroupService {
@Autowired
private HyPartnerLabelGroupMapper labelGroupMapper;
@Autowired
private HyPartnerLabelMapper labelMapper;
/**
* 查询标签组信息列表
* @param dto 查询条件
*/
@Override
public List<LabelGroupListVo> getLabelGroupList(LabelGroupListDTO dto) {
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
return labelGroupMapper.getLabelGroupList(labelGroupDO);
}
/**
* 添加标签组
* @param dto 新增标签组信息
*/
@Override
public void addLabelGroup(LabelGroupAddDTO dto) throws ApiException {
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
List<HyPartnerLabelGroupDO> existLabelGroup = labelGroupMapper.selectSelective(labelGroupDO);
if (existLabelGroup != null && existLabelGroup.size() > 0) {
throw new ApiException(ErrorCodeEnum.LABEL_GROUP_EXIST);
}
String userId = CurrentUserHolder.getUserId();
labelGroupDO.setEditUserId(userId);
labelGroupDO.setEditDate(new Date());
labelGroupDO.setCreateUserId(userId);
labelGroupDO.setUpdateUserId(userId);
labelGroupMapper.insertSelective(labelGroupDO);
}
/**
* 修改标签组信息
* @param dto 修改内容
*/
@Override
public void updateLabelGroup(LabelGroupUpdateDTO dto) {
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
String userId = CurrentUserHolder.getUserId();
labelGroupDO.setId(dto.getId());
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
labelGroupDO.setEditUserId(userId);
labelGroupDO.setEditDate(new Date());
labelGroupDO.setUpdateUserId(userId);
labelGroupMapper.updateByPrimaryKeySelective(labelGroupDO);
}
/**
* 删除标签组
* @param dto 待删除标签组信息
*/
@Override
public void deleteLabelGroup(LabelGroupDeleteDTO dto) throws ApiException {
if (whetherGroupInUse(dto.getId())) {
throw new ApiException(ErrorCodeEnum.LABEL_GROUP_IN_USE);
}
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
String userId = CurrentUserHolder.getUserId();
labelGroupDO.setId(dto.getId());
labelGroupDO.setDeleted(Boolean.TRUE);
labelGroupDO.setUpdateUserId(userId);
labelGroupMapper.updateByPrimaryKeySelective(labelGroupDO);
}
/**
* 获取所有标签组
*/
@Override
public List<LabelGroupListVo> getAllLabelGroupList() {
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
return labelGroupMapper.getLabelGroupList(labelGroupDO);
}
/**
* 某个标签组内是否有未删除的标签
* @param id 标签组 id
*/
private Boolean whetherGroupInUse(Long id) {
return labelMapper.whetherGroupInUse(id);
}
}

View File

@@ -0,0 +1,151 @@
package com.cool.store.service.impl;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.label.LabelAddDTO;
import com.cool.store.dto.label.LabelDeleteDTO;
import com.cool.store.dto.label.LabelListDTO;
import com.cool.store.dto.label.LabelUpdateDTO;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.mapper.HyPartnerLabelMapper;
import com.cool.store.service.LabelService;
import com.cool.store.vo.LabelListVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author Fun Li 2023/8/10 14:24
* @version 1.0
*/
@Service
@Slf4j
public class LabelServiceImpl implements LabelService {
@Autowired
private HyPartnerLabelMapper labelMapper;
/**
* 获取数组列表
*
* @param dto 查询条件
*/
@Override
public List<LabelListVo> getLabelList(LabelListDTO dto) {
return labelMapper.getLabelList(dto);
}
/**
* 添加标签组
* @param dto 新增标签组信息
*/
@Override
public void addLabel(LabelAddDTO dto) throws ApiException {
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
labelDO.setLabelName(dto.getLabelName());
if (whetherLabelRepeat(labelDO)) {
throw new ApiException(ErrorCodeEnum.LABEL_EXIST);
}
String userId = CurrentUserHolder.getUserId();
labelDO.setLabelGroupId(dto.getLabelGroupId());
labelDO.setEditUserId(userId);
labelDO.setEditDate(new Date());
labelDO.setCreateUserId(userId);
labelDO.setUpdateUserId(userId);
labelMapper.insertSelective(labelDO);
}
/**
* 修改标签信息
* @param dto 新标签信息
*/
@Override
public void updateLabel(LabelUpdateDTO dto) throws ApiException {
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
labelDO.setLabelName(dto.getLabelName());
if (whetherLabelRepeat(labelDO)) {
throw new ApiException(ErrorCodeEnum.LABEL_EXIST);
}
String userId = CurrentUserHolder.getUserId();
labelDO.setId(dto.getId());
labelDO.setLabelGroupId(dto.getLabelGroupId());
labelDO.setEditUserId(userId);
labelDO.setEditDate(new Date());
labelDO.setUpdateUserId(userId);
labelMapper.updateByPrimaryKeySelective(labelDO);
}
/**
* 删除标签
* @param dto
*/
@Override
public void deleteLabel(LabelDeleteDTO dto) {
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
String userId = CurrentUserHolder.getUserId();
labelDO.setId(dto.getId());
labelDO.setEditUserId(userId);
labelDO.setEditDate(new Date());
labelDO.setUpdateUserId(userId);
labelDO.setDeleted(Boolean.TRUE);
labelMapper.updateByPrimaryKeySelective(labelDO);
}
private Boolean whetherLabelRepeat(HyPartnerLabelDO label) throws ApiException {
List<HyPartnerLabelDO> hyPartnerLabelDOS = labelMapper.selectSelective(label);
if (hyPartnerLabelDOS != null && hyPartnerLabelDOS.size() > 0) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}
@Override
public Map<Long,String> getUserPortraitMap(List<String> userPortraitStrList){
Set<Long> userPortraitIdList = new HashSet<>();
for (String userPortrait:userPortraitStrList) {
String[] parts = userPortrait.split(",");
for (String part : parts) {
String trimmedPart = part.trim();
if (!trimmedPart.isEmpty()) {
try {
Long value = Long.parseLong(trimmedPart);
userPortraitIdList.add(value);
} catch (NumberFormatException e) {
log.info("Invalid format: {}" , trimmedPart);
}
}
}
}
List<HyPartnerLabelDO> labelListByIds = new ArrayList<>();
if (CollectionUtils.isNotEmpty(userPortraitIdList)){
labelListByIds = labelMapper.getLabelListByIds(new ArrayList<>(userPortraitIdList));
}
return labelListByIds.stream().collect(Collectors.toMap(HyPartnerLabelDO::getId,HyPartnerLabelDO::getLabelName));
}
@Override
public List<String> getUserPortraitList(Map<Long, String> userPortraitMap, String userPortraitStr) {
List<String> userPortraitList= new ArrayList<>();
if(StringUtils.isNotEmpty(userPortraitStr)){
String[] parts = userPortraitStr.split(",");
for (String part : parts) {
String trimmedPart = part.trim();
if (!trimmedPart.isEmpty()) {
try {
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
} catch (NumberFormatException e) {
log.info("Invalid format: {}" , trimmedPart);
}
}
}
}
return userPortraitList;
}
}

View File

@@ -49,7 +49,10 @@ public class TokenValidateFilter implements Filter {
//腾讯音视频回调,单独做验签 //腾讯音视频回调,单独做验签
"/partner/pc/video/**", "/partner/pc/video/**",
//TODO 800回调地址暂时不做验证 //TODO 800回调地址暂时不做验证
"/partner/pc/flow/qualificationReview/callback","/**/ecSync/ecToApplet/**"); "/partner/pc/flow/qualificationReview/callback",
"/**/ecSync/ecToApplet/**",
"/partner/pc/websocket/**",
"/partner/pc/call/**");
/** /**

View File

@@ -0,0 +1,17 @@
package com.cool.store.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
/**
* WebSocket的配置信息
*/
@Configuration
public class WebSocketConfig {
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}

View File

@@ -0,0 +1,53 @@
package com.cool.store.controller;
import com.cool.store.exception.ApiException;
import com.cool.store.request.CallFinishBackReq;
import com.cool.store.request.CallRecordBackReq;
import com.cool.store.request.CallUpReq;
import com.cool.store.request.GetTipsInfoReq;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.CallService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author: young.yu
* @Date: 2023-08-10 18:05
* @Description:
*/
@RestController
@RequestMapping("call")
@Api(tags = "通话")
@Slf4j
public class CallController {
@Autowired
private CallService callService;
@PostMapping("/callUp")
@ApiOperation("呼出电话")
public ResponseResult callUp(@RequestBody CallUpReq request) throws ApiException {
callService.callUp(request);
return ResponseResult.success();
}
@PostMapping("/finish/callback")
@ApiOperation("通话结束回调")
public ResponseResult callFinishBack(@RequestBody CallFinishBackReq request) throws ApiException {
callService.callFinishBack(request);
return ResponseResult.success();
}
@PostMapping("/record/callback")
@ApiOperation("录音上传回调")
public ResponseResult callRecordBack(@RequestBody CallRecordBackReq request) throws ApiException {
callService.callRecordBack(request);
return ResponseResult.success();
}
}

View File

@@ -107,10 +107,17 @@ public class DeskController {
@ApiImplicitParam(name = "pageSize", value = "10", required = false), @ApiImplicitParam(name = "pageSize", value = "10", required = false),
}) })
public ResponseResult<PageInfo<PartnerIntentApplyInfoVO>> queryIntentApplyList(@RequestParam(value = "type",required = false)String type, public ResponseResult<PageInfo<PartnerIntentApplyInfoVO>> queryIntentApplyList(@RequestParam(value = "type",required = false)String type,
@RequestParam(value = "keyword",required = false)String keyword,
@RequestParam(value = "callStatus",required = false)Integer callStatus,
@RequestParam(value = "userPortraitIdList",required = false)List<String> userPortraitIdList,
@RequestParam(value = "lastFollowStartTime",required = false)Long lastFollowStartTime,
@RequestParam(value = "lastFollowEndTime",required = false)Long lastFollowEndTime,
@RequestParam(value = "userChannelIdList",required = false)String userChannelIdList,
@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber, @RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){ @RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){
String userId = CurrentUserHolder.getUserId(); String userId = CurrentUserHolder.getUserId();
return ResponseResult.success(hyPartnerIntentInfoService.getPartnerIntentApplyList(userId,type,pageSize,pageNumber)); return ResponseResult.success(hyPartnerIntentInfoService.getPartnerIntentApplyList(userId,type,pageSize,pageNumber,keyword,callStatus,userPortraitIdList,
lastFollowStartTime,lastFollowEndTime,userChannelIdList));
} }
@@ -205,6 +212,12 @@ public class DeskController {
return ResponseResult.success(hyPartnerLineInfoService.transferInvestmentManager(CurrentUserHolder.getUser(),request )); return ResponseResult.success(hyPartnerLineInfoService.transferInvestmentManager(CurrentUserHolder.getUser(),request ));
} }
@PostMapping(path = "/batchTransferInvestmentManager")
@ApiOperation("批量转让招商经理")
public ResponseResult<Boolean> batchTransferInvestmentManager(@RequestBody BatchTransferInvestmentManagerRequest request) throws ApiException {
return ResponseResult.success(hyPartnerLineInfoService.batchTransferInvestmentManager(CurrentUserHolder.getUser(),request ));
}
@PostMapping(path = "/queryPublicSeqLineList") @PostMapping(path = "/queryPublicSeqLineList")
@ApiOperation("公海列表") @ApiOperation("公海列表")
@@ -216,7 +229,14 @@ public class DeskController {
@PostMapping(path = "/queryPrivateSeaLineList") @PostMapping(path = "/queryPrivateSeaLineList")
@ApiOperation("私海列表") @ApiOperation("私海列表")
public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryPrivateSeqLineList(@RequestBody PrivateSeaLineListRequest privateSeaLineListRequest){ public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryPrivateSeqLineList(@RequestBody PrivateSeaLineListRequest privateSeaLineListRequest){
return ResponseResult.success(hyPartnerLineInfoService.privateSeaLineList(CurrentUserHolder.getUserId(),privateSeaLineListRequest)); return ResponseResult.success(hyPartnerLineInfoService.privateSeaLineList(CurrentUserHolder.getUserId(),privateSeaLineListRequest,Boolean.FALSE));
}
@PostMapping(path = "/queryAllPrivateSeqLineList")
@ApiOperation("全量私海")
public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryAllPrivateSeqLineList(@RequestBody PrivateSeaLineListRequest privateSeaLineListRequest){
return ResponseResult.success(hyPartnerLineInfoService.privateSeaLineList(CurrentUserHolder.getUserId(),privateSeaLineListRequest,Boolean.TRUE));
} }
@PostMapping(path = "/queryBlackList") @PostMapping(path = "/queryBlackList")

View File

@@ -0,0 +1,64 @@
package com.cool.store.controller;
import com.cool.store.dto.label.LabelAddDTO;
import com.cool.store.dto.label.LabelDeleteDTO;
import com.cool.store.dto.label.LabelListDTO;
import com.cool.store.dto.label.LabelUpdateDTO;
import com.cool.store.exception.ApiException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LabelService;
import com.cool.store.vo.LabelListVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author Fun Li 2023/8/10 14:20
* @version 1.0
*/
@Api(tags = "标签管理")
@RestController
@RequestMapping("/label")
public class LabelController {
@Autowired
private LabelService labelService;
@ApiOperation("标签列表查询")
@PostMapping("/list")
public ResponseResult<PageInfo<LabelListVo>> getLabelList(@RequestBody LabelListDTO dto) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
List<LabelListVo> result = labelService.getLabelList(dto);
return ResponseResult.success(new PageInfo<>(result));
}
@ApiOperation("新增标签")
@PostMapping("/add")
public ResponseResult addLabel(@RequestBody LabelAddDTO dto) throws ApiException {
labelService.addLabel(dto);
return ResponseResult.success();
}
@ApiOperation("修改标签")
@PostMapping("/edit")
public ResponseResult updateLabel(@RequestBody LabelUpdateDTO dto) throws ApiException {
labelService.updateLabel(dto);
return ResponseResult.success();
}
@ApiOperation("删除标签")
@PostMapping("/delete")
public ResponseResult deleteLabel(@RequestBody LabelDeleteDTO dto) {
labelService.deleteLabel(dto);
return ResponseResult.success();
}
}

View File

@@ -0,0 +1,69 @@
package com.cool.store.controller;
import com.cool.store.dto.label.LabelGroupAddDTO;
import com.cool.store.dto.label.LabelGroupDeleteDTO;
import com.cool.store.dto.label.LabelGroupListDTO;
import com.cool.store.dto.label.LabelGroupUpdateDTO;
import com.cool.store.exception.ApiException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LabelGroupService;
import com.cool.store.vo.LabelGroupListVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author Fun Li 2023/8/10 10:54
* @version 1.0
*/
@Api(tags = {"标签组管理"})
@RestController
@RequestMapping({"/labelGroup"})
public class LabelGroupController {
@Autowired
private LabelGroupService labelGroupService;
@ApiOperation("标签组分页查询")
@PostMapping({"/list"})
public ResponseResult<PageInfo<LabelGroupListVo>> getLabelGroupList(@RequestBody LabelGroupListDTO dto) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
List<LabelGroupListVo> result = labelGroupService.getLabelGroupList(dto);
return ResponseResult.success(new PageInfo<>(result));
}
@ApiOperation("新增标签组")
@PostMapping({"/add"})
public ResponseResult addLabelGroup(@RequestBody LabelGroupAddDTO dto) throws ApiException {
labelGroupService.addLabelGroup(dto);
return ResponseResult.success();
}
@ApiOperation("修改标签组")
@PostMapping({"/edit"})
public ResponseResult updateLabelGroup(@RequestBody LabelGroupUpdateDTO dto) {
labelGroupService.updateLabelGroup(dto);
return ResponseResult.success();
}
@ApiOperation("删除标签组")
@PostMapping({"/delete"})
public ResponseResult deleteLabelGroup(@RequestBody LabelGroupDeleteDTO dto) throws ApiException {
labelGroupService.deleteLabelGroup(dto);
return ResponseResult.success();
}
@ApiOperation("获取所有标签组")
@PostMapping({"/allList"})
public ResponseResult<List<LabelGroupListVo>> deleteLabelGroup() {
return ResponseResult.success(labelGroupService.getAllLabelGroupList());
}
}

View File

@@ -0,0 +1,33 @@
package com.cool.store.controller;
import com.cool.store.dto.partner.UserChannelDTO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.HyPartnerUserChannelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/8/10 11:17
* @Version 1.0
*/
@RestController
@Api(tags = "线索来源")
@Slf4j
public class UserChannelController {
@Resource
HyPartnerUserChannelService hyPartnerUserChannelService;
@GetMapping(path = "/queryAllUserChannelList")
@ApiOperation("线索来源列表")
public ResponseResult<List<UserChannelDTO>> queryAllUserChannelList(){
return ResponseResult.success(hyPartnerUserChannelService.queryAllUserChannelList());
}
}