<?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.WorkTemporaryPowerInfoRepository">
|
|
<resultMap type="com.gkhy.safePlatform.specialWork.entity.WorkTemporaryPowerInfo" id="WorkTemporaryPowerInfoMap">
|
<result property="id" column="id" jdbcType="BIGINT"/>
|
<result property="powerAccessPoint" column="power_access_point" jdbcType="VARCHAR"/>
|
<result property="workingVoltage" column="working_voltage" jdbcType="DECIMAL"/>
|
<result property="workApplyId" column="work_apply_id" jdbcType="BIGINT"/>
|
<result property="equipmentAndPower" column="equipment_and_power" 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="WorkTemporaryPowerInfoMap" parameterType="com.gkhy.safePlatform.specialWork.model.query.WorkTemporaryPowerQuery">
|
select
|
id, power_access_point, working_voltage, work_apply_id, equipment_and_power, status, gmt_create, create_uid, create_uname, gmt_modified, modified_uid, modified_uname
|
from work_temporary_power
|
<where>
|
|
<if test="workApplyId != null">
|
and work_apply_id = #{workApplyId}
|
</if>
|
|
<if test="status != null">
|
and status = #{status}
|
</if>
|
|
</where>
|
</select>
|
|
<!--通过主键idList删除数据-->
|
<update id="updateStatutsByIds">
|
update work_temporary_power
|
set status = #{status}
|
where id in
|
<foreach collection="idList" item="id" index="index" open="(" close=")" separator=",">
|
#{id}
|
</foreach>
|
</update>
|
|
</mapper>
|