| New file |
| | |
| | | package com.java110.dto.rentingConfig; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 房屋出租配置数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class RentingConfigDto extends PageDto implements Serializable { |
| | | |
| | | private String serviceTenantRate; |
| | | private String propertySeparateRate; |
| | | private String servicePrice; |
| | | private String adminSeparateRate; |
| | | private String serviceOwnerRate; |
| | | private String rentingConfigId; |
| | | private String rentingType; |
| | | private String proxySeparateRate; |
| | | private String rentingFormula; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getServiceTenantRate() { |
| | | return serviceTenantRate; |
| | | } |
| | | public void setServiceTenantRate(String serviceTenantRate) { |
| | | this.serviceTenantRate = serviceTenantRate; |
| | | } |
| | | public String getPropertySeparateRate() { |
| | | return propertySeparateRate; |
| | | } |
| | | public void setPropertySeparateRate(String propertySeparateRate) { |
| | | this.propertySeparateRate = propertySeparateRate; |
| | | } |
| | | public String getServicePrice() { |
| | | return servicePrice; |
| | | } |
| | | public void setServicePrice(String servicePrice) { |
| | | this.servicePrice = servicePrice; |
| | | } |
| | | public String getAdminSeparateRate() { |
| | | return adminSeparateRate; |
| | | } |
| | | public void setAdminSeparateRate(String adminSeparateRate) { |
| | | this.adminSeparateRate = adminSeparateRate; |
| | | } |
| | | public String getServiceOwnerRate() { |
| | | return serviceOwnerRate; |
| | | } |
| | | public void setServiceOwnerRate(String serviceOwnerRate) { |
| | | this.serviceOwnerRate = serviceOwnerRate; |
| | | } |
| | | public String getRentingConfigId() { |
| | | return rentingConfigId; |
| | | } |
| | | public void setRentingConfigId(String rentingConfigId) { |
| | | this.rentingConfigId = rentingConfigId; |
| | | } |
| | | public String getRentingType() { |
| | | return rentingType; |
| | | } |
| | | public void setRentingType(String rentingType) { |
| | | this.rentingType = rentingType; |
| | | } |
| | | public String getProxySeparateRate() { |
| | | return proxySeparateRate; |
| | | } |
| | | public void setProxySeparateRate(String proxySeparateRate) { |
| | | this.proxySeparateRate = proxySeparateRate; |
| | | } |
| | | public String getRentingFormula() { |
| | | return rentingFormula; |
| | | } |
| | | public void setRentingFormula(String rentingFormula) { |
| | | this.rentingFormula = rentingFormula; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.po.rentingConfig; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class RentingConfigPo implements Serializable { |
| | | |
| | | private String serviceTenantRate; |
| | | private String propertySeparateRate; |
| | | private String servicePrice; |
| | | private String adminSeparateRate; |
| | | private String serviceOwnerRate; |
| | | private String rentingConfigId; |
| | | private String statusCd = "0"; |
| | | private String rentingType; |
| | | private String proxySeparateRate; |
| | | private String rentingFormula; |
| | | |
| | | public String getServiceTenantRate() { |
| | | return serviceTenantRate; |
| | | } |
| | | |
| | | public void setServiceTenantRate(String serviceTenantRate) { |
| | | this.serviceTenantRate = serviceTenantRate; |
| | | } |
| | | |
| | | public String getPropertySeparateRate() { |
| | | return propertySeparateRate; |
| | | } |
| | | |
| | | public void setPropertySeparateRate(String propertySeparateRate) { |
| | | this.propertySeparateRate = propertySeparateRate; |
| | | } |
| | | |
| | | public String getServicePrice() { |
| | | return servicePrice; |
| | | } |
| | | |
| | | public void setServicePrice(String servicePrice) { |
| | | this.servicePrice = servicePrice; |
| | | } |
| | | |
| | | public String getAdminSeparateRate() { |
| | | return adminSeparateRate; |
| | | } |
| | | |
| | | public void setAdminSeparateRate(String adminSeparateRate) { |
| | | this.adminSeparateRate = adminSeparateRate; |
| | | } |
| | | |
| | | public String getServiceOwnerRate() { |
| | | return serviceOwnerRate; |
| | | } |
| | | |
| | | public void setServiceOwnerRate(String serviceOwnerRate) { |
| | | this.serviceOwnerRate = serviceOwnerRate; |
| | | } |
| | | |
| | | public String getRentingConfigId() { |
| | | return rentingConfigId; |
| | | } |
| | | |
| | | public void setRentingConfigId(String rentingConfigId) { |
| | | this.rentingConfigId = rentingConfigId; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getRentingType() { |
| | | return rentingType; |
| | | } |
| | | |
| | | public void setRentingType(String rentingType) { |
| | | this.rentingType = rentingType; |
| | | } |
| | | |
| | | public String getProxySeparateRate() { |
| | | return proxySeparateRate; |
| | | } |
| | | |
| | | public void setProxySeparateRate(String proxySeparateRate) { |
| | | this.proxySeparateRate = proxySeparateRate; |
| | | } |
| | | |
| | | public String getRentingFormula() { |
| | | return rentingFormula; |
| | | } |
| | | |
| | | public void setRentingFormula(String rentingFormula) { |
| | | this.rentingFormula = rentingFormula; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public static final String CODE_PREFIX_settingId = "78"; |
| | | public static final String CODE_PREFIX_typeUserId = "79"; |
| | | public static final String CODE_PREFIX_appraiseId = "80"; |
| | | public static final String CODE_PREFIX_rentingConfigId = "81"; |
| | | |
| | | |
| | | |
| 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="rentingConfigServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存房屋出租配置信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveRentingConfigInfo" parameterType="Map"> |
| | | insert into renting_config( |
| | | service_tenant_rate,property_separate_rate,service_price,admin_separate_rate,service_owner_rate,renting_config_id,renting_type,proxy_separate_rate,renting_formula |
| | | ) values ( |
| | | #{serviceTenantRate},#{propertySeparateRate},#{servicePrice},#{adminSeparateRate},#{serviceOwnerRate},#{rentingConfigId},#{rentingType},#{proxySeparateRate},#{rentingFormula} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询房屋出租配置信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRentingConfigInfo" parameterType="Map" resultType="Map"> |
| | | select t.service_tenant_rate,t.service_tenant_rate serviceTenantRate,t.property_separate_rate,t.property_separate_rate propertySeparateRate,t.service_price,t.service_price servicePrice,t.admin_separate_rate,t.admin_separate_rate adminSeparateRate,t.service_owner_rate,t.service_owner_rate serviceOwnerRate,t.renting_config_id,t.renting_config_id rentingConfigId,t.status_cd,t.status_cd statusCd,t.renting_type,t.renting_type rentingType,t.proxy_separate_rate,t.proxy_separate_rate proxySeparateRate,t.renting_formula,t.renting_formula rentingFormula |
| | | from renting_config t |
| | | where 1 =1 |
| | | <if test="serviceTenantRate !=null and serviceTenantRate != ''"> |
| | | and t.service_tenant_rate= #{serviceTenantRate} |
| | | </if> |
| | | <if test="propertySeparateRate !=null and propertySeparateRate != ''"> |
| | | and t.property_separate_rate= #{propertySeparateRate} |
| | | </if> |
| | | <if test="servicePrice !=null and servicePrice != ''"> |
| | | and t.service_price= #{servicePrice} |
| | | </if> |
| | | <if test="adminSeparateRate !=null and adminSeparateRate != ''"> |
| | | and t.admin_separate_rate= #{adminSeparateRate} |
| | | </if> |
| | | <if test="serviceOwnerRate !=null and serviceOwnerRate != ''"> |
| | | and t.service_owner_rate= #{serviceOwnerRate} |
| | | </if> |
| | | <if test="rentingConfigId !=null and rentingConfigId != ''"> |
| | | and t.renting_config_id= #{rentingConfigId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="rentingType !=null and rentingType != ''"> |
| | | and t.renting_type= #{rentingType} |
| | | </if> |
| | | <if test="proxySeparateRate !=null and proxySeparateRate != ''"> |
| | | and t.proxy_separate_rate= #{proxySeparateRate} |
| | | </if> |
| | | <if test="rentingFormula !=null and rentingFormula != ''"> |
| | | and t.renting_formula= #{rentingFormula} |
| | | </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="updateRentingConfigInfo" parameterType="Map"> |
| | | update renting_config t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="serviceTenantRate !=null and serviceTenantRate != ''"> |
| | | , t.service_tenant_rate= #{serviceTenantRate} |
| | | </if> |
| | | <if test="propertySeparateRate !=null and propertySeparateRate != ''"> |
| | | , t.property_separate_rate= #{propertySeparateRate} |
| | | </if> |
| | | <if test="servicePrice !=null and servicePrice != ''"> |
| | | , t.service_price= #{servicePrice} |
| | | </if> |
| | | <if test="adminSeparateRate !=null and adminSeparateRate != ''"> |
| | | , t.admin_separate_rate= #{adminSeparateRate} |
| | | </if> |
| | | <if test="serviceOwnerRate !=null and serviceOwnerRate != ''"> |
| | | , t.service_owner_rate= #{serviceOwnerRate} |
| | | </if> |
| | | <if test="rentingType !=null and rentingType != ''"> |
| | | , t.renting_type= #{rentingType} |
| | | </if> |
| | | <if test="proxySeparateRate !=null and proxySeparateRate != ''"> |
| | | , t.proxy_separate_rate= #{proxySeparateRate} |
| | | </if> |
| | | <if test="rentingFormula !=null and rentingFormula != ''"> |
| | | , t.renting_formula= #{rentingFormula} |
| | | </if> |
| | | where 1=1 <if test="rentingConfigId !=null and rentingConfigId != ''"> |
| | | and t.renting_config_id= #{rentingConfigId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询房屋出租配置数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryRentingConfigsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from renting_config t |
| | | where 1 =1 |
| | | <if test="serviceTenantRate !=null and serviceTenantRate != ''"> |
| | | and t.service_tenant_rate= #{serviceTenantRate} |
| | | </if> |
| | | <if test="propertySeparateRate !=null and propertySeparateRate != ''"> |
| | | and t.property_separate_rate= #{propertySeparateRate} |
| | | </if> |
| | | <if test="servicePrice !=null and servicePrice != ''"> |
| | | and t.service_price= #{servicePrice} |
| | | </if> |
| | | <if test="adminSeparateRate !=null and adminSeparateRate != ''"> |
| | | and t.admin_separate_rate= #{adminSeparateRate} |
| | | </if> |
| | | <if test="serviceOwnerRate !=null and serviceOwnerRate != ''"> |
| | | and t.service_owner_rate= #{serviceOwnerRate} |
| | | </if> |
| | | <if test="rentingConfigId !=null and rentingConfigId != ''"> |
| | | and t.renting_config_id= #{rentingConfigId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="rentingType !=null and rentingType != ''"> |
| | | and t.renting_type= #{rentingType} |
| | | </if> |
| | | <if test="proxySeparateRate !=null and proxySeparateRate != ''"> |
| | | and t.proxy_separate_rate= #{proxySeparateRate} |
| | | </if> |
| | | <if test="rentingFormula !=null and rentingFormula != ''"> |
| | | and t.renting_formula= #{rentingFormula} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "valueId", |
| | | "name": "attrValue", |
| | | "desc": "属性值", |
| | | "shareParam": "valueId", |
| | | "shareColumn": "value_id", |
| | | "shareName": "common", |
| | | "tableName": "attr_value", |
| | | "id": "rentingConfigId", |
| | | "name": "rentingConfig", |
| | | "desc": "房屋出租配置", |
| | | "shareParam": "rentingConfigId", |
| | | "shareColumn": "renting_config_id", |
| | | "shareName": "user", |
| | | "tableName": "renting_config", |
| | | "param": { |
| | | "valueId": "value_id", |
| | | "specCd": "spec_cd", |
| | | "value": "value", |
| | | "valueName": "value_name", |
| | | "valueShow": "value_show", |
| | | "rentingConfigId": "renting_config_id", |
| | | "rentingType": "renting_type", |
| | | "rentingFormula": "renting_formula", |
| | | "servicePrice": "service_price", |
| | | "serviceOwnerRate": "service_owner_rate", |
| | | "serviceTenantRate": "service_tenant_rate", |
| | | "adminSeparateRate": "admin_separate_rate", |
| | | "proxySeparateRate": "proxy_separate_rate", |
| | | "propertySeparateRate": "property_separate_rate", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "specCd", |
| | | "msg": "规格ID不能为空" |
| | | "code": "rentingType", |
| | | "msg": "租户类型不能为空" |
| | | }, |
| | | { |
| | | "code": "value", |
| | | "msg": "值不能为空" |
| | | "code": "rentingFormula", |
| | | "msg": "计算公式不能为空" |
| | | },{ |
| | | "code": "valueName", |
| | | "msg": "值名称不能为空" |
| | | "code": "servicePrice", |
| | | "msg": "服务金额不能为空" |
| | | },{ |
| | | "code": "valueShow", |
| | | "msg": "是否显示不能为空" |
| | | "code": "serviceOwnerRate", |
| | | "msg": "业主收费率不能为空" |
| | | },{ |
| | | "code": "serviceTenantRate", |
| | | "msg": "租户收费率不能为空" |
| | | },{ |
| | | "code": "adminSeparateRate", |
| | | "msg": "运营收费率不能为空" |
| | | },{ |
| | | "code": "proxySeparateRate", |
| | | "msg": "代理商收费率不能为空" |
| | | },{ |
| | | "code": "propertySeparateRate", |
| | | "msg": "物业收费率不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "valueId", |
| | | "name": "attrValue", |
| | | "desc": "属性值", |
| | | "shareParam": "valueId", |
| | | "shareColumn": "value_id", |
| | | "shareName": "common", |
| | | "tableName": "attr_value", |
| | | "param": { |
| | | "valueId": "value_id", |
| | | "specCd": "spec_cd", |
| | | "value": "value", |
| | | "valueName": "value_name", |
| | | "valueShow": "value_show", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "specCd", |
| | | "msg": "规格ID不能为空" |
| | | }, |
| | | { |
| | | "code": "value", |
| | | "msg": "值不能为空" |
| | | },{ |
| | | "code": "valueName", |
| | | "msg": "值名称不能为空" |
| | | },{ |
| | | "code": "valueShow", |
| | | "msg": "是否显示不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.user; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.rentingConfig.RentingConfigDto; |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | 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; |
| | | |
| | | /** |
| | | * @ClassName IRentingConfigInnerServiceSMO |
| | | * @Description 房屋出租配置接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "user-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/rentingConfigApi") |
| | | public interface IRentingConfigInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveRentingConfig", method = RequestMethod.POST) |
| | | public int saveRentingConfig(@RequestBody RentingConfigPo rentingConfigPo); |
| | | |
| | | @RequestMapping(value = "/updateRentingConfig", method = RequestMethod.POST) |
| | | public int updateRentingConfig(@RequestBody RentingConfigPo rentingConfigPo); |
| | | |
| | | @RequestMapping(value = "/deleteRentingConfig", method = RequestMethod.POST) |
| | | public int deleteRentingConfig(@RequestBody RentingConfigPo rentingConfigPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param rentingConfigDto 数据对象分享 |
| | | * @return RentingConfigDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryRentingConfigs", method = RequestMethod.POST) |
| | | List<RentingConfigDto> queryRentingConfigs(@RequestBody RentingConfigDto rentingConfigDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param rentingConfigDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryRentingConfigsCount", method = RequestMethod.POST) |
| | | int queryRentingConfigsCount(@RequestBody RentingConfigDto rentingConfigDto); |
| | | } |
| New file |
| | |
| | | package com.java110.user.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.rentingConfig.RentingConfigDto; |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import com.java110.user.bmo.rentingConfig.IDeleteRentingConfigBMO; |
| | | import com.java110.user.bmo.rentingConfig.IGetRentingConfigBMO; |
| | | import com.java110.user.bmo.rentingConfig.ISaveRentingConfigBMO; |
| | | import com.java110.user.bmo.rentingConfig.IUpdateRentingConfigBMO; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/renting") |
| | | public class RentingApi { |
| | | |
| | | @Autowired |
| | | private ISaveRentingConfigBMO saveRentingConfigBMOImpl; |
| | | @Autowired |
| | | private IUpdateRentingConfigBMO updateRentingConfigBMOImpl; |
| | | @Autowired |
| | | private IDeleteRentingConfigBMO deleteRentingConfigBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetRentingConfigBMO getRentingConfigBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /renting/saveRentingConfig |
| | | * @path /app/renting/saveRentingConfig |
| | | */ |
| | | @RequestMapping(value = "/saveRentingConfig", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveRentingConfig(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "rentingType", "请求报文中未包含rentingType"); |
| | | Assert.hasKeyAndValue(reqJson, "rentingFormula", "请求报文中未包含rentingFormula"); |
| | | Assert.hasKeyAndValue(reqJson, "servicePrice", "请求报文中未包含servicePrice"); |
| | | Assert.hasKeyAndValue(reqJson, "serviceOwnerRate", "请求报文中未包含serviceOwnerRate"); |
| | | Assert.hasKeyAndValue(reqJson, "serviceTenantRate", "请求报文中未包含serviceTenantRate"); |
| | | Assert.hasKeyAndValue(reqJson, "adminSeparateRate", "请求报文中未包含adminSeparateRate"); |
| | | Assert.hasKeyAndValue(reqJson, "proxySeparateRate", "请求报文中未包含proxySeparateRate"); |
| | | Assert.hasKeyAndValue(reqJson, "propertySeparateRate", "请求报文中未包含propertySeparateRate"); |
| | | |
| | | |
| | | RentingConfigPo rentingConfigPo = BeanConvertUtil.covertBean(reqJson, RentingConfigPo.class); |
| | | return saveRentingConfigBMOImpl.save(rentingConfigPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /renting/updateRentingConfig |
| | | * @path /app/renting/updateRentingConfig |
| | | */ |
| | | @RequestMapping(value = "/updateRentingConfig", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateRentingConfig(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "rentingType", "请求报文中未包含rentingType"); |
| | | Assert.hasKeyAndValue(reqJson, "rentingFormula", "请求报文中未包含rentingFormula"); |
| | | Assert.hasKeyAndValue(reqJson, "servicePrice", "请求报文中未包含servicePrice"); |
| | | Assert.hasKeyAndValue(reqJson, "serviceOwnerRate", "请求报文中未包含serviceOwnerRate"); |
| | | Assert.hasKeyAndValue(reqJson, "serviceTenantRate", "请求报文中未包含serviceTenantRate"); |
| | | Assert.hasKeyAndValue(reqJson, "adminSeparateRate", "请求报文中未包含adminSeparateRate"); |
| | | Assert.hasKeyAndValue(reqJson, "proxySeparateRate", "请求报文中未包含proxySeparateRate"); |
| | | Assert.hasKeyAndValue(reqJson, "propertySeparateRate", "请求报文中未包含propertySeparateRate"); |
| | | Assert.hasKeyAndValue(reqJson, "rentingConfigId", "rentingConfigId不能为空"); |
| | | |
| | | |
| | | RentingConfigPo rentingConfigPo = BeanConvertUtil.covertBean(reqJson, RentingConfigPo.class); |
| | | return updateRentingConfigBMOImpl.update(rentingConfigPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /renting/deleteRentingConfig |
| | | * @path /app/renting/deleteRentingConfig |
| | | */ |
| | | @RequestMapping(value = "/deleteRentingConfig", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteRentingConfig(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "rentingConfigId", "rentingConfigId不能为空"); |
| | | |
| | | |
| | | RentingConfigPo rentingConfigPo = BeanConvertUtil.covertBean(reqJson, RentingConfigPo.class); |
| | | return deleteRentingConfigBMOImpl.delete(rentingConfigPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @return |
| | | * @serviceCode /renting/queryRentingConfig |
| | | * @path /app/renting/queryRentingConfig |
| | | */ |
| | | @RequestMapping(value = "/queryRentingConfig", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryRentingConfig( |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | RentingConfigDto rentingConfigDto = new RentingConfigDto(); |
| | | rentingConfigDto.setPage(page); |
| | | rentingConfigDto.setRow(row); |
| | | return getRentingConfigBMOImpl.get(rentingConfigDto); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig; |
| | | |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteRentingConfigBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改房屋出租配置 |
| | | * add by wuxw |
| | | * |
| | | * @param rentingConfigPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(RentingConfigPo rentingConfigPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig; |
| | | |
| | | import com.java110.dto.rentingConfig.RentingConfigDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IGetRentingConfigBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询房屋出租配置 |
| | | * add by wuxw |
| | | * |
| | | * @param rentingConfigDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(RentingConfigDto rentingConfigDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig; |
| | | |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveRentingConfigBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加房屋出租配置 |
| | | * add by wuxw |
| | | * @param rentingConfigPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(RentingConfigPo rentingConfigPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig; |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateRentingConfigBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改房屋出租配置 |
| | | * add by wuxw |
| | | * @param rentingConfigPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(RentingConfigPo rentingConfigPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | |
| | | import com.java110.intf.user.IRentingConfigInnerServiceSMO; |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import com.java110.user.bmo.rentingConfig.IDeleteRentingConfigBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteRentingConfigBMOImpl") |
| | | public class DeleteRentingConfigBMOImpl implements IDeleteRentingConfigBMO { |
| | | |
| | | @Autowired |
| | | private IRentingConfigInnerServiceSMO rentingConfigInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param rentingConfigPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(RentingConfigPo rentingConfigPo) { |
| | | |
| | | int flag = rentingConfigInnerServiceSMOImpl.deleteRentingConfig(rentingConfigPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig.impl; |
| | | |
| | | import com.java110.dto.rentingConfig.RentingConfigDto; |
| | | import com.java110.intf.user.IRentingConfigInnerServiceSMO; |
| | | import com.java110.user.bmo.rentingConfig.IGetRentingConfigBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("getRentingConfigBMOImpl") |
| | | public class GetRentingConfigBMOImpl implements IGetRentingConfigBMO { |
| | | |
| | | @Autowired |
| | | private IRentingConfigInnerServiceSMO rentingConfigInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param rentingConfigDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(RentingConfigDto rentingConfigDto) { |
| | | |
| | | |
| | | int count = rentingConfigInnerServiceSMOImpl.queryRentingConfigsCount(rentingConfigDto); |
| | | |
| | | List<RentingConfigDto> rentingConfigDtos = null; |
| | | if (count > 0) { |
| | | rentingConfigDtos = rentingConfigInnerServiceSMOImpl.queryRentingConfigs(rentingConfigDto); |
| | | } else { |
| | | rentingConfigDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) rentingConfigDto.getRow()), count, rentingConfigDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.user.IRentingConfigInnerServiceSMO; |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import com.java110.user.bmo.rentingConfig.ISaveRentingConfigBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveRentingConfigBMOImpl") |
| | | public class SaveRentingConfigBMOImpl implements ISaveRentingConfigBMO { |
| | | |
| | | @Autowired |
| | | private IRentingConfigInnerServiceSMO rentingConfigInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param rentingConfigPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(RentingConfigPo rentingConfigPo) { |
| | | |
| | | rentingConfigPo.setRentingConfigId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_rentingConfigId)); |
| | | int flag = rentingConfigInnerServiceSMOImpl.saveRentingConfig(rentingConfigPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingConfig.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.user.IRentingConfigInnerServiceSMO; |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import com.java110.user.bmo.rentingConfig.IUpdateRentingConfigBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateRentingConfigBMOImpl") |
| | | public class UpdateRentingConfigBMOImpl implements IUpdateRentingConfigBMO { |
| | | |
| | | @Autowired |
| | | private IRentingConfigInnerServiceSMO rentingConfigInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param rentingConfigPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(RentingConfigPo rentingConfigPo) { |
| | | |
| | | int flag = rentingConfigInnerServiceSMOImpl.updateRentingConfig(rentingConfigPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.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; |
| | | |
| | | /** |
| | | * 房屋出租配置组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 房屋出租配置服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IRentingConfigServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 房屋出租配置信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveRentingConfigInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询房屋出租配置信息(instance过程) |
| | | * 根据bId 查询房屋出租配置信息 |
| | | * @param info bId 信息 |
| | | * @return 房屋出租配置信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getRentingConfigInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改房屋出租配置信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateRentingConfigInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询房屋出租配置总数 |
| | | * |
| | | * @param info 房屋出租配置信息 |
| | | * @return 房屋出租配置数量 |
| | | */ |
| | | int queryRentingConfigsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.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.user.dao.IRentingConfigServiceDao; |
| | | 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; |
| | | |
| | | /** |
| | | * 房屋出租配置服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("rentingConfigServiceDaoImpl") |
| | | //@Transactional |
| | | public class RentingConfigServiceDaoImpl extends BaseServiceDao implements IRentingConfigServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(RentingConfigServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存房屋出租配置信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveRentingConfigInfo(Map info) throws DAOException { |
| | | logger.debug("保存房屋出租配置信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("rentingConfigServiceDaoImpl.saveRentingConfigInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存房屋出租配置信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询房屋出租配置信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getRentingConfigInfo(Map info) throws DAOException { |
| | | logger.debug("查询房屋出租配置信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessRentingConfigInfos = sqlSessionTemplate.selectList("rentingConfigServiceDaoImpl.getRentingConfigInfo",info); |
| | | |
| | | return businessRentingConfigInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改房屋出租配置信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateRentingConfigInfo(Map info) throws DAOException { |
| | | logger.debug("修改房屋出租配置信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("rentingConfigServiceDaoImpl.updateRentingConfigInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改房屋出租配置信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询房屋出租配置数量 |
| | | * @param info 房屋出租配置信息 |
| | | * @return 房屋出租配置数量 |
| | | */ |
| | | @Override |
| | | public int queryRentingConfigsCount(Map info) { |
| | | logger.debug("查询房屋出租配置数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessRentingConfigInfos = sqlSessionTemplate.selectList("rentingConfigServiceDaoImpl.queryRentingConfigsCount", info); |
| | | if (businessRentingConfigInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessRentingConfigInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.rentingConfig.RentingConfigDto; |
| | | import com.java110.intf.user.IRentingConfigInnerServiceSMO; |
| | | import com.java110.po.rentingConfig.RentingConfigPo; |
| | | import com.java110.user.dao.IRentingConfigServiceDao; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 房屋出租配置内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class RentingConfigInnerServiceSMOImpl extends BaseServiceSMO implements IRentingConfigInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IRentingConfigServiceDao rentingConfigServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveRentingConfig(@RequestBody RentingConfigPo rentingConfigPo) { |
| | | int saveFlag = 1; |
| | | rentingConfigServiceDaoImpl.saveRentingConfigInfo(BeanConvertUtil.beanCovertMap(rentingConfigPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateRentingConfig(@RequestBody RentingConfigPo rentingConfigPo) { |
| | | int saveFlag = 1; |
| | | rentingConfigServiceDaoImpl.updateRentingConfigInfo(BeanConvertUtil.beanCovertMap(rentingConfigPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteRentingConfig(@RequestBody RentingConfigPo rentingConfigPo) { |
| | | int saveFlag = 1; |
| | | rentingConfigPo.setStatusCd("1"); |
| | | rentingConfigServiceDaoImpl.updateRentingConfigInfo(BeanConvertUtil.beanCovertMap(rentingConfigPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<RentingConfigDto> queryRentingConfigs(@RequestBody RentingConfigDto rentingConfigDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = rentingConfigDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | rentingConfigDto.setPage((page - 1) * rentingConfigDto.getRow()); |
| | | } |
| | | |
| | | List<RentingConfigDto> rentingConfigs = BeanConvertUtil.covertBeanList(rentingConfigServiceDaoImpl.getRentingConfigInfo(BeanConvertUtil.beanCovertMap(rentingConfigDto)), RentingConfigDto.class); |
| | | |
| | | return rentingConfigs; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryRentingConfigsCount(@RequestBody RentingConfigDto rentingConfigDto) { |
| | | return rentingConfigServiceDaoImpl.queryRentingConfigsCount(BeanConvertUtil.beanCovertMap(rentingConfigDto)); |
| | | } |
| | | |
| | | public IRentingConfigServiceDao getRentingConfigServiceDaoImpl() { |
| | | return rentingConfigServiceDaoImpl; |
| | | } |
| | | |
| | | public void setRentingConfigServiceDaoImpl(IRentingConfigServiceDao rentingConfigServiceDaoImpl) { |
| | | this.rentingConfigServiceDaoImpl = rentingConfigServiceDaoImpl; |
| | | } |
| | | } |