郑永安
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
<?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=".dao.WorkBrokenCircuitDao">
 
    <resultMap type="com.gkhy.safePlatform.specialWork.entity.WorkBrokenCircuitInfo" id="WorkBrokenCircuitInfoMap">
        <result property="id" column="id" jdbcType="BIGINT"/>
        <result property="operationDepId" column="operation_dep_id" jdbcType="BIGINT"/>
        <result property="operationDepName" column="operation_dep_name" jdbcType="VARCHAR"/>
        <result property="bcReason" column="bc_reason" jdbcType="VARCHAR"/>
        <result property="bcPath" column="bc_path" jdbcType="VARCHAR"/>
        <result property="bcExplain" column="bc_explain" jdbcType="VARCHAR"/>
        <result property="workApplyId" column="work_apply_id" jdbcType="BIGINT"/>
        <result property="involvedDepIds" column="involved_dep_ids" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="TINYINT"/>
        <result property="gmtCreate" column="gmt_create" jdbcType="TIMESTAMP"/>
        <result property="createUid" column="create_uid" jdbcType="BIGINT"/>
        <result property="createUname" column="create_uname" jdbcType="VARCHAR"/>
        <result property="gmtModified" column="gmt_modified" jdbcType="TIMESTAMP"/>
        <result property="modifiedUid" column="modified_uid" jdbcType="BIGINT"/>
        <result property="modifiedUname" column="modified_uname" jdbcType="VARCHAR"/>
    </resultMap>
 
 
    <!--查询数据-->
    <select id="listByConditions" resultMap="WorkBrokenCircuitInfoMap" parameterType="com.gkhy.safePlatform.specialWork.model.query.WorkBrokenCircuitQuery">
        select
          id, operation_dep_id, operation_dep_name, bc_reason, bc_path, bc_explain, work_apply_id, involved_dep_ids, status, gmt_create, create_uid, create_uname, gmt_modified, modified_uid, modified_uname
        from work_broken_circuit
        <where>
 
            <if test="query.operationDepId != null">
                and operation_dep_id = #{query.operationDepId}
            </if>
            <if test="query.workApplyId != null">
                and work_apply_id = #{query.workApplyId}
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
 
        </where>
    </select>
 
    <!--通过主键idList批量删除数据-->
    <update id="updateStatutsByIds">
        update work_broken_circuit
        set status = #{status}
        where id in
        <foreach collection="idList" item="id" index="index" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </update>
 
</mapper>