Explorar el Código

加入 房屋出租配置表

java110 hace 6 años
padre
commit
150109e637
Se han modificado 19 ficheros con 1050 adiciones y 20 borrados
  1. 104 0
      java110-bean/src/main/java/com/java110/dto/rentingConfig/RentingConfigDto.java
  2. 99 0
      java110-bean/src/main/java/com/java110/po/rentingConfig/RentingConfigPo.java
  3. 1 0
      java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
  4. 142 0
      java110-db/src/main/resources/mapper/user/RentingConfigServiceDaoImplMapper.xml
  5. 36 20
      java110-generator/src/main/resources/newBack/template_1.json
  6. 34 0
      java110-generator/src/main/resources/newBack/template_attrValue.json
  7. 52 0
      java110-interface/src/main/java/com/java110/intf/user/IRentingConfigInnerServiceSMO.java
  8. 117 0
      service-user/src/main/java/com/java110/user/api/RentingApi.java
  9. 19 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/IDeleteRentingConfigBMO.java
  10. 19 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/IGetRentingConfigBMO.java
  11. 17 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/ISaveRentingConfigBMO.java
  12. 17 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/IUpdateRentingConfigBMO.java
  13. 35 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/DeleteRentingConfigBMOImpl.java
  14. 44 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/GetRentingConfigBMOImpl.java
  15. 38 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/SaveRentingConfigBMOImpl.java
  16. 34 0
      service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/UpdateRentingConfigBMOImpl.java
  17. 61 0
      service-user/src/main/java/com/java110/user/dao/IRentingConfigServiceDao.java
  18. 98 0
      service-user/src/main/java/com/java110/user/dao/impl/RentingConfigServiceDaoImpl.java
  19. 83 0
      service-user/src/main/java/com/java110/user/smo/impl/RentingConfigInnerServiceSMOImpl.java

+ 104 - 0
java110-bean/src/main/java/com/java110/dto/rentingConfig/RentingConfigDto.java

@@ -0,0 +1,104 @@
+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;
+    }
+}

+ 99 - 0
java110-bean/src/main/java/com/java110/po/rentingConfig/RentingConfigPo.java

@@ -0,0 +1,99 @@
+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;
+    }
+
+
+}

+ 1 - 0
java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java

@@ -136,6 +136,7 @@ public class GenerateCodeFactory {
     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";
 
 
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 142 - 0
java110-db/src/main/resources/mapper/user/RentingConfigServiceDaoImplMapper.xml


+ 36 - 20
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,34 +1,50 @@
 {
   "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": "物业收费率不能为空"
     }
   ]
 }

+ 34 - 0
java110-generator/src/main/resources/newBack/template_attrValue.json

@@ -0,0 +1,34 @@
+{
+  "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": "是否显示不能为空"
+    }
+  ]
+}

+ 52 - 0
java110-interface/src/main/java/com/java110/intf/user/IRentingConfigInnerServiceSMO.java

@@ -0,0 +1,52 @@
+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);
+}

+ 117 - 0
service-user/src/main/java/com/java110/user/api/RentingApi.java

@@ -0,0 +1,117 @@
+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);
+    }
+}

+ 19 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/IDeleteRentingConfigBMO.java

@@ -0,0 +1,19 @@
+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);
+
+
+}

+ 19 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/IGetRentingConfigBMO.java

@@ -0,0 +1,19 @@
+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);
+
+
+}

+ 17 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/ISaveRentingConfigBMO.java

@@ -0,0 +1,17 @@
+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);
+
+
+}

+ 17 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/IUpdateRentingConfigBMO.java

@@ -0,0 +1,17 @@
+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);
+
+
+}

+ 35 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/DeleteRentingConfigBMOImpl.java

@@ -0,0 +1,35 @@
+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, "保存失败");
+    }
+
+}

+ 44 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/GetRentingConfigBMOImpl.java

@@ -0,0 +1,44 @@
+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;
+    }
+
+}

+ 38 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/SaveRentingConfigBMOImpl.java

@@ -0,0 +1,38 @@
+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, "保存失败");
+    }
+
+}

+ 34 - 0
service-user/src/main/java/com/java110/user/bmo/rentingConfig/impl/UpdateRentingConfigBMOImpl.java

@@ -0,0 +1,34 @@
+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, "保存失败");
+    }
+
+}

+ 61 - 0
service-user/src/main/java/com/java110/user/dao/IRentingConfigServiceDao.java

@@ -0,0 +1,61 @@
+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);
+
+}

+ 98 - 0
service-user/src/main/java/com/java110/user/dao/impl/RentingConfigServiceDaoImpl.java

@@ -0,0 +1,98 @@
+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());
+    }
+
+
+}

+ 83 - 0
service-user/src/main/java/com/java110/user/smo/impl/RentingConfigInnerServiceSMOImpl.java

@@ -0,0 +1,83 @@
+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;
+    }
+}