<?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.ruoyi.shop.mapper.task.AgencyTaskRecordMapper">
|
|
|
<resultMap type="AgencyTaskRecord" id="AgencyTaskRecordResult">
|
<result property="id" column="id" />
|
<result property="delFlag" column="del_flag" />
|
<result property="taskId" column="task_id" />
|
<result property="userId" column="user_id" />
|
<result property="followType" column="follow_type" />
|
<result property="callTime" column="call_time" />
|
<result property="followContent" column="follow_content" />
|
</resultMap>
|
|
|
<select id="pageMerAgencyTaskRecord" resultType="com.ruoyi.shop.domain.vo.MerAgencyTaskRecordPageVo">
|
SELECT
|
tmtr.id followId,
|
tmtr.task_id taskId,
|
tmt.task_date taskDate,
|
tmtr.follow_type followType,
|
tmtr.custome_follow_type customeFollowType,
|
tmtr.call_time callTime,
|
tmtr.follow_content followContent,
|
tmtr.call_phone callPhone
|
FROM t_agency_task tmt
|
INNER JOIN t_agency_task_record tmtr ON tmtr.task_id = tmt.task_id
|
WHERE tmt.del_flag = 0 AND tmtr.del_flag = 0 AND tmt.shop_id = #{param.shopId} AND tmt.agency_id = #{param.agencyId}
|
ORDER BY tmtr.create_time DESC
|
</select>
|
|
<select id="pageMgtAgencyFollow" resultType="com.ruoyi.shop.domain.vo.MgtAgencyTaskRecordPageVo">
|
SELECT
|
tmtr.user_id userId,
|
tmtr.id followId,
|
tmtr.task_id taskId,
|
tmt.create_time createTime,
|
tmtr.follow_type followType,
|
tmtr.custome_follow_type customeFollowType,
|
tmtr.call_time callTime,
|
tmtr.follow_content followContent,
|
tmtr.call_phone callPhone
|
FROM t_agency_task tmt
|
INNER JOIN t_agency_task_record tmtr ON tmtr.task_id = tmt.task_id
|
INNER JOIN t_shop ts ON ts.shop_id = tmt.shop_id
|
INNER JOIN t_shop_file tsf ON tsf.shop_id = ts.shop_id AND tsf.del_flag = 0 AND tsf.file_type = 1
|
WHERE tmt.del_flag = 0 AND tmt.agency_id = #{param.shopId} AND tmt.task_date = #{param.taskDate}
|
ORDER BY tmtr.create_time DESC
|
</select>
|
|
<select id="pageStaffAgencyTaskRecord" resultType="com.ruoyi.shop.domain.vo.StaffAgencyTaskRecordPageVo">
|
SELECT
|
tmtr.user_id userId,
|
tmtr.id followId,
|
tmtr.task_id taskId,
|
tmt.create_time createTime,
|
CASE tmtr.follow_type WHEN 1 THEN "电话跟进" WHEN 2 THEN "手动跟进" END followType,
|
tmtr.custome_follow_type customeFollowType,
|
tmtr.call_time callTime,
|
tmtr.follow_content followContent,
|
tmtr.call_phone callPhone
|
FROM t_agency_task tmt
|
INNER JOIN t_agency_task_record tmtr ON tmtr.task_id = tmt.task_id
|
INNER JOIN t_shop ts ON ts.shop_id = tmt.shop_id
|
INNER JOIN t_shop_file tsf ON tsf.shop_id = ts.shop_id AND tsf.del_flag = 0 AND tsf.file_type = 1
|
WHERE tmt.del_flag = 0 AND tmt.shop_id = #{param.agencyId}
|
ORDER BY tmtr.create_time DESC
|
</select>
|
|
|
</mapper>
|