jiangqs
2023-06-18 c00d0d3bc399b6648145dfd955cedbea90f5f99d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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.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 tmt.shop_id = #{param.shopId} AND tmt.agency_id = #{param.agencyId}
        ORDER BY tmt.task_date 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.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 tmt.task_date DESC
    </select>
</mapper>