| New file |
| | |
| | | <?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="buildingRoomV1ServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- ä¿åæ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <insert id="saveBuildingRoomInfo" parameterType="Map"> |
| | | insert into building_room( |
| | | section,remark,room_sub_type,room_area,user_id,room_id,layer,fee_coefficient,built_up_area,room_num,unit_id,state,community_id,apartment,room_type,room_rent |
| | | ) values ( |
| | | #{section},#{remark},#{roomSubType},#{roomArea},#{userId},#{roomId},#{layer},#{feeCoefficient},#{builtUpArea},#{roomNum},#{unitId},#{state},#{communityId},#{apartment},#{roomType},#{roomRent} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- æ¥è¯¢æ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <select id="getBuildingRoomInfo" parameterType="Map" resultType="Map"> |
| | | select t.section,t.remark,t.status_cd,t.status_cd statusCd,t.room_sub_type,t.room_sub_type roomSubType,t.room_area,t.room_area roomArea,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.fee_coefficient,t.fee_coefficient feeCoefficient,t.built_up_area,t.built_up_area builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.state,t.community_id,t.community_id communityId,t.apartment,t.room_type,t.room_type roomType,t.room_rent,t.room_rent roomRent |
| | | from building_room t |
| | | where 1 =1 |
| | | <if test="section !=null and section != ''"> |
| | | and t.section= #{section} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | and t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | and t.layer= #{layer} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | and t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | and t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | and t.room_type= #{roomType} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | and t.room_rent= #{roomRent} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- ä¿®æ¹æ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <update id="updateBuildingRoomInfo" parameterType="Map"> |
| | | update building_room t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="section !=null and section != ''"> |
| | | , t.section= #{section} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | , t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | , t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | , t.layer= #{layer} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | , t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | , t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | , t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | , t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | , t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | , t.room_type= #{roomType} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | , t.room_rent= #{roomRent} |
| | | </if> |
| | | where 1=1 <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- æ¥è¯¢æ¿å±æ°é add by wuxw 2018-07-03 --> |
| | | <select id="queryBuildingRoomsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from building_room t |
| | | where 1 =1 |
| | | <if test="section !=null and section != ''"> |
| | | and t.section= #{section} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | and t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | and t.layer= #{layer} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | and t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | and t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | and t.room_type= #{roomType} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | and t.room_rent= #{roomRent} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?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="roomV1ServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- ä¿åæ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <insert id="saveRoomInfo" parameterType="Map"> |
| | | insert into building_room( |
| | | section,remark,room_sub_type,room_area,user_id,room_id,layer,fee_coefficient,built_up_area,room_num,unit_id,state,community_id,apartment,room_type,room_rent |
| | | ) values ( |
| | | #{section},#{remark},#{roomSubType},#{roomArea},#{userId},#{roomId},#{layer},#{feeCoefficient},#{builtUpArea},#{roomNum},#{unitId},#{state},#{communityId},#{apartment},#{roomType},#{roomRent} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- æ¥è¯¢æ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <select id="getRoomInfo" parameterType="Map" resultType="Map"> |
| | | select t.section,t.remark,t.status_cd,t.status_cd statusCd,t.room_sub_type,t.room_sub_type roomSubType,t.room_area,t.room_area roomArea,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.fee_coefficient,t.fee_coefficient feeCoefficient,t.built_up_area,t.built_up_area builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.state,t.community_id,t.community_id communityId,t.apartment,t.room_type,t.room_type roomType,t.room_rent,t.room_rent roomRent |
| | | from building_room t |
| | | where 1 =1 |
| | | <if test="section !=null and section != ''"> |
| | | and t.section= #{section} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | and t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | and t.layer= #{layer} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | and t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | and t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | and t.room_type= #{roomType} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | and t.room_rent= #{roomRent} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- ä¿®æ¹æ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <update id="updateRoomInfo" parameterType="Map"> |
| | | update building_room t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="section !=null and section != ''"> |
| | | , t.section= #{section} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | , t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | , t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | , t.layer= #{layer} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | , t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | , t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | , t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | , t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | , t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | , t.room_type= #{roomType} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | , t.room_rent= #{roomRent} |
| | | </if> |
| | | where 1=1 <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- æ¥è¯¢æ¿å±æ°é add by wuxw 2018-07-03 --> |
| | | <select id="queryRoomsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from building_room t |
| | | where 1 =1 |
| | | <if test="section !=null and section != ''"> |
| | | and t.section= #{section} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | and t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | and t.layer= #{layer} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | and t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | and t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | and t.room_type= #{roomType} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | and t.room_rent= #{roomRent} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?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="æ¿å±IDV1ServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- ä¿åæ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <insert id="saveæ¿å±IDInfo" parameterType="Map"> |
| | | insert into building_room( |
| | | remark,room_area,room_sub_type,section,user_id,layer,room_id,fee_coefficient,built_up_area,room_num,unit_id,state,b_id,community_id,apartment,room_rent,room_type |
| | | ) values ( |
| | | #{remark},#{roomArea},#{roomSubType},#{section},#{userId},#{layer},#{roomId},#{feeCoefficient},#{builtUpArea},#{roomNum},#{unitId},#{state},#{bId},#{communityId},#{apartment},#{roomRent},#{roomType} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- æ¥è¯¢æ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <select id="getæ¿å±IDInfo" parameterType="Map" resultType="Map"> |
| | | select t.remark,t.room_area,t.room_area roomArea,t.room_sub_type,t.room_sub_type roomSubType,t.section,t.status_cd,t.status_cd statusCd,t.user_id,t.user_id userId,t.layer,t.room_id,t.room_id roomId,t.fee_coefficient,t.fee_coefficient feeCoefficient,t.built_up_area,t.built_up_area builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.state,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.apartment,t.room_rent,t.room_rent roomRent,t.room_type,t.room_type roomType |
| | | from building_room t |
| | | where 1 =1 |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | and t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="section !=null and section != ''"> |
| | | and t.section= #{section} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | and t.layer= #{layer} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | and t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | and t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | and t.room_rent= #{roomRent} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | and t.room_type= #{roomType} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- ä¿®æ¹æ¿å±ä¿¡æ¯ add by wuxw 2018-07-03 --> |
| | | <update id="updateæ¿å±IDInfo" parameterType="Map"> |
| | | update building_room t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | , t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | , t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="section !=null and section != ''"> |
| | | , t.section= #{section} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | , t.layer= #{layer} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | , t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | , t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | , t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | , t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | , t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | , t.room_rent= #{roomRent} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | , t.room_type= #{roomType} |
| | | </if> |
| | | where 1=1 <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- æ¥è¯¢æ¿å±æ°é add by wuxw 2018-07-03 --> |
| | | <select id="queryæ¿å±IDsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from building_room t |
| | | where 1 =1 |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | and t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | <if test="section !=null and section != ''"> |
| | | and t.section= #{section} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | and t.layer= #{layer} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | | <if test="builtUpArea !=null and builtUpArea != ''"> |
| | | and t.built_up_area= #{builtUpArea} |
| | | </if> |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and t.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and t.unit_id= #{unitId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="apartment !=null and apartment != ''"> |
| | | and t.apartment= #{apartment} |
| | | </if> |
| | | <if test="roomRent !=null and roomRent != ''"> |
| | | and t.room_rent= #{roomRent} |
| | | </if> |
| | | <if test="roomType !=null and roomType != ''"> |
| | | and t.room_type= #{roomType} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | param.put("desc", ""); |
| | | param.put("id", ""); |
| | | param.put("name", ""); |
| | | param.put("shareColumn", ""); |
| | | param.put("shareColumn", "community_id"); |
| | | param.put("shareName", ""); |
| | | param.put("shareParam", ""); |
| | | param.put("shareParam", "communityId"); |
| | | param.put("tableName", tableName); |
| | | JSONObject paramColumn = new JSONObject(); |
| | | JSONArray requireds = new JSONArray(); |
| | |
| | | if ("KEY".equals(key)) { |
| | | continue; |
| | | } |
| | | if ("b_id".equals(key)) { |
| | | continue; |
| | | } |
| | | if ("create_time".equals(key)) { |
| | | continue; |
| | | } |
| | |
| | | { |
| | | "param": { |
| | | "requestTime": "request_time", |
| | | "finishTime": "finish_time", |
| | | "orderTypeCd": "order_type_cd", |
| | | "extTransactionId": "ext_transaction_id", |
| | | "appId": "app_id", |
| | | "section": "section", |
| | | "remark": "remark", |
| | | "statusCd": "status_cd", |
| | | "oId": "o_id", |
| | | "userId": "user_id" |
| | | "roomSubType": "room_sub_type", |
| | | "roomArea": "room_area", |
| | | "userId": "user_id", |
| | | "roomId": "room_id", |
| | | "layer": "layer", |
| | | "feeCoefficient": "fee_coefficient", |
| | | "builtUpArea": "built_up_area", |
| | | "roomNum": "room_num", |
| | | "unitId": "unit_id", |
| | | "state": "state", |
| | | "communityId": "community_id", |
| | | "apartment": "apartment", |
| | | "roomType": "room_type", |
| | | "roomRent": "room_rent" |
| | | }, |
| | | "name": "", |
| | | "shareColumn": "", |
| | | "id": "", |
| | | "shareName": "", |
| | | "name": "room", |
| | | "shareColumn": "community_id", |
| | | "id": "roomId", |
| | | "shareName": "community", |
| | | "autoMove": true, |
| | | "required": [ |
| | | { |
| | | "msg": "订åIDä¸è½ä¸ºç©º", |
| | | "code": "oId" |
| | | "msg": "æ¿å±IDä¸è½ä¸ºç©º", |
| | | "code": "roomId" |
| | | }, |
| | | { |
| | | "msg": "åºç¨IDä¸è½ä¸ºç©º", |
| | | "code": "appId" |
| | | "msg": "æ¿å±ç¼å·ä¸è½ä¸ºç©º", |
| | | "code": "roomNum" |
| | | }, |
| | | { |
| | | "msg": "åå
IDä¸è½ä¸ºç©º", |
| | | "code": "unitId" |
| | | }, |
| | | { |
| | | "msg": "屿°ä¸è½ä¸ºç©º", |
| | | "code": "layer" |
| | | }, |
| | | { |
| | | "msg": "æ·åä¸è½ä¸ºç©º", |
| | | "code": "apartment" |
| | | }, |
| | | { |
| | | "msg": "建çé¢ç§¯ä¸è½ä¸ºç©º", |
| | | "code": "builtUpArea" |
| | | }, |
| | | { |
| | | "msg": "ç®è´¹ç³»æ°ä¸è½ä¸ºç©º", |
| | | "code": "feeCoefficient" |
| | | }, |
| | | { |
| | | "msg": "ç¨æ·IDä¸è½ä¸ºç©º", |
| | | "code": "userId" |
| | | }, |
| | | { |
| | | "msg": "å¤é¨ç³»ç»è¯·æ±æ¶é´ä¸è½ä¸ºç©º", |
| | | "code": "requestTime" |
| | | }, |
| | | { |
| | | "msg": "订åç±»åï¼åèc_order_type表ä¸è½ä¸ºç©º", |
| | | "code": "orderTypeCd" |
| | | }, |
| | | { |
| | | "msg": "æ°æ®ç¶æï¼è¯¦ç»åèc_status表ä¸è½ä¸ºç©º", |
| | | "msg": "æ°æ®ç¶æï¼è¯¦ç»åèc_status表ï¼S ä¿åï¼0, å¨ç¨ 1失æä¸è½ä¸ºç©º", |
| | | "code": "statusCd" |
| | | }, |
| | | { |
| | | "msg": "æ¿å±ç¶æï¼å¦æ¿å±åºå®çï¼è¯·æ¥çstate 表ä¸è½ä¸ºç©º", |
| | | "code": "state" |
| | | }, |
| | | { |
| | | "msg": "æ¿å±ç±»åä¸è½ä¸ºç©º", |
| | | "code": "roomType" |
| | | }, |
| | | { |
| | | "msg": "æ¿å±ç±»å 110 ä½å®
æ¿å±ï¼119 åå
¬å®¤ 120 宿èä¸è½ä¸ºç©º", |
| | | "code": "roomSubType" |
| | | }, |
| | | { |
| | | "msg": "室å
é¢ç§¯ä¸è½ä¸ºç©º", |
| | | "code": "roomArea" |
| | | }, |
| | | { |
| | | "msg": "ç§éä¸è½ä¸ºç©º", |
| | | "code": "roomRent" |
| | | } |
| | | ], |
| | | "desc": "", |
| | | "shareParam": "", |
| | | "tableName": "c_orders" |
| | | "desc": "æ¿å±", |
| | | "shareParam": "communityId", |
| | | "tableName": "building_room" |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.intf.community; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.po.room.RoomPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç±»è¡¨è¿°ï¼ æå¡ä¹åè°ç¨çæ¥å£ç±»ï¼ä¸å¯¹å¤æä¾æ¥å£è½å åªç¨äºæ¥å£å»ºè°ç¨ |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | @FeignClient(name = "community-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/roomV1Api") |
| | | public interface IRoomV1InnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveRoom", method = RequestMethod.POST) |
| | | public int saveRoom(@RequestBody RoomPo roomPo); |
| | | |
| | | @RequestMapping(value = "/updateRoom", method = RequestMethod.POST) |
| | | public int updateRoom(@RequestBody RoomPo roomPo); |
| | | |
| | | @RequestMapping(value = "/deleteRoom", method = RequestMethod.POST) |
| | | public int deleteRoom(@RequestBody RoomPo roomPo); |
| | | |
| | | /** |
| | | * <p>æ¥è¯¢å°åºæ¥¼ä¿¡æ¯</p> |
| | | * |
| | | * |
| | | * @param roomDto æ°æ®å¯¹è±¡å享 |
| | | * @return RoomDto å¯¹è±¡æ°æ® |
| | | */ |
| | | @RequestMapping(value = "/queryRooms", method = RequestMethod.POST) |
| | | List<RoomDto> queryRooms(@RequestBody RoomDto roomDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢<p>å°åºæ¥¼</p>æ»è®°å½æ° |
| | | * |
| | | * @param roomDto æ°æ®å¯¹è±¡å享 |
| | | * @return å°åºä¸çå°åºæ¥¼è®°å½æ° |
| | | */ |
| | | @RequestMapping(value = "/queryRoomsCount", method = RequestMethod.POST) |
| | | int queryRoomsCount(@RequestBody RoomDto roomDto); |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.community.cmd.room; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.community.IRoomV1InnerServiceSMO; |
| | | import com.java110.po.room.RoomPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | /** |
| | | * 类表述ï¼å é¤ |
| | | * æå¡ç¼ç ï¼room.deleteRoom |
| | | * 请æ±è·¯å²ï¼/app/room.DeleteRoom |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | @Java110Cmd(serviceCode = "room.DeleteRoom") |
| | | public class DeleteRoomCmd extends AbstractServiceCmdListener { |
| | | private static Logger logger = LoggerFactory.getLogger(DeleteRoomCmd.class); |
| | | |
| | | @Autowired |
| | | private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "roomId", "roomIdä¸è½ä¸ºç©º"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityIdä¸è½ä¸ºç©º"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class); |
| | | int flag = roomV1InnerServiceSMOImpl.deleteRoom(roomPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("å 餿°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.community.cmd.room; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.intf.community.IRoomV1InnerServiceSMO; |
| | | import com.java110.po.room.RoomPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * ç±»è¡¨è¿°ï¼æ¥è¯¢ |
| | | * æå¡ç¼ç ï¼room.listRoom |
| | | * 请æ±è·¯å²ï¼/app/room.ListRoom |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | @Java110Cmd(serviceCode = "room.ListRoom") |
| | | public class ListRoomCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListRoomCmd.class); |
| | | @Autowired |
| | | private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | RoomDto roomDto = BeanConvertUtil.covertBean(reqJson, RoomDto.class); |
| | | |
| | | int count = roomV1InnerServiceSMOImpl.queryRoomsCount(roomDto); |
| | | |
| | | List<RoomDto> roomDtos = null; |
| | | |
| | | if (count > 0) { |
| | | roomDtos = roomV1InnerServiceSMOImpl.queryRooms(roomDto); |
| | | } else { |
| | | roomDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, roomDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.community.cmd.room; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.community.IRoomV1InnerServiceSMO; |
| | | import com.java110.po.room.RoomPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | /** |
| | | * 类表述ï¼ä¿å |
| | | * æå¡ç¼ç ï¼room.saveRoom |
| | | * 请æ±è·¯å²ï¼/app/room.SaveRoom |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | @Java110Cmd(serviceCode = "room.SaveRoom") |
| | | public class SaveRoomCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveRoomCmd.class); |
| | | |
| | | public static final String CODE_PREFIX_ID = "10"; |
| | | |
| | | @Autowired |
| | | private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "roomNum", "è¯·æ±æ¥æä¸æªå
å«roomNum"); |
| | | Assert.hasKeyAndValue(reqJson, "unitId", "è¯·æ±æ¥æä¸æªå
å«unitId"); |
| | | Assert.hasKeyAndValue(reqJson, "layer", "è¯·æ±æ¥æä¸æªå
å«layer"); |
| | | Assert.hasKeyAndValue(reqJson, "apartment", "è¯·æ±æ¥æä¸æªå
å«apartment"); |
| | | Assert.hasKeyAndValue(reqJson, "builtUpArea", "è¯·æ±æ¥æä¸æªå
å«builtUpArea"); |
| | | Assert.hasKeyAndValue(reqJson, "feeCoefficient", "è¯·æ±æ¥æä¸æªå
å«feeCoefficient"); |
| | | Assert.hasKeyAndValue(reqJson, "userId", "è¯·æ±æ¥æä¸æªå
å«userId"); |
| | | Assert.hasKeyAndValue(reqJson, "statusCd", "è¯·æ±æ¥æä¸æªå
å«statusCd"); |
| | | Assert.hasKeyAndValue(reqJson, "state", "è¯·æ±æ¥æä¸æªå
å«state"); |
| | | Assert.hasKeyAndValue(reqJson, "roomType", "è¯·æ±æ¥æä¸æªå
å«roomType"); |
| | | Assert.hasKeyAndValue(reqJson, "roomSubType", "è¯·æ±æ¥æä¸æªå
å«roomSubType"); |
| | | Assert.hasKeyAndValue(reqJson, "roomArea", "è¯·æ±æ¥æä¸æªå
å«roomArea"); |
| | | Assert.hasKeyAndValue(reqJson, "roomRent", "è¯·æ±æ¥æä¸æªå
å«roomRent"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class); |
| | | roomPo.setRoomId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | int flag = roomV1InnerServiceSMOImpl.saveRoom(roomPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("ä¿åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.community.cmd.room; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.community.IRoomV1InnerServiceSMO; |
| | | import com.java110.po.room.RoomPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * ç±»è¡¨è¿°ï¼æ´æ° |
| | | * æå¡ç¼ç ï¼room.updateRoom |
| | | * 请æ±è·¯å²ï¼/app/room.UpdateRoom |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | @Java110Cmd(serviceCode = "room.UpdateRoom") |
| | | public class UpdateRoomCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateRoomCmd.class); |
| | | |
| | | |
| | | @Autowired |
| | | private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "roomId", "roomIdä¸è½ä¸ºç©º"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityIdä¸è½ä¸ºç©º"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class); |
| | | int flag = roomV1InnerServiceSMOImpl.updateRoom(roomPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("æ´æ°æ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.community.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ç±»è¡¨è¿°ï¼ |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | public interface IRoomV1ServiceDao { |
| | | |
| | | |
| | | /** |
| | | * ä¿å æ¿å±ä¿¡æ¯ |
| | | * @param info |
| | | * @throws DAOException DAOå¼å¸¸ |
| | | */ |
| | | int saveRoomInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¿å±ä¿¡æ¯ï¼instanceè¿ç¨ï¼ |
| | | * æ ¹æ®bId æ¥è¯¢æ¿å±ä¿¡æ¯ |
| | | * @param info bId ä¿¡æ¯ |
| | | * @return æ¿å±ä¿¡æ¯ |
| | | * @throws DAOException DAOå¼å¸¸ |
| | | */ |
| | | List<Map> getRoomInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¿å±ä¿¡æ¯ |
| | | * @param info ä¿®æ¹ä¿¡æ¯ |
| | | * @throws DAOException DAOå¼å¸¸ |
| | | */ |
| | | int updateRoomInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¿å±æ»æ° |
| | | * |
| | | * @param info æ¿å±ä¿¡æ¯ |
| | | * @return æ¿å±æ°é |
| | | */ |
| | | int queryRoomsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.community.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.community.dao.IRoomV1ServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ç±»è¡¨è¿°ï¼ |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | @Service("roomV1ServiceDaoImpl") |
| | | public class RoomV1ServiceDaoImpl extends BaseServiceDao implements IRoomV1ServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(RoomV1ServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * ä¿åæ¿å±ä¿¡æ¯ å° instance |
| | | * @param info bId ä¿¡æ¯ |
| | | * @throws DAOException DAOå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int saveRoomInfo(Map info) throws DAOException { |
| | | logger.debug("ä¿å saveRoomInfo å
¥å info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("roomV1ServiceDaoImpl.saveRoomInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¿å±ä¿¡æ¯ï¼instanceï¼ |
| | | * @param info bId ä¿¡æ¯ |
| | | * @return List<Map> |
| | | * @throws DAOException DAOå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<Map> getRoomInfo(Map info) throws DAOException { |
| | | logger.debug("æ¥è¯¢ getRoomInfo å
¥å info : {}",info); |
| | | |
| | | List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomV1ServiceDaoImpl.getRoomInfo",info); |
| | | |
| | | return businessRoomInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¿å±ä¿¡æ¯ |
| | | * @param info ä¿®æ¹ä¿¡æ¯ |
| | | * @throws DAOException DAOå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int updateRoomInfo(Map info) throws DAOException { |
| | | logger.debug("ä¿®æ¹ updateRoomInfo å
¥å info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("roomV1ServiceDaoImpl.updateRoomInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¿å±æ°é |
| | | * @param info æ¿å±ä¿¡æ¯ |
| | | * @return æ¿å±æ°é |
| | | */ |
| | | @Override |
| | | public int queryRoomsCount(Map info) { |
| | | logger.debug("æ¥è¯¢ queryRoomsCount å
¥å info : {}",info); |
| | | |
| | | List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomV1ServiceDaoImpl.queryRoomsCount", info); |
| | | if (businessRoomInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessRoomInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright 2017-2020 å´å¦æ and java110 team. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.java110.community.smo.impl; |
| | | |
| | | |
| | | import com.java110.community.dao.IRoomV1ServiceDao; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.intf.community.IRoomV1InnerServiceSMO; |
| | | import com.java110.po.room.RoomPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.PageDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç±»è¡¨è¿°ï¼ æå¡ä¹åè°ç¨çæ¥å£å®ç°ç±»ï¼ä¸å¯¹å¤æä¾æ¥å£è½å åªç¨äºæ¥å£å»ºè°ç¨ |
| | | * add by å´å¦æ at 2021-09-14 14:28:56 mail: 928255095@qq.com |
| | | * open source address: https://gitee.com/wuxw7/MicroCommunity |
| | | * å®ç½ï¼http://www.homecommunity.cn |
| | | * 温馨æç¤ºï¼å¦ææ¨å¯¹æ¤æä»¶è¿è¡ä¿®æ¹ 请ä¸è¦å é¤åæä½è
åæ³¨éä¿¡æ¯ï¼è¯·è¡¥å
æ¨ç ä¿®æ¹çåå 以åèç³»é®ç®±å¦ä¸ |
| | | * // modify by å¼ ä¸ at 2021-09-12 第10è¡å¨æç§åºæ¯ä¸å卿ç§bug éè¦ä¿®å¤ï¼æ³¨é10è³20è¡ å å
¥ 20è¡è³30è¡ |
| | | */ |
| | | @RestController |
| | | public class RoomV1InnerServiceSMOImpl extends BaseServiceSMO implements IRoomV1InnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IRoomV1ServiceDao roomV1ServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveRoom(@RequestBody RoomPo roomPo) { |
| | | int saveFlag = roomV1ServiceDaoImpl.saveRoomInfo(BeanConvertUtil.beanCovertMap(roomPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateRoom(@RequestBody RoomPo roomPo) { |
| | | int saveFlag = roomV1ServiceDaoImpl.updateRoomInfo(BeanConvertUtil.beanCovertMap(roomPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteRoom(@RequestBody RoomPo roomPo) { |
| | | roomPo.setStatusCd("1"); |
| | | int saveFlag = roomV1ServiceDaoImpl.updateRoomInfo(BeanConvertUtil.beanCovertMap(roomPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<RoomDto> queryRooms(@RequestBody RoomDto roomDto) { |
| | | |
| | | //æ ¡éªæ¯å¦ä¼ äº åé¡µä¿¡æ¯ |
| | | |
| | | int page = roomDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | roomDto.setPage((page - 1) * roomDto.getRow()); |
| | | } |
| | | |
| | | List<RoomDto> rooms = BeanConvertUtil.covertBeanList(roomV1ServiceDaoImpl.getRoomInfo(BeanConvertUtil.beanCovertMap(roomDto)), RoomDto.class); |
| | | |
| | | return rooms; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryRoomsCount(@RequestBody RoomDto roomDto) { |
| | | return roomV1ServiceDaoImpl.queryRoomsCount(BeanConvertUtil.beanCovertMap(roomDto)); } |
| | | |
| | | } |