| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?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="firstField" column="first_field" />
- <result property="secondField" column="second_field" />
- <result property="thirdField" column="third_field" />
- <result property="fourthField" column="fourth_field" />
- <result property="firstContent" column="first_content" />
- <result property="secondContent" column="second_content" />
- <result property="thirdContent" column="third_content" />
- <result property="fourthContent" column="fourth_content" />
- </resultMap>
- <sql id="selectFsProjectVo">
- select id, project_name, day_name, create_time, update_time, meridians_img_url, first_field, second_field, third_field, fourth_field, first_content, second_content, third_content, fourth_content 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="firstField != null and firstField != ''"> and first_field = #{firstField}</if>
- <if test="secondField != null and secondField != ''"> and second_field = #{secondField}</if>
- <if test="thirdField != null and thirdField != ''"> and third_field = #{thirdField}</if>
- <if test="fourthField != null and fourthField != ''"> and fourth_field = #{fourthField}</if>
- <if test="firstContent != null and firstContent != ''"> and first_content = #{firstContent}</if>
- <if test="secondContent != null and secondContent != ''"> and second_content = #{secondContent}</if>
- <if test="thirdContent != null and thirdContent != ''"> and third_content = #{thirdContent}</if>
- <if test="fourthContent != null and fourthContent != ''"> and fourth_content = #{fourthContent}</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="firstField != null">first_field,</if>
- <if test="secondField != null">second_field,</if>
- <if test="thirdField != null">third_field,</if>
- <if test="fourthField != null">fourth_field,</if>
- <if test="firstContent != null">first_content,</if>
- <if test="secondContent != null">second_content,</if>
- <if test="thirdContent != null">third_content,</if>
- <if test="fourthContent != null">fourth_content,</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="firstField != null">#{firstField},</if>
- <if test="secondField != null">#{secondField},</if>
- <if test="thirdField != null">#{thirdField},</if>
- <if test="fourthField != null">#{fourthField},</if>
- <if test="firstContent != null">#{firstContent},</if>
- <if test="secondContent != null">#{secondContent},</if>
- <if test="thirdContent != null">#{thirdContent},</if>
- <if test="fourthContent != null">#{fourthContent},</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="firstField != null">first_field = #{firstField},</if>
- <if test="secondField != null">second_field = #{secondField},</if>
- <if test="thirdField != null">third_field = #{thirdField},</if>
- <if test="fourthField != null">fourth_field = #{fourthField},</if>
- <if test="firstContent != null">first_content = #{firstContent},</if>
- <if test="secondContent != null">second_content = #{secondContent},</if>
- <if test="thirdContent != null">third_content = #{thirdContent},</if>
- <if test="fourthContent != null">fourth_content = #{fourthContent},</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>
|