123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?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.system.mapper.project.BmConstructionEntryMapper">
-
- <resultMap type="BmConstructionEntry" id="BmConstructionEntryResult">
- <result property="id" column="id" />
- <result property="bmProjectId" column="bm_project_id" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="isDel" column="is_del" />
- <result property="statisticsDate" column="statistics_date" />
- <result property="statisticsPhoto" column="statistics_photo" />
- </resultMap>
- <sql id="selectBmConstructionEntryVo">
- select id, bm_project_id, create_by, create_time, update_by, update_time, is_del, statistics_date, statistics_photo from bm_construction_entry
- </sql>
- <select id="selectBmConstructionEntryList" parameterType="BmConstructionEntry" resultMap="BmConstructionEntryResult">
- <include refid="selectBmConstructionEntryVo"/>
- <where>
- <if test="bmProjectId != null "> and bm_project_id = #{bmProjectId}</if>
- <if test="isDel != null "> and is_del = #{isDel}</if>
- <if test="statisticsDate != null "> and statistics_date = #{statisticsDate}</if>
- <if test="statisticsPhoto != null and statisticsPhoto != ''"> and statistics_photo = #{statisticsPhoto}</if>
- </where>
- </select>
-
- <select id="selectBmConstructionEntryById" parameterType="Long" resultMap="BmConstructionEntryResult">
- <include refid="selectBmConstructionEntryVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertBmConstructionEntry" parameterType="BmConstructionEntry" useGeneratedKeys="true" keyProperty="id">
- insert into bm_construction_entry
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="bmProjectId != null">bm_project_id,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="isDel != null">is_del,</if>
- <if test="statisticsDate != null">statistics_date,</if>
- <if test="statisticsPhoto != null">statistics_photo,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="bmProjectId != null">#{bmProjectId},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="isDel != null">#{isDel},</if>
- <if test="statisticsDate != null">#{statisticsDate},</if>
- <if test="statisticsPhoto != null">#{statisticsPhoto},</if>
- </trim>
- </insert>
- <update id="updateBmConstructionEntry" parameterType="BmConstructionEntry">
- update bm_construction_entry
- <trim prefix="SET" suffixOverrides=",">
- <if test="bmProjectId != null">bm_project_id = #{bmProjectId},</if>
- <if test="createBy != null">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>
- <if test="isDel != null">is_del = #{isDel},</if>
- <if test="statisticsDate != null">statistics_date = #{statisticsDate},</if>
- <if test="statisticsPhoto != null">statistics_photo = #{statisticsPhoto},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteBmConstructionEntryById" parameterType="Long">
- delete from bm_construction_entry where id = #{id}
- </delete>
- <delete id="deleteBmConstructionEntryByIds" parameterType="String">
- delete from bm_construction_entry where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|