|
@@ -11,6 +11,7 @@
|
|
|
|
|
|
<result column="unit_price" property="unitPrice" />
|
|
|
<result column="daily_rent" property="dailyRent" />
|
|
|
+ <result column="pay_method" property="payMethod" />
|
|
|
<result column="build_area" property="buildArea" />
|
|
|
<result column="floor_total" property="floorTotal" />
|
|
|
<result column="floor_current" property="floorCurrent" />
|
|
@@ -49,8 +50,8 @@
|
|
|
resultMap="businessAreaResult" />
|
|
|
<association property="road" column="road_area_id" javaType="Road"
|
|
|
resultMap="roadResult" />
|
|
|
- <association property="agentId" column="agent_id" javaType="User"
|
|
|
- resultMap="userResult" />
|
|
|
+ <association property="agent" column="agent_id" javaType="AppUser"
|
|
|
+ resultMap="appUserResult" />
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="areaResult" type="Areas">
|
|
@@ -69,15 +70,15 @@
|
|
|
<result property="name" column="r_name" />
|
|
|
</resultMap>
|
|
|
|
|
|
- <resultMap id="userResult" type="User">
|
|
|
- <id property="userId" column="user_id" />
|
|
|
- <result property="userName" column="user_name" />
|
|
|
+ <resultMap id="appUserResult" type="AppUser">
|
|
|
+ <id property="id" column="id" />
|
|
|
+ <result property="account" column="account" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
DISTINCT s1.id,
|
|
|
s1.city_id,s1.area_id,s1.business_area_id,s1.road_area_id,s1.real_address,s1.open_time,
|
|
|
- s1.name,s1.rent_type,s1.unit_price,s1.daily_rent,s1.build_area,s1.floor_total,s1.floor_current,s1.station1,s1.station2,s1.developer,
|
|
|
+ s1.name,s1.rent_type,s1.unit_price,s1.daily_rent,s1.pay_method,s1.build_area,s1.floor_total,s1.floor_current,s1.station1,s1.station2,s1.developer,
|
|
|
s1.fee_property,s1.decorate,s1.register,s1.separate,s1.profile,s1.img_paper,
|
|
|
s1.imgs,s1.plane_imgs,s1.entrust_paper,s1.commission,
|
|
|
s1.expired,s1.linkman,s1.phone,s1.fee_service,s1.office_number,
|
|
@@ -104,11 +105,12 @@
|
|
|
<!-- 写字楼列表 -->
|
|
|
<select id="selectOfficeList" parameterType="Office" resultMap="BaseResultMap" >
|
|
|
select
|
|
|
- <include refid="Base_Column_List"/>,a1.area_name,a1.sort,ba1.name as ba_name,r1.name as r_name
|
|
|
+ <include refid="Base_Column_List"/>,a1.area_name,a1.sort,ba1.name as ba_name,r1.name as r_name,ua1.account
|
|
|
from office s1
|
|
|
left join areas a1 on a1.id = s1.area_id
|
|
|
left join business_area ba1 on ba1.id = s1.business_area_id
|
|
|
left join road r1 on r1.id = s1.road_area_id
|
|
|
+ left join user_app ua1 on ua1.id = s1.agent_id
|
|
|
where 1 = 1
|
|
|
<if test="linkman != null and linkman != ''">
|
|
|
AND linkman like concat('%', ${linkman}, '%')
|
|
@@ -169,7 +171,7 @@
|
|
|
<insert id="insertOffice" parameterType="Office" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into office (
|
|
|
area_id,business_area_id,road_area_id,real_address,rent_type,type,open_time,
|
|
|
- name,unit_price,ave_price,daily_rent,build_area,floor_total,floor_current,station1,station2,developer,
|
|
|
+ name,unit_price,ave_price,pay_method,daily_rent,build_area,floor_total,floor_current,station1,station2,developer,
|
|
|
fee_property,decorate,register,separate,profile,img_paper,
|
|
|
entrust_paper,commission,expired,
|
|
|
linkman,phone,fee_service,office_number,
|
|
@@ -178,7 +180,7 @@
|
|
|
create_time,update_time
|
|
|
)values(
|
|
|
#{areaId},#{businessAreaId},#{roadId},#{realAddress},#{rentType},#{type},#{openTime},
|
|
|
- #{name},#{unitPrice},#{avePrice},#{dailyRent},#{buildArea},#{floorTotal},#{floorCurrent},#{station1},#{station2},#{developer},
|
|
|
+ #{name},#{unitPrice},#{avePrice},#{payMethod},#{dailyRent},#{buildArea},#{floorTotal},#{floorCurrent},#{station1},#{station2},#{developer},
|
|
|
#{feeProperty},#{decorate},#{register},#{separate},#{profile},#{imgPaper},
|
|
|
#{entrustPaper},#{commission},#{expired},
|
|
|
#{linkman},#{phone},#{feeService},#{officeNumber},
|
|
@@ -195,6 +197,7 @@
|
|
|
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
|
|
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
|
|
<if test="rentType != null ">rent_type = #{rentType},</if>
|
|
|
+ <if test="payMethod != null ">pay_method = #{payMethod},</if>
|
|
|
<if test="floorTotal != null ">floor_total = #{floorTotal},</if>
|
|
|
<if test="floorCurrent != null ">floor_current = #{floorCurrent},</if>
|
|
|
<if test="station1 != null ">station1 = #{station1},</if>
|