|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- <?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.resource.mapper.TResourceOperationMapper">
-
- <resultMap type="TResourceOperation" id="TResourceOperationResult">
- <result property="id" column="id" />
- <result property="dkbm" column="dkbm" />
- <result property="dkmc" column="dkmc" />
- <result property="dkdz" column="dkdz" />
- <result property="dkxz" column="dkxz" />
- <result property="dknz" column="dknz" />
- <result property="dkbz" column="dkbz" />
- <result property="jymj" column="jymj" />
- <result property="jyfs" column="jyfs" />
- <result property="jydxmc" column="jydxmc" />
- <result property="jykssj" column="jykssj" />
- <result property="jyjssj" column="jyjssj" />
- <result property="cbje" column="cbje" />
- <result property="bz" column="bz" />
- <result property="dkImg" column="dk_img" />
- <result property="surveyStatus" column="survey_status" />
- <result property="importCode" column="import_code" />
- <result property="deptName" column="dept_name" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- </resultMap>
-
- <sql id="selectTResourceOperationVo">
- select id, dkbm, dkmc, dkdz, dkxz, dknz, dkbz, jymj, jyfs, jydxmc, jykssj, jyjssj, cbje, bz, dk_img, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_operation
- </sql>
-
- <select id="selectTResourceOperationList" parameterType="TResourceOperation" resultMap="TResourceOperationResult">
- <include refid="selectTResourceOperationVo"/>
- <where>
- <if test="dkbm != null and dkbm != ''"> and dkbm = #{dkbm}</if>
- <if test="dkmc != null and dkmc != ''"> and dkmc = #{dkmc}</if>
- <if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if>
- <if test="importCode != null and importCode != ''"> and import_code like concat('%', #{importCode}, '%')</if>
- </where>
- </select>
-
- <select id="selectTResourceOperationById" parameterType="Long" resultMap="TResourceOperationResult">
- <include refid="selectTResourceOperationVo"/>
- where id = #{id}
- </select>
-
- <select id="selectTResourceOperationByDkbm" parameterType="String" resultMap="TResourceOperationResult">
- <include refid="selectTResourceOperationVo"/>
- where dkbm = #{dkbm}
- </select>
-
- <insert id="insertTResourceOperation" parameterType="TResourceOperation" useGeneratedKeys="true" keyProperty="id">
- insert into t_resource_operation
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="dkbm != null and dkbm != ''">dkbm,</if>
- <if test="dkmc != null and dkmc != ''">dkmc,</if>
- <if test="dkdz != null">dkdz,</if>
- <if test="dkxz != null">dkxz,</if>
- <if test="dknz != null">dknz,</if>
- <if test="dkbz != null">dkbz,</if>
- <if test="jymj != null">jymj,</if>
- <if test="jyfs != null and jyfs != ''">jyfs,</if>
- <if test="jydxmc != null and jydxmc != ''">jydxmc,</if>
- <if test="jykssj != null and jykssj != ''">jykssj,</if>
- <if test="jyjssj != null and jyjssj != ''">jyjssj,</if>
- <if test="cbje != null">cbje,</if>
- <if test="bz != null">bz,</if>
- <if test="dkImg != null">dk_img,</if>
- <if test="surveyStatus != null and surveyStatus != ''">survey_status,</if>
- <if test="importCode != null and importCode != ''">import_code,</if>
- <if test="deptName != null">dept_name,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="dkbm != null and dkbm != ''">#{dkbm},</if>
- <if test="dkmc != null and dkmc != ''">#{dkmc},</if>
- <if test="dkdz != null">#{dkdz},</if>
- <if test="dkxz != null">#{dkxz},</if>
- <if test="dknz != null">#{dknz},</if>
- <if test="dkbz != null">#{dkbz},</if>
- <if test="jymj != null">#{jymj},</if>
- <if test="jyfs != null and jyfs != ''">#{jyfs},</if>
- <if test="jydxmc != null and jydxmc != ''">#{jydxmc},</if>
- <if test="jykssj != null and jykssj != ''">#{jykssj},</if>
- <if test="jyjssj != null and jyjssj != ''">#{jyjssj},</if>
- <if test="cbje != null">#{cbje},</if>
- <if test="bz != null">#{bz},</if>
- <if test="dkImg != null">#{dkImg},</if>
- <if test="surveyStatus != null and surveyStatus != ''">#{surveyStatus},</if>
- <if test="importCode != null and importCode != ''">#{importCode},</if>
- <if test="deptName != null">#{deptName},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- </trim>
- </insert>
-
- <insert id="insertTResourceOperationBatch" parameterType="list" useGeneratedKeys="true" keyProperty="id">
- insert into t_resource_operation
- <trim prefix="(" suffix=")" suffixOverrides=",">
- dkbm,
- dkmc,
- dkdz,
- dkxz,
- dknz,
- dkbz,
- jymj,
- jyfs,
- jydxmc,
- jykssj,
- jyjssj,
- cbje,
- bz,
- dk_img,
- survey_status,
- import_code,
- dept_name,
- create_by,
- create_time,
- update_by,
- update_time,
- </trim>
- values
- <foreach item="item" collection="list" separator="," >
- <trim prefix="(" suffix=")" suffixOverrides=",">
- #{item.dkbm},
- #{item.dkmc},
- #{item.dkdz},
- #{item.dkxz},
- #{item.dknz},
- #{item.dkbz},
- #{item.jymj},
- #{item.jyfs},
- #{item.jydxmc},
- #{item.jykssj},
- #{item.jyjssj},
- #{item.cbje},
- #{item.bz},
- #{item.dkImg},
- #{item.surveyStatus},
- #{item.importCode},
- #{item.deptName},
- #{item.createBy},
- #{item.createTime},
- #{item.updateBy},
- #{item.updateTime},
- </trim>
- </foreach>
- </insert>
-
- <update id="updateTResourceOperation" parameterType="TResourceOperation">
- update t_resource_operation
- <trim prefix="SET" suffixOverrides=",">
- <if test="dkbm != null and dkbm != ''">dkbm = #{dkbm},</if>
- <if test="dkmc != null and dkmc != ''">dkmc = #{dkmc},</if>
- <if test="dkdz != null">dkdz = #{dkdz},</if>
- <if test="dkxz != null">dkxz = #{dkxz},</if>
- <if test="dknz != null">dknz = #{dknz},</if>
- <if test="dkbz != null">dkbz = #{dkbz},</if>
- <if test="jymj != null">jymj = #{jymj},</if>
- <if test="jyfs != null and jyfs != ''">jyfs = #{jyfs},</if>
- <if test="jydxmc != null and jydxmc != ''">jydxmc = #{jydxmc},</if>
- <if test="jykssj != null and jykssj != ''">jykssj = #{jykssj},</if>
- <if test="jyjssj != null and jyjssj != ''">jyjssj = #{jyjssj},</if>
- <if test="cbje != null">cbje = #{cbje},</if>
- <if test="bz != null">bz = #{bz},</if>
- <if test="dkImg != null">dk_img = #{dkImg},</if>
- <if test="surveyStatus != null and surveyStatus != ''">survey_status = #{surveyStatus},</if>
- <if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
- <if test="deptName != null">dept_name = #{deptName},</if>
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- </trim>
- where id = #{id}
- </update>
-
- <!--批量更新-->
- <update id="updateTResourceOperationBatch" parameterType="list" >
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- update t_resource_operation
- <set>
- <if test="item.dkbm != null and item.dkbm != ''">dkbm = #{item.dkbm},</if>
- <if test="item.dkmc != null and item.dkmc != ''">dkmc = #{item.dkmc},</if>
- <if test="item.dkdz != null">dkdz = #{item.dkdz},</if>
- <if test="item.dkxz != null">dkxz = #{item.dkxz},</if>
- <if test="item.dknz != null">dknz = #{item.dknz},</if>
- <if test="item.dkbz != null">dkbz = #{item.dkbz},</if>
- <if test="item.jymj != null">jymj = #{item.jymj},</if>
- <if test="item.jyfs != null and item.jyfs != ''">jyfs = #{item.jyfs},</if>
- <if test="item.jydxmc != null and item.jydxmc != ''">jydxmc = #{item.jydxmc},</if>
- <if test="item.jykssj != null and item.jykssj != ''">jykssj = #{item.jykssj},</if>
- <if test="item.jyjssj != null and item.jyjssj != ''">jyjssj = #{item.jyjssj},</if>
- <if test="item.cbje != null">cbje = #{item.cbje},</if>
- <if test="item.bz != null">bz = #{item.bz},</if>
- <if test="item.dkImg != null">dk_img = #{item.dkImg},</if>
- <if test="item.surveyStatus != null and item.surveyStatus != ''">survey_status = #{item.surveyStatus},</if>
- <if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
- <if test="item.deptName != null">dept_name = #{item.deptName},</if>
- <if test="item.createBy != null and item.createBy != ''">create_by = #{item.createBy},</if>
- <if test="item.createTime != null">create_time = #{item.createTime},</if>
- <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
- <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
- </set>
- where id = #{item.id}
- </foreach>
- </update>
-
- <delete id="deleteTResourceOperationById" parameterType="Long">
- delete from t_resource_operation where id = #{id}
- </delete>
-
- <delete id="deleteTResourceOperationByIds" parameterType="String">
- delete from t_resource_operation where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|