java110 пре 5 година
родитељ
комит
92fec016a6
18 измењених фајлова са 911 додато и 45 уклоњено
  1. 86 0
      java110-bean/src/main/java/com/java110/dto/rentingPoolAttr/RentingPoolAttrDto.java
  2. 54 0
      java110-bean/src/main/java/com/java110/po/rentingPoolAttr/RentingPoolAttrPo.java
  3. 93 0
      java110-db/src/main/resources/mapper/user/RentingPoolAttrServiceDaoImplMapper.xml
  4. 15 45
      java110-generator/src/main/resources/newBack/template_1.json
  5. 58 0
      java110-generator/src/main/resources/newBack/template_rentingPool.json
  6. 52 0
      java110-interface/src/main/java/com/java110/intf/user/IRentingPoolAttrInnerServiceSMO.java
  7. 94 0
      service-user/src/main/java/com/java110/user/api/RentingApi.java
  8. 17 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/IDeleteRentingPoolAttrBMO.java
  9. 16 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/IGetRentingPoolAttrBMO.java
  10. 17 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/ISaveRentingPoolAttrBMO.java
  11. 17 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/IUpdateRentingPoolAttrBMO.java
  12. 34 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/impl/DeleteRentingPoolAttrBMOImpl.java
  13. 44 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/impl/GetRentingPoolAttrBMOImpl.java
  14. 38 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/impl/SaveRentingPoolAttrBMOImpl.java
  15. 34 0
      service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/impl/UpdateRentingPoolAttrBMOImpl.java
  16. 61 0
      service-user/src/main/java/com/java110/user/dao/IRentingPoolAttrServiceDao.java
  17. 98 0
      service-user/src/main/java/com/java110/user/dao/impl/RentingPoolAttrServiceDaoImpl.java
  18. 83 0
      service-user/src/main/java/com/java110/user/smo/impl/RentingPoolAttrInnerServiceSMOImpl.java

+ 86 - 0
java110-bean/src/main/java/com/java110/dto/rentingPoolAttr/RentingPoolAttrDto.java

@@ -0,0 +1,86 @@
+package com.java110.dto.rentingPoolAttr;
+
+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 RentingPoolAttrDto extends PageDto implements Serializable {
+
+    private String attrId;
+    private String specCd;
+    private String value;
+    private String rentingId;
+    private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getAttrId() {
+        return attrId;
+    }
+
+    public void setAttrId(String attrId) {
+        this.attrId = attrId;
+    }
+
+    public String getSpecCd() {
+        return specCd;
+    }
+
+    public void setSpecCd(String specCd) {
+        this.specCd = specCd;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getRentingId() {
+        return rentingId;
+    }
+
+    public void setRentingId(String rentingId) {
+        this.rentingId = rentingId;
+    }
+
+
+    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;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+}

+ 54 - 0
java110-bean/src/main/java/com/java110/po/rentingPoolAttr/RentingPoolAttrPo.java

@@ -0,0 +1,54 @@
+package com.java110.po.rentingPoolAttr;
+
+import java.io.Serializable;
+
+public class RentingPoolAttrPo implements Serializable {
+
+    private String attrId;
+    private String specCd;
+    private String statusCd = "0";
+    private String value;
+    private String rentingId;
+
+    public String getAttrId() {
+        return attrId;
+    }
+
+    public void setAttrId(String attrId) {
+        this.attrId = attrId;
+    }
+
+    public String getSpecCd() {
+        return specCd;
+    }
+
+    public void setSpecCd(String specCd) {
+        this.specCd = specCd;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getRentingId() {
+        return rentingId;
+    }
+
+    public void setRentingId(String rentingId) {
+        this.rentingId = rentingId;
+    }
+
+
+}

+ 93 - 0
java110-db/src/main/resources/mapper/user/RentingPoolAttrServiceDaoImplMapper.xml

@@ -0,0 +1,93 @@
+<?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="rentingPoolAttrServiceDaoImpl">
+
+
+    <!-- 保存出租房屋属性信息 add by wuxw 2018-07-03 -->
+    <insert id="saveRentingPoolAttrInfo" parameterType="Map">
+        insert into renting_pool_attr(
+        attr_id,spec_cd,value,renting_id
+        ) values (
+        #{attrId},#{specCd},#{value},#{rentingId}
+        )
+    </insert>
+
+
+    <!-- 查询出租房屋属性信息 add by wuxw 2018-07-03 -->
+    <select id="getRentingPoolAttrInfo" parameterType="Map" resultType="Map">
+        select t.attr_id,t.attr_id attrId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd
+        statusCd,t.value,t.renting_id,t.renting_id rentingId
+        from renting_pool_attr t
+        where 1 =1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        <if test="rentingId !=null and rentingId != ''">
+            and t.renting_id= #{rentingId}
+        </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="updateRentingPoolAttrInfo" parameterType="Map">
+        update renting_pool_attr t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            , t.spec_cd= #{specCd}
+        </if>
+        <if test="value !=null and value != ''">
+            , t.value= #{value}
+        </if>
+        <if test="rentingId !=null and rentingId != ''">
+            , t.renting_id= #{rentingId}
+        </if>
+        where 1=1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+
+    </update>
+
+    <!-- 查询出租房屋属性数量 add by wuxw 2018-07-03 -->
+    <select id="queryRentingPoolAttrsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from renting_pool_attr t
+        where 1 =1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        <if test="rentingId !=null and rentingId != ''">
+            and t.renting_id= #{rentingId}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 15 - 45
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,58 +1,28 @@
 {
   "autoMove": true,
-  "id": "rentingId",
-  "name": "rentingPool",
-  "desc": "房屋出租",
-  "shareParam": "rentingId",
-  "shareColumn": "renting_id",
+  "id": "attrId",
+  "name": "rentingPoolAttr",
+  "desc": "出租房屋属性",
+  "shareParam": "communityId",
+  "shareColumn": "community_id",
   "shareName": "user",
-  "tableName": "renting_pool",
+  "tableName": "renting_pool_attr",
   "param": {
     "rentingId": "renting_id",
-    "rentingTitle": "renting_title",
-    "roomId": "room_id",
-    "communityId": "community_id",
-    "price": "price",
-    "paymentType": "payment_type",
-    "checkInDate": "check_in_date",
-    "rentingConfigId": "renting_config_id",
-    "rentingDesc": "renting_desc",
-    "state": "state",
-    "ownerName": "owner_name",
-    "ownerTel": "owner_tel",
-    "longitude": "longitude",
-    "latitude": "latitude",
+    "attrId": "attr_id",
+    "specCd": "spec_cd",
+    "value": "value",
     "statusCd": "status_cd"
   },
   "required": [
     {
-      "code": "rentingTitle",
-      "msg": "租户名称不能为空"
+      "code": "rentingId",
+      "msg": "出租房屋ID不能为空"
     },
     {
-      "code": "roomId",
-      "msg": "房屋ID不能为空"
-    },{
-      "code": "communityId",
-      "msg": "小区ID不能为空"
-    },{
-      "code": "price",
-      "msg": "价格不能为空"
-    },{
-      "code": "paymentType",
-      "msg": "付费方式不能为空"
-    },{
-      "code": "checkInDate",
-      "msg": "入住时间不能为空"
-    },{
-      "code": "rentingConfigId",
-      "msg": "租户配置不能为空"
-    },{
-      "code": "ownerName",
-      "msg": "业主名称不能为空"
-    },{
-      "code": "ownerTel",
-      "msg": "业主手机号不能为空"
+      "code": "specCd",
+      "msg": "用户规格不能为空"
     }
   ]
-}
+}
+

+ 58 - 0
java110-generator/src/main/resources/newBack/template_rentingPool.json

@@ -0,0 +1,58 @@
+{
+  "autoMove": true,
+  "id": "rentingId",
+  "name": "rentingPool",
+  "desc": "房屋出租",
+  "shareParam": "rentingId",
+  "shareColumn": "renting_id",
+  "shareName": "user",
+  "tableName": "renting_pool",
+  "param": {
+    "rentingId": "renting_id",
+    "rentingTitle": "renting_title",
+    "roomId": "room_id",
+    "communityId": "community_id",
+    "price": "price",
+    "paymentType": "payment_type",
+    "checkInDate": "check_in_date",
+    "rentingConfigId": "renting_config_id",
+    "rentingDesc": "renting_desc",
+    "state": "state",
+    "ownerName": "owner_name",
+    "ownerTel": "owner_tel",
+    "longitude": "longitude",
+    "latitude": "latitude",
+    "statusCd": "status_cd"
+  },
+  "required": [
+    {
+      "code": "rentingTitle",
+      "msg": "租户名称不能为空"
+    },
+    {
+      "code": "roomId",
+      "msg": "房屋ID不能为空"
+    },{
+      "code": "communityId",
+      "msg": "小区ID不能为空"
+    },{
+      "code": "price",
+      "msg": "价格不能为空"
+    },{
+      "code": "paymentType",
+      "msg": "付费方式不能为空"
+    },{
+      "code": "checkInDate",
+      "msg": "入住时间不能为空"
+    },{
+      "code": "rentingConfigId",
+      "msg": "租户配置不能为空"
+    },{
+      "code": "ownerName",
+      "msg": "业主名称不能为空"
+    },{
+      "code": "ownerTel",
+      "msg": "业主手机号不能为空"
+    }
+  ]
+}

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

@@ -0,0 +1,52 @@
+package com.java110.intf;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.rentingPoolAttr.RentingPoolAttrDto;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+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 IRentingPoolAttrInnerServiceSMO
+ * @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("/rentingPoolAttrApi")
+public interface IRentingPoolAttrInnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveRentingPoolAttr", method = RequestMethod.POST)
+    public int saveRentingPoolAttr(@RequestBody RentingPoolAttrPo rentingPoolAttrPo);
+
+    @RequestMapping(value = "/updateRentingPoolAttr", method = RequestMethod.POST)
+    public int updateRentingPoolAttr(@RequestBody RentingPoolAttrPo rentingPoolAttrPo);
+
+    @RequestMapping(value = "/deleteRentingPoolAttr", method = RequestMethod.POST)
+    public int deleteRentingPoolAttr(@RequestBody RentingPoolAttrPo rentingPoolAttrPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     * @param rentingPoolAttrDto 数据对象分享
+     * @return RentingPoolAttrDto 对象数据
+     */
+    @RequestMapping(value = "/queryRentingPoolAttrs", method = RequestMethod.POST)
+    List<RentingPoolAttrDto> queryRentingPoolAttrs(@RequestBody RentingPoolAttrDto rentingPoolAttrDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param rentingPoolAttrDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryRentingPoolAttrsCount", method = RequestMethod.POST)
+    int queryRentingPoolAttrsCount(@RequestBody RentingPoolAttrDto rentingPoolAttrDto);
+}

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

@@ -3,8 +3,10 @@ package com.java110.user.api;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.rentingConfig.RentingConfigDto;
 import com.java110.dto.rentingPool.RentingPoolDto;
+import com.java110.dto.rentingPoolAttr.RentingPoolAttrDto;
 import com.java110.po.rentingConfig.RentingConfigPo;
 import com.java110.po.rentingPool.RentingPoolPo;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
 import com.java110.user.bmo.rentingConfig.IDeleteRentingConfigBMO;
 import com.java110.user.bmo.rentingConfig.IGetRentingConfigBMO;
 import com.java110.user.bmo.rentingConfig.ISaveRentingConfigBMO;
@@ -13,6 +15,10 @@ import com.java110.user.bmo.rentingPool.IDeleteRentingPoolBMO;
 import com.java110.user.bmo.rentingPool.IGetRentingPoolBMO;
 import com.java110.user.bmo.rentingPool.ISaveRentingPoolBMO;
 import com.java110.user.bmo.rentingPool.IUpdateRentingPoolBMO;
+import com.java110.user.bmo.rentingPoolAttr.IDeleteRentingPoolAttrBMO;
+import com.java110.user.bmo.rentingPoolAttr.IGetRentingPoolAttrBMO;
+import com.java110.user.bmo.rentingPoolAttr.ISaveRentingPoolAttrBMO;
+import com.java110.user.bmo.rentingPoolAttr.IUpdateRentingPoolAttrBMO;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -45,6 +51,16 @@ public class RentingApi {
     @Autowired
     private IGetRentingPoolBMO getRentingPoolBMOImpl;
 
+    @Autowired
+    private ISaveRentingPoolAttrBMO saveRentingPoolAttrBMOImpl;
+    @Autowired
+    private IUpdateRentingPoolAttrBMO updateRentingPoolAttrBMOImpl;
+    @Autowired
+    private IDeleteRentingPoolAttrBMO deleteRentingPoolAttrBMOImpl;
+
+    @Autowired
+    private IGetRentingPoolAttrBMO getRentingPoolAttrBMOImpl;
+
     /**
      * 微信保存消息模板
      *
@@ -223,4 +239,82 @@ public class RentingApi {
         rentingPoolDto.setCommunityId(communityId);
         return getRentingPoolBMOImpl.get(rentingPoolDto);
     }
+
+
+    /**
+     * 微信保存消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /renting/saveRentingPoolAttr
+     * @path /app/renting/saveRentingPoolAttr
+     */
+    @RequestMapping(value = "/saveRentingPoolAttr", method = RequestMethod.POST)
+    public ResponseEntity<String> saveRentingPoolAttr(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "rentingId", "请求报文中未包含rentingId");
+        Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
+
+
+        RentingPoolAttrPo rentingPoolAttrPo = BeanConvertUtil.covertBean(reqJson, RentingPoolAttrPo.class);
+        return saveRentingPoolAttrBMOImpl.save(rentingPoolAttrPo);
+    }
+
+    /**
+     * 微信修改消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /renting/updateRentingPoolAttr
+     * @path /app/renting/updateRentingPoolAttr
+     */
+    @RequestMapping(value = "/updateRentingPoolAttr", method = RequestMethod.POST)
+    public ResponseEntity<String> updateRentingPoolAttr(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "rentingId", "请求报文中未包含rentingId");
+        Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
+        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
+
+
+        RentingPoolAttrPo rentingPoolAttrPo = BeanConvertUtil.covertBean(reqJson, RentingPoolAttrPo.class);
+        return updateRentingPoolAttrBMOImpl.update(rentingPoolAttrPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /renting/deleteRentingPoolAttr
+     * @path /app/renting/deleteRentingPoolAttr
+     */
+    @RequestMapping(value = "/deleteRentingPoolAttr", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteRentingPoolAttr(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
+
+
+        RentingPoolAttrPo rentingPoolAttrPo = BeanConvertUtil.covertBean(reqJson, RentingPoolAttrPo.class);
+        return deleteRentingPoolAttrBMOImpl.delete(rentingPoolAttrPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param communityId 小区ID
+     * @return
+     * @serviceCode /renting/queryRentingPoolAttr
+     * @path /app/renting/queryRentingPoolAttr
+     */
+    @RequestMapping(value = "/queryRentingPoolAttr", method = RequestMethod.GET)
+    public ResponseEntity<String> queryRentingPoolAttr(@RequestParam(value = "communityId") String communityId,
+                                                       @RequestParam(value = "page") int page,
+                                                       @RequestParam(value = "row") int row) {
+        RentingPoolAttrDto rentingPoolAttrDto = new RentingPoolAttrDto();
+        rentingPoolAttrDto.setPage(page);
+        rentingPoolAttrDto.setRow(row);
+        rentingPoolAttrDto.setCommunityId(communityId);
+        return getRentingPoolAttrBMOImpl.get(rentingPoolAttrDto);
+    }
 }

+ 17 - 0
service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/IDeleteRentingPoolAttrBMO.java

@@ -0,0 +1,17 @@
+package com.java110.user.bmo.rentingPoolAttr;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeleteRentingPoolAttrBMO {
+
+
+    /**
+     * 修改出租房屋属性
+     * add by wuxw
+     * @param rentingPoolAttrPo
+     * @return
+     */
+    ResponseEntity<String> delete(RentingPoolAttrPo rentingPoolAttrPo);
+
+
+}

+ 16 - 0
service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/IGetRentingPoolAttrBMO.java

@@ -0,0 +1,16 @@
+package com.java110.user.bmo.rentingPoolAttr;
+import com.java110.dto.rentingPoolAttr.RentingPoolAttrDto;
+import org.springframework.http.ResponseEntity;
+public interface IGetRentingPoolAttrBMO {
+
+
+    /**
+     * 查询出租房屋属性
+     * add by wuxw
+     * @param  rentingPoolAttrDto
+     * @return
+     */
+    ResponseEntity<String> get(RentingPoolAttrDto rentingPoolAttrDto);
+
+
+}

+ 17 - 0
service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/ISaveRentingPoolAttrBMO.java

@@ -0,0 +1,17 @@
+package com.java110.user.bmo.rentingPoolAttr;
+
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+import org.springframework.http.ResponseEntity;
+public interface ISaveRentingPoolAttrBMO {
+
+
+    /**
+     * 添加出租房屋属性
+     * add by wuxw
+     * @param rentingPoolAttrPo
+     * @return
+     */
+    ResponseEntity<String> save(RentingPoolAttrPo rentingPoolAttrPo);
+
+
+}

+ 17 - 0
service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/IUpdateRentingPoolAttrBMO.java

@@ -0,0 +1,17 @@
+package com.java110.user.bmo.rentingPoolAttr;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdateRentingPoolAttrBMO {
+
+
+    /**
+     * 修改出租房屋属性
+     * add by wuxw
+     * @param rentingPoolAttrPo
+     * @return
+     */
+    ResponseEntity<String> update(RentingPoolAttrPo rentingPoolAttrPo);
+
+
+}

+ 34 - 0
service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/impl/DeleteRentingPoolAttrBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.user.bmo.rentingPoolAttr.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.IRentingPoolAttrInnerServiceSMO;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+import com.java110.user.bmo.rentingPoolAttr.IDeleteRentingPoolAttrBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deleteRentingPoolAttrBMOImpl")
+public class DeleteRentingPoolAttrBMOImpl implements IDeleteRentingPoolAttrBMO {
+
+    @Autowired
+    private IRentingPoolAttrInnerServiceSMO rentingPoolAttrInnerServiceSMOImpl;
+
+    /**
+     * @param rentingPoolAttrPo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(RentingPoolAttrPo rentingPoolAttrPo) {
+
+        int flag = rentingPoolAttrInnerServiceSMOImpl.deleteRentingPoolAttr(rentingPoolAttrPo);
+
+        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/rentingPoolAttr/impl/GetRentingPoolAttrBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.user.bmo.rentingPoolAttr.impl;
+
+import com.java110.dto.rentingPoolAttr.RentingPoolAttrDto;
+import com.java110.intf.IRentingPoolAttrInnerServiceSMO;
+import com.java110.user.bmo.rentingPoolAttr.IGetRentingPoolAttrBMO;
+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("getRentingPoolAttrBMOImpl")
+public class GetRentingPoolAttrBMOImpl implements IGetRentingPoolAttrBMO {
+
+    @Autowired
+    private IRentingPoolAttrInnerServiceSMO rentingPoolAttrInnerServiceSMOImpl;
+
+    /**
+     * @param rentingPoolAttrDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(RentingPoolAttrDto rentingPoolAttrDto) {
+
+
+        int count = rentingPoolAttrInnerServiceSMOImpl.queryRentingPoolAttrsCount(rentingPoolAttrDto);
+
+        List<RentingPoolAttrDto> rentingPoolAttrDtos = null;
+        if (count > 0) {
+            rentingPoolAttrDtos = rentingPoolAttrInnerServiceSMOImpl.queryRentingPoolAttrs(rentingPoolAttrDto);
+        } else {
+            rentingPoolAttrDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) rentingPoolAttrDto.getRow()), count, rentingPoolAttrDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-user/src/main/java/com/java110/user/bmo/rentingPoolAttr/impl/SaveRentingPoolAttrBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.user.bmo.rentingPoolAttr.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.IRentingPoolAttrInnerServiceSMO;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+import com.java110.user.bmo.rentingPoolAttr.ISaveRentingPoolAttrBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("saveRentingPoolAttrBMOImpl")
+public class SaveRentingPoolAttrBMOImpl implements ISaveRentingPoolAttrBMO {
+
+    @Autowired
+    private IRentingPoolAttrInnerServiceSMO rentingPoolAttrInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param rentingPoolAttrPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(RentingPoolAttrPo rentingPoolAttrPo) {
+
+        rentingPoolAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
+        int flag = rentingPoolAttrInnerServiceSMOImpl.saveRentingPoolAttr(rentingPoolAttrPo);
+
+        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/rentingPoolAttr/impl/UpdateRentingPoolAttrBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.user.bmo.rentingPoolAttr.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.IRentingPoolAttrInnerServiceSMO;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+import com.java110.user.bmo.rentingPoolAttr.IUpdateRentingPoolAttrBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updateRentingPoolAttrBMOImpl")
+public class UpdateRentingPoolAttrBMOImpl implements IUpdateRentingPoolAttrBMO {
+
+    @Autowired
+    private IRentingPoolAttrInnerServiceSMO rentingPoolAttrInnerServiceSMOImpl;
+
+    /**
+     * @param rentingPoolAttrPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(RentingPoolAttrPo rentingPoolAttrPo) {
+
+        int flag = rentingPoolAttrInnerServiceSMOImpl.updateRentingPoolAttr(rentingPoolAttrPo);
+
+        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/IRentingPoolAttrServiceDao.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 IRentingPoolAttrServiceDao {
+
+
+    /**
+     * 保存 出租房屋属性信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveRentingPoolAttrInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询出租房屋属性信息(instance过程)
+     * 根据bId 查询出租房屋属性信息
+     * @param info bId 信息
+     * @return 出租房屋属性信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getRentingPoolAttrInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改出租房屋属性信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateRentingPoolAttrInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询出租房屋属性总数
+     *
+     * @param info 出租房屋属性信息
+     * @return 出租房屋属性数量
+     */
+    int queryRentingPoolAttrsCount(Map info);
+
+}

+ 98 - 0
service-user/src/main/java/com/java110/user/dao/impl/RentingPoolAttrServiceDaoImpl.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.IRentingPoolAttrServiceDao;
+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("rentingPoolAttrServiceDaoImpl")
+//@Transactional
+public class RentingPoolAttrServiceDaoImpl extends BaseServiceDao implements IRentingPoolAttrServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(RentingPoolAttrServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存出租房屋属性信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveRentingPoolAttrInfo(Map info) throws DAOException {
+        logger.debug("保存出租房屋属性信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("rentingPoolAttrServiceDaoImpl.saveRentingPoolAttrInfo",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> getRentingPoolAttrInfo(Map info) throws DAOException {
+        logger.debug("查询出租房屋属性信息 入参 info : {}",info);
+
+        List<Map> businessRentingPoolAttrInfos = sqlSessionTemplate.selectList("rentingPoolAttrServiceDaoImpl.getRentingPoolAttrInfo",info);
+
+        return businessRentingPoolAttrInfos;
+    }
+
+
+    /**
+     * 修改出租房屋属性信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateRentingPoolAttrInfo(Map info) throws DAOException {
+        logger.debug("修改出租房屋属性信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("rentingPoolAttrServiceDaoImpl.updateRentingPoolAttrInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改出租房屋属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询出租房屋属性数量
+     * @param info 出租房屋属性信息
+     * @return 出租房屋属性数量
+     */
+    @Override
+    public int queryRentingPoolAttrsCount(Map info) {
+        logger.debug("查询出租房屋属性数据 入参 info : {}",info);
+
+        List<Map> businessRentingPoolAttrInfos = sqlSessionTemplate.selectList("rentingPoolAttrServiceDaoImpl.queryRentingPoolAttrsCount", info);
+        if (businessRentingPoolAttrInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessRentingPoolAttrInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 83 - 0
service-user/src/main/java/com/java110/user/smo/impl/RentingPoolAttrInnerServiceSMOImpl.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.rentingPoolAttr.RentingPoolAttrDto;
+import com.java110.intf.IRentingPoolAttrInnerServiceSMO;
+import com.java110.po.rentingPoolAttr.RentingPoolAttrPo;
+import com.java110.user.dao.IRentingPoolAttrServiceDao;
+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 RentingPoolAttrInnerServiceSMOImpl extends BaseServiceSMO implements IRentingPoolAttrInnerServiceSMO {
+
+    @Autowired
+    private IRentingPoolAttrServiceDao rentingPoolAttrServiceDaoImpl;
+
+
+    @Override
+    public int saveRentingPoolAttr(@RequestBody RentingPoolAttrPo rentingPoolAttrPo) {
+        int saveFlag = 1;
+        rentingPoolAttrServiceDaoImpl.saveRentingPoolAttrInfo(BeanConvertUtil.beanCovertMap(rentingPoolAttrPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateRentingPoolAttr(@RequestBody RentingPoolAttrPo rentingPoolAttrPo) {
+        int saveFlag = 1;
+        rentingPoolAttrServiceDaoImpl.updateRentingPoolAttrInfo(BeanConvertUtil.beanCovertMap(rentingPoolAttrPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteRentingPoolAttr(@RequestBody RentingPoolAttrPo rentingPoolAttrPo) {
+        int saveFlag = 1;
+        rentingPoolAttrPo.setStatusCd("1");
+        rentingPoolAttrServiceDaoImpl.updateRentingPoolAttrInfo(BeanConvertUtil.beanCovertMap(rentingPoolAttrPo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<RentingPoolAttrDto> queryRentingPoolAttrs(@RequestBody RentingPoolAttrDto rentingPoolAttrDto) {
+
+        //校验是否传了 分页信息
+
+        int page = rentingPoolAttrDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            rentingPoolAttrDto.setPage((page - 1) * rentingPoolAttrDto.getRow());
+        }
+
+        List<RentingPoolAttrDto> rentingPoolAttrs = BeanConvertUtil.covertBeanList(rentingPoolAttrServiceDaoImpl.getRentingPoolAttrInfo(BeanConvertUtil.beanCovertMap(rentingPoolAttrDto)), RentingPoolAttrDto.class);
+
+        return rentingPoolAttrs;
+    }
+
+
+    @Override
+    public int queryRentingPoolAttrsCount(@RequestBody RentingPoolAttrDto rentingPoolAttrDto) {
+        return rentingPoolAttrServiceDaoImpl.queryRentingPoolAttrsCount(BeanConvertUtil.beanCovertMap(rentingPoolAttrDto));
+    }
+
+    public IRentingPoolAttrServiceDao getRentingPoolAttrServiceDaoImpl() {
+        return rentingPoolAttrServiceDaoImpl;
+    }
+
+    public void setRentingPoolAttrServiceDaoImpl(IRentingPoolAttrServiceDao rentingPoolAttrServiceDaoImpl) {
+        this.rentingPoolAttrServiceDaoImpl = rentingPoolAttrServiceDaoImpl;
+    }
+}