郑永安
2023-06-19 59e91a4e9ddaf23cebb12993c774aa899ab22d16
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?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.gk.firework.Mapper.AssessApplyMapper" >
  <sql id="Base_Column_List" >
    <!--          -->
    id, type, code, status, requestor, submittime, approver, approvetime, approvenote,
    enterprisename, enterprisenumber, ispunish, path1, path2, punishmentreason, punishmentmeasure,
    createtime, modifytime, lastrejecttime
  </sql>
 
  <select id="selectPages" resultType="com.gk.firework.Domain.AssessApply">
    select *
    from assessapply
    where validflag = 1
    and type = #{params.type}
    <if test="params.requestorid != null and params.requestorid != ''">
      and requestorid = #{params.requestorid}
    </if>
    <if test="params.enterprisename != null and params.enterprisename != ''">
      and enterprisename like concat("%",#{params.enterprisename},"%")
    </if>
    <if test="params.status != null and params.status != ''">
      and status = #{params.status}
    </if>
    <if test="params.code != null and params.code != ''">
      and code like concat("%",#{params.code},"%")
    </if>
    order by createtime desc
  </select>
  <select id="selectAllPunishingSaleAssessApply" resultType="com.gk.firework.Domain.AssessApply">
      select *
      from assessapply
      where validflag = 1
      and type = #{sale}
      and punishstatus = #{punishing}
    </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    <!--          -->
    delete from assessapply
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.AssessApply" >
    <!--          -->
    update assessapply
    <set >
      <if test="type != null" >
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="requestor != null" >
        requestor = #{requestor,jdbcType=VARCHAR},
      </if>
      <if test="submittime != null" >
        submittime = #{submittime,jdbcType=TIMESTAMP},
      </if>
      <if test="approver != null" >
        approver = #{approver,jdbcType=VARCHAR},
      </if>
      <if test="approvetime != null" >
        approvetime = #{approvetime,jdbcType=TIMESTAMP},
      </if>
      <if test="approvenote != null" >
        approvenote = #{approvenote,jdbcType=VARCHAR},
      </if>
      <if test="enterprisename != null" >
        enterprisename = #{enterprisename,jdbcType=VARCHAR},
      </if>
      <if test="enterprisenumber != null" >
        enterprisenumber = #{enterprisenumber,jdbcType=VARCHAR},
      </if>
      <if test="ispunish != null" >
        ispunish = #{ispunish,jdbcType=BIT},
      </if>
      <if test="path1 != null" >
        path1 = #{path1,jdbcType=VARCHAR},
      </if>
      <if test="path2 != null" >
        path2 = #{path2,jdbcType=VARCHAR},
      </if>
      <if test="punishmentreason != null" >
        punishmentreason = #{punishmentreason,jdbcType=VARCHAR},
      </if>
      <if test="punishmentmeasure != null" >
        punishmentmeasure = #{punishmentmeasure,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null" >
        createtime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifytime != null" >
        modifytime = #{modifytime,jdbcType=TIMESTAMP},
      </if>
      <if test="lastrejecttime != null" >
        lastrejecttime = #{lastrejecttime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.AssessApply" >
    <!--          -->
    update assessapply
    set type = #{type,jdbcType=VARCHAR},
    code = #{code,jdbcType=VARCHAR},
    status = #{status,jdbcType=VARCHAR},
    requestor = #{requestor,jdbcType=VARCHAR},
    submittime = #{submittime,jdbcType=TIMESTAMP},
    approver = #{approver,jdbcType=VARCHAR},
    approvetime = #{approvetime,jdbcType=TIMESTAMP},
    approvenote = #{approvenote,jdbcType=VARCHAR},
    enterprisename = #{enterprisename,jdbcType=VARCHAR},
    enterprisenumber = #{enterprisenumber,jdbcType=VARCHAR},
    ispunish = #{ispunish,jdbcType=BIT},
    path1 = #{path1,jdbcType=VARCHAR},
    path2 = #{path2,jdbcType=VARCHAR},
    punishmentreason = #{punishmentreason,jdbcType=VARCHAR},
    punishmentmeasure = #{punishmentmeasure,jdbcType=VARCHAR},
    createtime = #{createtime,jdbcType=TIMESTAMP},
    modifytime = #{modifytime,jdbcType=TIMESTAMP},
    lastrejecttime = #{lastrejecttime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>