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
60
61
62
63
64
65
66
67
68
69
70
<?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.EventApplicationAppReleaseMapper">
 
     <resultMap id="baseResult" type="com.panzhihua.service_grid.model.dos.EventApplicationAppReleaseDO">
        <result property="id" column="id"/>
        <result property="productId" column="product_id"/>
        <result property="productName" column="product_name"/>
        <result property="releaseNumber" column="release_number"/>
        <result property="action" column="action"/>
        <result property="url" column="url"/>
        <result property="createAt" column="create_at"/>
        <result property="createBy" column="create_by"/>
    </resultMap>
 
    <sql id="columns">
    <![CDATA[
        id,product_id,product_name,release_number,action,url,create_at,create_by
    ]]>
    </sql>
 
 
    <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventApplicationAppReleaseVO"
        parameterType="com.panzhihua.common.model.dtos.grid.PageEventApplicationAppReleaseDTO">
        SELECT <include refid="columns" />
        FROM event_application_app_release
        <where>
           <if test="pageEventApplicationAppReleaseDTO.id!=null">
                AND id = #{pageEventApplicationAppReleaseDTO.id}
            </if>
           <if test="pageEventApplicationAppReleaseDTO.productId!=null">
                AND product_id = #{pageEventApplicationAppReleaseDTO.productId}
            </if>
           <if test="pageEventApplicationAppReleaseDTO.productName!=null">
                AND product_name = #{pageEventApplicationAppReleaseDTO.productName}
            </if>
           <if test="pageEventApplicationAppReleaseDTO.releaseNumber!=null">
                AND release_number = #{pageEventApplicationAppReleaseDTO.releaseNumber}
            </if>
           <if test="pageEventApplicationAppReleaseDTO.action!=null">
                AND action = #{pageEventApplicationAppReleaseDTO.action}
            </if>
           <if test="pageEventApplicationAppReleaseDTO.url!=null">
                AND url = #{pageEventApplicationAppReleaseDTO.url}
            </if>
           <if test="pageEventApplicationAppReleaseDTO.createAtBegin!=null">
                AND create_at &gt;= #{pageEventApplicationAppReleaseDTO.createAtBegin}
           </if>
           <if test="pageEventApplicationAppReleaseDTO.createAtEnd!=null">
                AND create_at &lt;= #{pageEventApplicationAppReleaseDTO.createAtEnd}
           </if>
           <if test="pageEventApplicationAppReleaseDTO.createBy!=null">
                AND create_by = #{pageEventApplicationAppReleaseDTO.createBy}
            </if>
        </where>
        <if test="pageEventApplicationAppReleaseDTO.sortColumns!=null">
            ORDER BY ${pageEventApplicationAppReleaseDTO.sortColumns} ${pageEventApplicationAppReleaseDTO.sortType}
        </if>
    </select>
 
    <select id="editionUpdate" resultType="com.panzhihua.common.model.vos.grid.EventApplicationAppReleaseDetailsVO">
        SELECT <include refid="columns" />
        FROM event_application_app_release
        order by create_at desc
        limit 1
    </select>
 
</mapper>