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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?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_grid.dao.EventApplicationUserNoticeMapper">
 
     <resultMap id="baseResult" type="com.panzhihua.service_grid.model.dos.EventApplicationUserNoticeDO">
        <result property="id" column="id"/>
        <result property="productId" column="product_id"/>
        <result property="productName" column="product_name"/>
        <result property="action" column="action"/>
        <result property="content" column="content"/>
        <result property="createAt" column="create_at"/>
        <result property="createBy" column="create_by"/>
    </resultMap>
 
    <sql id="columns">
    <![CDATA[
        id,product_id,product_name,action,content,create_at,create_by
    ]]>
    </sql>
 
 
    <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventApplicationUserNoticeVO"
        parameterType="com.panzhihua.common.model.dtos.grid.PageEventApplicationUserNoticeDTO">
        SELECT <include refid="columns" />
        FROM event_application_user_notice
        <where>
           <if test="pageEventApplicationUserNoticeDTO.id!=null">
                AND id = #{pageEventApplicationUserNoticeDTO.id}
            </if>
           <if test="pageEventApplicationUserNoticeDTO.productId!=null">
                AND product_id = #{pageEventApplicationUserNoticeDTO.productId}
            </if>
           <if test="pageEventApplicationUserNoticeDTO.productName!=null">
                AND product_name = #{pageEventApplicationUserNoticeDTO.productName}
            </if>
           <if test="pageEventApplicationUserNoticeDTO.action!=null">
                AND action = #{pageEventApplicationUserNoticeDTO.action}
            </if>
           <if test="pageEventApplicationUserNoticeDTO.content!=null">
                AND content = #{pageEventApplicationUserNoticeDTO.content}
            </if>
           <if test="pageEventApplicationUserNoticeDTO.createAtBegin!=null">
                AND create_at &gt;= #{pageEventApplicationUserNoticeDTO.createAtBegin}
           </if>
           <if test="pageEventApplicationUserNoticeDTO.createAtEnd!=null">
                AND create_at &lt;= #{pageEventApplicationUserNoticeDTO.createAtEnd}
           </if>
           <if test="pageEventApplicationUserNoticeDTO.createBy!=null">
                AND create_by = #{pageEventApplicationUserNoticeDTO.createBy}
            </if>
        </where>
        <if test="pageEventApplicationUserNoticeDTO.sortColumns!=null">
            ORDER BY ${pageEventApplicationUserNoticeDTO.sortColumns} ${pageEventApplicationUserNoticeDTO.sortType}
        </if>
    </select>
 
</mapper>