<?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.ruoyi.interchange.mapper.TbCoalMineInfoMapper">
|
|
<resultMap type="TbCoalMineInfo" id="TbCoalMineInfoResult">
|
<result property="id" column="id" />
|
<result property="deptId" column="dept_id" />
|
<result property="coalMineCode" column="coal_mine_code" />
|
<result property="lsqy" column="lsqy" />
|
<result property="scnl" column="scnl" />
|
<result property="szdz" column="szdz" />
|
</resultMap>
|
|
<sql id="selectTbCoalMineInfoVo">
|
select id, dept_id, coal_mine_code, lsqy, scnl, szdz from tb_coal_mine_info
|
</sql>
|
|
<select id="selectTbCoalMineInfoList" parameterType="TbCoalMineInfo" resultMap="TbCoalMineInfoResult">
|
<include refid="selectTbCoalMineInfoVo"/>
|
<where>
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
<if test="coalMineCode != null and coalMineCode != ''"> and coal_mine_code = #{coalMineCode}</if>
|
<if test="lsqy != null and lsqy != ''"> and lsqy = #{lsqy}</if>
|
<if test="scnl != null and scnl != ''"> and scnl = #{scnl}</if>
|
<if test="szdz != null and szdz != ''"> and szdz = #{szdz}</if>
|
</where>
|
</select>
|
|
<select id="selectTbCoalMineInfoById" parameterType="Long" resultMap="TbCoalMineInfoResult">
|
<include refid="selectTbCoalMineInfoVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertTbCoalMineInfo" parameterType="TbCoalMineInfo" useGeneratedKeys="true" keyProperty="id">
|
insert into tb_coal_mine_info
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="deptId != null">dept_id,</if>
|
<if test="coalMineCode != null">coal_mine_code,</if>
|
<if test="lsqy != null">lsqy,</if>
|
<if test="scnl != null">scnl,</if>
|
<if test="szdz != null">szdz,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="deptId != null">#{deptId},</if>
|
<if test="coalMineCode != null">#{coalMineCode},</if>
|
<if test="lsqy != null">#{lsqy},</if>
|
<if test="scnl != null">#{scnl},</if>
|
<if test="szdz != null">#{szdz},</if>
|
</trim>
|
</insert>
|
|
<update id="updateTbCoalMineInfo" parameterType="TbCoalMineInfo">
|
update tb_coal_mine_info
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="coalMineCode != null">coal_mine_code = #{coalMineCode},</if>
|
<if test="lsqy != null">lsqy = #{lsqy},</if>
|
<if test="scnl != null">scnl = #{scnl},</if>
|
<if test="szdz != null">szdz = #{szdz},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteTbCoalMineInfoById" parameterType="Long">
|
delete from tb_coal_mine_info where id = #{id}
|
</delete>
|
|
<delete id="deleteTbCoalMineInfoByIds" parameterType="String">
|
delete from tb_coal_mine_info where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|