liujie
2025-06-09 70d2a5d0f9c6951b2d4cac954041ed73582ff7eb
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
50
51
52
53
54
55
56
57
58
59
60
<?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.panzhihua.service_community.dao.ComActEasyPhotoFeedbackMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActEasyPhotoFeedbackDO">
        <id column="id" property="id" />
        <result column="easy_id" property="easyId" />
        <result column="type" property="type" />
        <result column="feedback_content" property="feedbackContent" />
        <result column="feedback_img" property="feedbackImg" />
        <result column="create_at" property="createAt" />
        <result column="create_by" property="createBy" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, easy_id, feedback_content, feedback_img, create_at, create_by
    </sql>
 
    <select id="getPhotoFeedbackList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoFeedbackVO">
        SELECT
            caepf.id,
            caepf.easy_id,
            caepf.feedback_content,
            caepf.feedback_img,
            caepf.create_at,
            caepf.create_by,
            su.`name` as createByName,
            su.image_url as createByImage
        FROM
            com_act_easy_photo_feedback AS caepf
            LEFT JOIN sys_user AS su ON su.user_id = caepf.create_by
        WHERE
            caepf.easy_id = #{easyId}
        ORDER BY caepf.create_at desc
    </select>
<!--    AND caepf.type = 1-->
    <select id="getPhotoFeedbackListForDpc"
            resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoFeedbackVO">
        SELECT
            caepf.id,
            caepf.easy_id,
            caepf.feedback_content,
            caepf.feedback_img,
            caepf.create_at,
            caepf.create_by,
            dpc.`name` as createByName,
            dpc.photo as createByImage
        FROM
            com_act_easy_photo_feedback AS caepf
            LEFT JOIN sys_user AS su ON su.user_id = caepf.create_by
            LEFT JOIN com_act_dpc dpc ON su.phone = dpc.phone
        WHERE
            caepf.easy_id = #{easyId} AND caepf.type = 2
        ORDER BY caepf.create_at desc
    </select>
 
 
</mapper>