|
@@ -0,0 +1,91 @@
|
|
|
+<?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.PropertySettingsMapper">
|
|
|
+
|
|
|
+ <resultMap type="PropertySettings" id="PropertySettingsResult">
|
|
|
+ <result property="settingsId" column="settings_id" />
|
|
|
+ <result property="tenementExpense" column="tenement_expense" />
|
|
|
+ <result property="parkingExpense" column="parking_expense" />
|
|
|
+ <result property="energyExpense" column="energy_expense" />
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
+ <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="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectPropertySettingsVo">
|
|
|
+ select settings_id, tenement_expense, parking_expense, energy_expense, is_del, create_by, create_time, update_by, update_time, remark from property_settings
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectPropertySettingsList" parameterType="PropertySettings" resultMap="PropertySettingsResult">
|
|
|
+ <include refid="selectPropertySettingsVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="tenementExpense != null "> and tenement_expense = #{tenementExpense}</if>
|
|
|
+ <if test="parkingExpense != null "> and parking_expense = #{parkingExpense}</if>
|
|
|
+ <if test="energyExpense != null "> and energy_expense = #{energyExpense}</if>
|
|
|
+ <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectPropertySettingsBySettingsId" parameterType="Long" resultMap="PropertySettingsResult">
|
|
|
+ <include refid="selectPropertySettingsVo"/>
|
|
|
+ where settings_id = #{settingsId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertPropertySettings" parameterType="PropertySettings" useGeneratedKeys="true" keyProperty="settingsId">
|
|
|
+ insert into property_settings
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="tenementExpense != null">tenement_expense,</if>
|
|
|
+ <if test="parkingExpense != null">parking_expense,</if>
|
|
|
+ <if test="energyExpense != null">energy_expense,</if>
|
|
|
+ <if test="isDel != null">is_del,</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="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="tenementExpense != null">#{tenementExpense},</if>
|
|
|
+ <if test="parkingExpense != null">#{parkingExpense},</if>
|
|
|
+ <if test="energyExpense != null">#{energyExpense},</if>
|
|
|
+ <if test="isDel != null">#{isDel},</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="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updatePropertySettings" parameterType="PropertySettings">
|
|
|
+ update property_settings
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="tenementExpense != null">tenement_expense = #{tenementExpense},</if>
|
|
|
+ <if test="parkingExpense != null">parking_expense = #{parkingExpense},</if>
|
|
|
+ <if test="energyExpense != null">energy_expense = #{energyExpense},</if>
|
|
|
+ <if test="isDel != null">is_del = #{isDel},</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="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where settings_id = #{settingsId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deletePropertySettingsBySettingsId" parameterType="Long">
|
|
|
+ update property_settings set is_del = "Y" where settings_id = #{settingsId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deletePropertySettingsBySettingsIds" parameterType="String">
|
|
|
+ delete from property_settings where settings_id in
|
|
|
+ <foreach item="settingsId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{settingsId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|