101captain
2021-12-23 5a8a90c095280fbd2106869ecd2bad10e01a57a6
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
<?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="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>
 
</mapper>