郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
<?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.gkhy.safePlatform.specialWork.repository.ApprovalRuleItemStandRepository" >
    <resultMap id="WorkHotInfo" type="com.gkhy.safePlatform.specialWork.entity.WorkHotInfo" >
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="hot_method" property="hotMethod" jdbcType="VARCHAR"/>
        <result column="work_apply_id" property="workApplyId" jdbcType="BIGINT"/>
        <result column="other_special_work" property="otherSpecialWork" jdbcType="VARCHAR"/>
        <result column="status" property="status" jdbcType="TINYINT"/>
        <result column="gmt_create" property="gmtCreate" jdbcType="TIMESTAMP"/>
        <result column="create_uname" property="createUname" jdbcType="VARCHAR"/>
        <result column="create_uid" property="createUid" jdbcType="BIGINT"/>
        <result column="gmt_modified" property="gmtModified" jdbcType="TIMESTAMP"/>
        <result column="modified_uname" property="modifiedUname" jdbcType="VARCHAR"/>
        <result column="modified_uid" property="modifiedUid" jdbcType="BIGINT"/>
    </resultMap>
 
    <update id="updateOneStatus">
        update work_hot
        set status = #{status}
        where id = #{id}
    </update>
    <update id="batchUpdate">
        update work_hot
        set status = #{status}
        where id in
         <foreach collection="ids" index="index" item="id" separator="," open="(" close=")">
             #{id}
         </foreach>
    </update>
    <select id="listByConditions" parameterType="com.gkhy.safePlatform.specialWork.model.query.db.WorkHotQuery" resultMap="WorkHotInfo">
        select
            wh.id,
            wh.hot_method,
            wh.work_apply_id,
            wh.other_special_work,
            wh.status,
            wh.gmt_create,
            wh.create_uname,
            wh.create_uid,
            wh.gmt_modified,
            wh.modified_uname,
            wh.modified_uid
        from work_hot wh
        <where>
            <if test="status != null" >
               and wh.status = #{status}
            </if>
            <if test="workApplyId != null" >
                and wh.work_apply_id = #{workApplyId}
            </if>
        </where>
    </select>
 
 
 
</mapper>