<?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.gk.hotwork.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.gk.hotwork.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>
|