|
@@ -0,0 +1,149 @@
|
|
|
|
+<?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.sooka.sponest.data.digitalforest.mapper.CenterdataTForestCyryMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="CenterdataTForestCyry" id="CenterdataTForestCyryResult">
|
|
|
|
+ <result property="id" column="id"/>
|
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
|
+ <result property="deptName" column="dept_name"/>
|
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
|
+ <result property="createName" column="create_name"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
|
+ <result property="updateName" column="update_name"/>
|
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
|
+ <result property="name" column="name"/>
|
|
|
|
+ <result property="number" column="number"/>
|
|
|
|
+ <result property="year" column="year"/>
|
|
|
|
+ <result property="cyryNum" column="cyry_num"/>
|
|
|
|
+ <result property="zgzgNum" column="zgzg_num"/>
|
|
|
|
+ <result property="zgjsryNum" column="zgjsry_num"/>
|
|
|
|
+ <result property="blldgxNum" column="blldgx_num"/>
|
|
|
|
+ <result property="ltxryNum" column="ltxry_num"/>
|
|
|
|
+ <result property="zgpjrs" column="zgpjrs"/>
|
|
|
|
+ <result property="zgldbc" column="zgldbc"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectCenterdataTForestCyryVo">
|
|
|
|
+ select a.id, a.dept_id, a.dept_name, a.create_by, a.create_name, a.create_time, a.update_by, a.update_name, a.update_time,
|
|
|
|
+ a.name, a.number, a.year, a.cyry_num, a.zgzg_num, a.zgjsry_num, a.blldgx_num, a.ltxry_num, a.zgpjrs, a.zgldbc
|
|
|
|
+ from centerdata_t_forest_cyry a
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectCenterdataTForestCyryList" parameterType="CenterdataTForestCyry"
|
|
|
|
+ resultMap="CenterdataTForestCyryResult">
|
|
|
|
+ <include refid="selectCenterdataTForestCyryVo"/>
|
|
|
|
+ left join ${database_system}.sys_dept d on a.dept_id=d.dept_id
|
|
|
|
+ <where>
|
|
|
|
+ <if test="deptId != null ">and a.dept_id = #{deptId}</if>
|
|
|
|
+ <if test="deptName != null and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
|
+ <if test="createName != null and createName != ''">and a.create_name like concat('%', #{createName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateName != null and updateName != ''">and a.update_name like concat('%', #{updateName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
|
|
|
+ <if test="number != null and number != ''">and number like concat('%', #{number}, '%')</if>
|
|
|
|
+ <if test="year != null and year != ''">and year = #{year}</if>
|
|
|
|
+ <if test="cyryNum != null and cyryNum != ''">and cyry_num = #{cyryNum}</if>
|
|
|
|
+ <if test="zgzgNum != null and zgzgNum != ''">and zgzg_num = #{zgzgNum}</if>
|
|
|
|
+ <if test="zgjsryNum != null and zgjsryNum != ''">and zgjsry_num = #{zgjsryNum}</if>
|
|
|
|
+ <if test="blldgxNum != null and blldgxNum != ''">and blldgx_num = #{blldgxNum}</if>
|
|
|
|
+ <if test="ltxryNum != null and ltxryNum != ''">and ltxry_num = #{ltxryNum}</if>
|
|
|
|
+ <if test="zgpjrs != null and zgpjrs != ''">and zgpjrs = #{zgpjrs}</if>
|
|
|
|
+ <if test="zgldbc != null and zgldbc != ''">and zgldbc = #{zgldbc}</if>
|
|
|
|
+ ${params.dataScope}
|
|
|
|
+ </where>
|
|
|
|
+ order by a.create_time desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectCenterdataTForestCyryById" parameterType="String" resultMap="CenterdataTForestCyryResult">
|
|
|
|
+ <include refid="selectCenterdataTForestCyryVo"/>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertCenterdataTForestCyry" parameterType="CenterdataTForestCyry">
|
|
|
|
+ insert into centerdata_t_forest_cyry
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">id,</if>
|
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
+ <if test="createName != null">create_name,</if>
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
+ <if test="updateName != null">update_name,</if>
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="name != null">name,</if>
|
|
|
|
+ <if test="number != null">number,</if>
|
|
|
|
+ <if test="year != null">year,</if>
|
|
|
|
+ <if test="cyryNum != null">cyry_num,</if>
|
|
|
|
+ <if test="zgzgNum != null">zgzg_num,</if>
|
|
|
|
+ <if test="zgjsryNum != null">zgjsry_num,</if>
|
|
|
|
+ <if test="blldgxNum != null">blldgx_num,</if>
|
|
|
|
+ <if test="ltxryNum != null">ltxry_num,</if>
|
|
|
|
+ <if test="zgpjrs != null">zgpjrs,</if>
|
|
|
|
+ <if test="zgldbc != null">zgldbc,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="createName != null">#{createName},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateName != null">#{updateName},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
|
+ <if test="number != null">#{number},</if>
|
|
|
|
+ <if test="year != null">#{year},</if>
|
|
|
|
+ <if test="cyryNum != null">#{cyryNum},</if>
|
|
|
|
+ <if test="zgzgNum != null">#{zgzgNum},</if>
|
|
|
|
+ <if test="zgjsryNum != null">#{zgjsryNum},</if>
|
|
|
|
+ <if test="blldgxNum != null">#{blldgxNum},</if>
|
|
|
|
+ <if test="ltxryNum != null">#{ltxryNum},</if>
|
|
|
|
+ <if test="zgpjrs != null">#{zgpjrs},</if>
|
|
|
|
+ <if test="zgldbc != null">#{zgldbc},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateCenterdataTForestCyry" parameterType="CenterdataTForestCyry">
|
|
|
|
+ update centerdata_t_forest_cyry
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
+ <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
+ <if test="createName != null">create_name = #{createName},</if>
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
+ <if test="updateName != null">update_name = #{updateName},</if>
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
|
+ <if test="number != null">number = #{number},</if>
|
|
|
|
+ <if test="year != null">year = #{year},</if>
|
|
|
|
+ <if test="cyryNum != null">cyry_num = #{cyryNum},</if>
|
|
|
|
+ <if test="zgzgNum != null">zgzg_num = #{zgzgNum},</if>
|
|
|
|
+ <if test="zgjsryNum != null">zgjsry_num = #{zgjsryNum},</if>
|
|
|
|
+ <if test="blldgxNum != null">blldgx_num = #{blldgxNum},</if>
|
|
|
|
+ <if test="ltxryNum != null">ltxry_num = #{ltxryNum},</if>
|
|
|
|
+ <if test="zgpjrs != null">zgpjrs = #{zgpjrs},</if>
|
|
|
|
+ <if test="zgldbc != null">zgldbc = #{zgldbc},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteCenterdataTForestCyryById" parameterType="String">
|
|
|
|
+ delete
|
|
|
|
+ from centerdata_t_forest_cyry
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteCenterdataTForestCyryByIds" parameterType="String">
|
|
|
|
+ delete from centerdata_t_forest_cyry where id in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|