郑永安
2023-09-19 69185134fcfaf913ea45f1255677225a2cc311a4
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
<?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.hotwork.Mapper.SelfCheckInfoMapper" >
  <resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.SelfCheckInfo" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="tasktype" property="type" jdbcType="VARCHAR" />
    <result column="type" property="type" jdbcType="VARCHAR" />
    <result column="checktype" property="checktype" jdbcType="VARCHAR" />
    <result column="content" property="content" jdbcType="VARCHAR" />
    <result column="standard" property="standard" jdbcType="VARCHAR" />
    <result column="sort" property="sort" jdbcType="INTEGER" />
    <result column="isdel" property="isdel" jdbcType="TINYINT" />
    <result column="description" property="description" jdbcType="VARCHAR" />
    <result column="createdby" property="createdby" jdbcType="VARCHAR" />
    <result column="createddate" property="createddate" jdbcType="TIMESTAMP" />
    <result column="modifiedby" property="modifiedby" jdbcType="VARCHAR" />
    <result column="modifieddate" property="modifieddate" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--          -->
    id,tasktype, type, checktype, content, standard, sort, isdel, description, createdby, createddate, modifiedby,
    modifieddate
  </sql>
  <select id="selectByType" resultType="com.gk.hotwork.Domain.Vo.SelfCheckVo">
    select
    <include refid="Base_Column_List" />
    from selfcheck
    where isdel = 0
    and type = #{type}
    ORDER BY sort ASC
  </select>
  <select id="selectDataGrid" resultType="com.gk.hotwork.Domain.SelfCheckInfo">
    select
    <include refid="Base_Column_List" />
    from selfcheck
    <where>
      isdel = 0
      <if test="condition.tasktype != null and condition.tasktype != ''">
        and tasktype = #{condition.tasktype}
      </if>
      <if test="condition.type != null and condition.type != ''">
        and type = #{condition.type}
      </if>
      <if test="condition.content != null and condition.content != ''">
        and content like concat('%',#{condition.content},'%')
      </if>
    </where>
  </select>
  <select id="selectByIds" resultType="com.gk.hotwork.Domain.SelfCheckInfo">
    select
    <include refid="Base_Column_List" />
    from selfcheck
    <where>
      isdel = 0
      <if test="idList != null and idList.size > 0">
        and id in
        <foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
          #{item}
        </foreach>
      </if>
    </where>
  </select>
</mapper>