|
|
@@ -0,0 +1,93 @@
|
|
|
+<?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.fs.his.mapper.FsProjectMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsProject" id="FsProjectResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="projectName" column="project_name" />
|
|
|
+ <result property="dayName" column="day_name" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="meridiansImgUrl" column="meridians_img_url" />
|
|
|
+ <result property="qcField" column="qc_field" />
|
|
|
+ <result property="jldhField" column="jldh_field" />
|
|
|
+ <result property="xxtsField" column="xxts_field" />
|
|
|
+ <result property="djxjField" column="djxj_field" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsProjectVo">
|
|
|
+ select id, project_name, day_name, create_time, update_time, meridians_img_url, qc_field, jldh_field, xxts_field, djxj_field from fs_project
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsProjectList" parameterType="FsProject" resultMap="FsProjectResult">
|
|
|
+ <include refid="selectFsProjectVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
|
|
+ <if test="dayName != null and dayName != ''"> and day_name like concat('%', #{dayName}, '%')</if>
|
|
|
+ <if test="meridiansImgUrl != null and meridiansImgUrl != ''"> and meridians_img_url = #{meridiansImgUrl}</if>
|
|
|
+ <if test="qcField != null and qcField != ''"> and qc_field = #{qcField}</if>
|
|
|
+ <if test="jldhField != null and jldhField != ''"> and jldh_field = #{jldhField}</if>
|
|
|
+ <if test="xxtsField != null and xxtsField != ''"> and xxts_field = #{xxtsField}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsProjectById" parameterType="Long" resultMap="FsProjectResult">
|
|
|
+ <include refid="selectFsProjectVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsProject" parameterType="FsProject" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fs_project
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="projectName != null">project_name,</if>
|
|
|
+ <if test="dayName != null">day_name,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="meridiansImgUrl != null">meridians_img_url,</if>
|
|
|
+ <if test="qcField != null">qc_field,</if>
|
|
|
+ <if test="jldhField != null">jldh_field,</if>
|
|
|
+ <if test="xxtsField != null">xxts_field,</if>
|
|
|
+ <if test="djxjField != null">djxj_field,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="projectName != null">#{projectName},</if>
|
|
|
+ <if test="dayName != null">#{dayName},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="meridiansImgUrl != null">#{meridiansImgUrl},</if>
|
|
|
+ <if test="qcField != null">#{qcField},</if>
|
|
|
+ <if test="jldhField != null">#{jldhField},</if>
|
|
|
+ <if test="xxtsField != null">#{xxtsField},</if>
|
|
|
+ <if test="djxjField != null">#{djxjField},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsProject" parameterType="FsProject">
|
|
|
+ update fs_project
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="projectName != null">project_name = #{projectName},</if>
|
|
|
+ <if test="dayName != null">day_name = #{dayName},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="meridiansImgUrl != null">meridians_img_url = #{meridiansImgUrl},</if>
|
|
|
+ <if test="qcField != null">qc_field = #{qcField},</if>
|
|
|
+ <if test="jldhField != null">jldh_field = #{jldhField},</if>
|
|
|
+ <if test="xxtsField != null">xxts_field = #{xxtsField},</if>
|
|
|
+ <if test="djxjField != null">djxj_field = #{djxjField},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsProjectById" parameterType="Long">
|
|
|
+ delete from fs_project where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsProjectByIds" parameterType="String">
|
|
|
+ delete from fs_project where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|