郑永安
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
<?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.WorkGroundBreakingInfoRepository">
 
    <resultMap type="com.gkhy.safePlatform.specialWork.entity.WorkGroundBreakingInfo" id="WorkGroundBreakingInfoMap">
        <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="gbScope" column="gb_scope" jdbcType="VARCHAR"/>
        <result property="gbMethod" column="gb_method" jdbcType="VARCHAR"/>
        <result property="gbPath" column="gb_path" jdbcType="VARCHAR"/>
        <result property="workApplyId" column="work_apply_id" jdbcType="BIGINT"/>
        <result property="otherSpecialWork" column="other_special_work" 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="WorkGroundBreakingInfoMap" parameterType="com.gkhy.safePlatform.specialWork.model.query.WorkGroundBreakingQuery">
        select
          id, operation_dep_id, operation_dep_name, gb_scope, gb_method, gb_path, work_apply_id, other_special_work, status, gmt_create, create_uid, create_uname, gmt_modified, modified_uid, modified_uname
        from work_ground_breaking
        <where>
 
            <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_ground_breaking
        set status = #{status}
        where id in
        <foreach collection="idList" item="id" index="index" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </update>
 
 
</mapper>