mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
<?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.ComActMicroWishOperationRecordMapper">
 
        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActMicroWishOperationRecordDO">
                    <id column="id" property="id" />
                    <result column="content" property="content" />
                    <result column="user_id" property="userId" />
                    <result column="wish_id" property="wishId" />
                    <result column="create_time" property="createTime" />
                    <result column="remark" property="remark" />
                    <result column="img_url" property="imgUrl" />
                    <result column="type" property="type"/>
        </resultMap>
 
        <!-- 通用查询结果列 -->
        <sql id="Base_Column_List">
        id, content, user_id, wish_id, create_time, remark, img_url
    </sql>
 
    <select id="getByWishId" resultType="com.panzhihua.common.model.vos.community.ComActMicroWishOperationRecordVO">
        select t.*,t1.name from com_act_micro_wish_operation_record t left join sys_user t1 on t.user_id =t1.user_id where t.wish_id =#{id} order by t.create_time desc
    </select>
 
    <select id="selectId" resultType="Long">
        select id from com_act_micro_wish
        <where>
            1=1 and community_id = ${communityId}
            <if test="status !=null">
                and status=#{status}
            </if>
        </where>
    </select>
 
</mapper>