|
@@ -1,116 +0,0 @@
|
|
|
-<?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.AdCommunityManagementMapper">
|
|
|
-
|
|
|
- <resultMap type="AdCommunityManagement" id="AdCommunityManagementResult">
|
|
|
- <result property="id" column="Id" />
|
|
|
- <result property="name" column="name" />
|
|
|
- <result property="town" column="town" />
|
|
|
- <result property="area" column="area" />
|
|
|
- <result property="businessDistrict" column="business_district" />
|
|
|
- <result property="type" column="type" />
|
|
|
- <result property="cityLevel" column="city_level" />
|
|
|
- <result property="price" column="price" />
|
|
|
- <result property="secondHandPrice" column="second_hand_price" />
|
|
|
- <result property="householdSize" column="household_size" />
|
|
|
- <result property="administrativeFee" column="administrative_fee" />
|
|
|
- <result property="whetherTheBlank" column="Whether_the_blank" />
|
|
|
- <result property="towerAge" column="tower_age" />
|
|
|
- <result property="towerHeight" column="tower_height" />
|
|
|
- </resultMap>
|
|
|
-
|
|
|
- <sql id="selectAdCommunityManagementVo">
|
|
|
- select Id, name, town, area, business_district, type, city_level, price, second_hand_price, household_size, administrative_fee, Whether_the_blank, tower_age, tower_height from ad_community_management
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="selectAdCommunityManagementList" parameterType="AdCommunityManagement" resultMap="AdCommunityManagementResult">
|
|
|
- <include refid="selectAdCommunityManagementVo"/>
|
|
|
- <where>
|
|
|
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="town != null and town != ''"> and town like concat('%', #{town}, '%')</if>
|
|
|
- <if test="area != null and area != ''"> and area like concat('%', #{area}, '%')</if>
|
|
|
- <if test="businessDistrict != null and businessDistrict != ''"> and business_district like concat('%', #{businessDistrict}, '%')</if>
|
|
|
- <if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
|
|
|
- <if test="cityLevel != null and cityLevel != ''"> and city_level like concat('%', #{cityLevel}, '%')</if>
|
|
|
- <if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
|
|
|
- <if test="secondHandPrice != null and secondHandPrice != ''"> and second_hand_price like concat('%', #{secondHandPrice}, '%')</if>
|
|
|
- <if test="householdSize != null and householdSize != ''"> and household_size like concat('%', #{householdSize}, '%')</if>
|
|
|
- <if test="administrativeFee != null and administrativeFee != ''"> and administrative_fee = #{administrativeFee}</if>
|
|
|
- <if test="whetherTheBlank != null and whetherTheBlank != ''"> and Whether_the_blank like concat('%', #{whetherTheBlank}, '%')</if>
|
|
|
- <if test="towerAge != null and towerAge != ''"> and tower_age = #{towerAge}</if>
|
|
|
- <if test="towerHeight != null and towerHeight != ''"> and tower_height = #{towerHeight}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectAdCommunityManagementById" parameterType="Long" resultMap="AdCommunityManagementResult">
|
|
|
- <include refid="selectAdCommunityManagementVo"/>
|
|
|
- where Id = #{id}
|
|
|
- </select>
|
|
|
-
|
|
|
- <insert id="insertAdCommunityManagement" parameterType="AdCommunityManagement" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into ad_community_management
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="name != null">name,</if>
|
|
|
- <if test="town != null">town,</if>
|
|
|
- <if test="area != null">area,</if>
|
|
|
- <if test="businessDistrict != null">business_district,</if>
|
|
|
- <if test="type != null">type,</if>
|
|
|
- <if test="cityLevel != null">city_level,</if>
|
|
|
- <if test="price != null">price,</if>
|
|
|
- <if test="secondHandPrice != null">second_hand_price,</if>
|
|
|
- <if test="householdSize != null">household_size,</if>
|
|
|
- <if test="administrativeFee != null">administrative_fee,</if>
|
|
|
- <if test="whetherTheBlank != null">Whether_the_blank,</if>
|
|
|
- <if test="towerAge != null">tower_age,</if>
|
|
|
- <if test="towerHeight != null">tower_height,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="name != null">#{name},</if>
|
|
|
- <if test="town != null">#{town},</if>
|
|
|
- <if test="area != null">#{area},</if>
|
|
|
- <if test="businessDistrict != null">#{businessDistrict},</if>
|
|
|
- <if test="type != null">#{type},</if>
|
|
|
- <if test="cityLevel != null">#{cityLevel},</if>
|
|
|
- <if test="price != null">#{price},</if>
|
|
|
- <if test="secondHandPrice != null">#{secondHandPrice},</if>
|
|
|
- <if test="householdSize != null">#{householdSize},</if>
|
|
|
- <if test="administrativeFee != null">#{administrativeFee},</if>
|
|
|
- <if test="whetherTheBlank != null">#{whetherTheBlank},</if>
|
|
|
- <if test="towerAge != null">#{towerAge},</if>
|
|
|
- <if test="towerHeight != null">#{towerHeight},</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="updateAdCommunityManagement" parameterType="AdCommunityManagement">
|
|
|
- update ad_community_management
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="name != null">name = #{name},</if>
|
|
|
- <if test="town != null">town = #{town},</if>
|
|
|
- <if test="area != null">area = #{area},</if>
|
|
|
- <if test="businessDistrict != null">business_district = #{businessDistrict},</if>
|
|
|
- <if test="type != null">type = #{type},</if>
|
|
|
- <if test="cityLevel != null">city_level = #{cityLevel},</if>
|
|
|
- <if test="price != null">price = #{price},</if>
|
|
|
- <if test="secondHandPrice != null">second_hand_price = #{secondHandPrice},</if>
|
|
|
- <if test="householdSize != null">household_size = #{householdSize},</if>
|
|
|
- <if test="administrativeFee != null">administrative_fee = #{administrativeFee},</if>
|
|
|
- <if test="whetherTheBlank != null">Whether_the_blank = #{whetherTheBlank},</if>
|
|
|
- <if test="towerAge != null">tower_age = #{towerAge},</if>
|
|
|
- <if test="towerHeight != null">tower_height = #{towerHeight},</if>
|
|
|
- </trim>
|
|
|
- where Id = #{id}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="deleteAdCommunityManagementById" parameterType="Long">
|
|
|
- delete from ad_community_management where Id = #{id}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deleteAdCommunityManagementByIds" parameterType="String">
|
|
|
- delete from ad_community_management where Id in
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
-</mapper>
|