Bläddra i källkod

加入 优惠申请类型

java110 5 år sedan
förälder
incheckning
a5573337e5
19 ändrade filer med 855 tillägg och 143 borttagningar
  1. 69 0
      java110-bean/src/main/java/com/java110/dto/applyRoomDiscountType/ApplyRoomDiscountTypeDto.java
  2. 46 0
      java110-bean/src/main/java/com/java110/po/applyRoomDiscountType/ApplyRoomDiscountTypePo.java
  3. 1 0
      java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
  4. 97 0
      java110-db/src/main/resources/mapper/fee/ApplyRoomDiscountTypeServiceDaoImplMapper.xml
  5. 9 35
      java110-generator/src/main/resources/newBack/template_1.json
  6. 21 108
      java110-generator/src/main/resources/web/template_1.json
  7. 53 0
      java110-interface/src/main/java/com/java110/intf/fee/IApplyRoomDiscountTypeInnerServiceSMO.java
  8. 98 0
      service-fee/src/main/java/com/java110/fee/api/ApplyRoomDiscountApi.java
  9. 19 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/IDeleteApplyRoomDiscountTypeBMO.java
  10. 16 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/IGetApplyRoomDiscountTypeBMO.java
  11. 17 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/ISaveApplyRoomDiscountTypeBMO.java
  12. 17 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/IUpdateApplyRoomDiscountTypeBMO.java
  13. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/DeleteApplyRoomDiscountTypeBMOImpl.java
  14. 44 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/GetApplyRoomDiscountTypeBMOImpl.java
  15. 38 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/SaveApplyRoomDiscountTypeBMOImpl.java
  16. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/UpdateApplyRoomDiscountTypeBMOImpl.java
  17. 61 0
      service-fee/src/main/java/com/java110/fee/dao/IApplyRoomDiscountTypeServiceDao.java
  18. 98 0
      service-fee/src/main/java/com/java110/fee/dao/impl/ApplyRoomDiscountTypeServiceDaoImpl.java
  19. 83 0
      service-fee/src/main/java/com/java110/fee/smo/impl/ApplyRoomDiscountTypeInnerServiceSMOImpl.java

+ 69 - 0
java110-bean/src/main/java/com/java110/dto/applyRoomDiscountType/ApplyRoomDiscountTypeDto.java

@@ -0,0 +1,69 @@
+package com.java110.dto.applyRoomDiscountType;
+
+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 ApplyRoomDiscountTypeDto extends PageDto implements Serializable {
+
+    private String applyType;
+private String typeDesc;
+private String typeName;
+private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getApplyType() {
+        return applyType;
+    }
+public void setApplyType(String applyType) {
+        this.applyType = applyType;
+    }
+public String getTypeDesc() {
+        return typeDesc;
+    }
+public void setTypeDesc(String typeDesc) {
+        this.typeDesc = typeDesc;
+    }
+public String getTypeName() {
+        return typeName;
+    }
+public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+    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;
+    }
+}

+ 46 - 0
java110-bean/src/main/java/com/java110/po/applyRoomDiscountType/ApplyRoomDiscountTypePo.java

@@ -0,0 +1,46 @@
+package com.java110.po.applyRoomDiscountType;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ApplyRoomDiscountTypePo implements Serializable {
+
+    private String applyType;
+private String typeDesc;
+private String typeName;
+private String statusCd = "0";
+private String communityId;
+public String getApplyType() {
+        return applyType;
+    }
+public void setApplyType(String applyType) {
+        this.applyType = applyType;
+    }
+public String getTypeDesc() {
+        return typeDesc;
+    }
+public void setTypeDesc(String typeDesc) {
+        this.typeDesc = typeDesc;
+    }
+public String getTypeName() {
+        return typeName;
+    }
+public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+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;
+    }
+
+
+
+}

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

@@ -177,6 +177,7 @@ public class GenerateCodeFactory {
     public static final String CODE_PREFIX_databusId = "12";
     public static final String CODE_PREFIX_auId = "13";
     public static final String CODE_PREFIX_ardId = "14";
+    public static final String CODE_PREFIX_applyType = "15";
 
 
     /**

+ 97 - 0
java110-db/src/main/resources/mapper/fee/ApplyRoomDiscountTypeServiceDaoImplMapper.xml

@@ -0,0 +1,97 @@
+<?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="applyRoomDiscountTypeServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存优惠申请类型信息 add by wuxw 2018-07-03 -->
+    <insert id="saveApplyRoomDiscountTypeInfo" parameterType="Map">
+        insert into apply_room_discount_type(
+apply_type,type_desc,type_name,community_id
+) values (
+#{applyType},#{typeDesc},#{typeName},#{communityId}
+)
+    </insert>
+
+
+
+    <!-- 查询优惠申请类型信息 add by wuxw 2018-07-03 -->
+    <select id="getApplyRoomDiscountTypeInfo" parameterType="Map" resultType="Map">
+        select  t.apply_type,t.apply_type applyType,t.type_desc,t.type_desc typeDesc,t.type_name,t.type_name typeName,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId 
+from apply_room_discount_type t 
+where 1 =1 
+<if test="applyType !=null and applyType != ''">
+   and t.apply_type= #{applyType}
+</if> 
+<if test="typeDesc !=null and typeDesc != ''">
+   and t.type_desc= #{typeDesc}
+</if> 
+<if test="typeName !=null and typeName != ''">
+   and t.type_name= #{typeName}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</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="updateApplyRoomDiscountTypeInfo" parameterType="Map">
+        update  apply_room_discount_type t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="typeDesc !=null and typeDesc != ''">
+, t.type_desc= #{typeDesc}
+</if> 
+<if test="typeName !=null and typeName != ''">
+, t.type_name= #{typeName}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+ where 1=1 <if test="applyType !=null and applyType != ''">
+and t.apply_type= #{applyType}
+</if> 
+
+    </update>
+
+    <!-- 查询优惠申请类型数量 add by wuxw 2018-07-03 -->
+     <select id="queryApplyRoomDiscountTypesCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from apply_room_discount_type t 
+where 1 =1 
+<if test="applyType !=null and applyType != ''">
+   and t.apply_type= #{applyType}
+</if> 
+<if test="typeDesc !=null and typeDesc != ''">
+   and t.type_desc= #{typeDesc}
+</if> 
+<if test="typeName !=null and typeName != ''">
+   and t.type_name= #{typeName}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 9 - 35
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,27 +1,17 @@
 {
   "autoMove": true,
-  "id": "ardId",
-  "name": "applyRoomDiscount",
-  "desc": "房屋折扣申请",
+  "id": "applyType",
+  "name": "applyRoomDiscountType",
+  "desc": "优惠申请类型",
   "shareParam": "communityId",
   "shareColumn": "community_id",
   "shareName": "fee",
-  "tableName": "apply_room_discount",
+  "tableName": "apply_room_discount_type",
   "param": {
-    "ardId": "ard_id",
-    "communityId": "community_id",
-    "roomId": "room_id",
-    "roomName": "room_name",
-    "startTime": "start_time",
-    "endTime": "end_time",
-    "createUserId": "create_user_id",
-    "checkUserId": "check_user_id",
-    "reviewUserId": "review_user_id",
-    "state": "state",
-    "discountId": "discount_id",
-    "checkRemark": "check_remark",
-    "reviewRemark": "review_remark",
     "applyType": "apply_type",
+    "communityId": "community_id",
+    "typeName": "type_name",
+    "typeDesc": "type_desc",
     "statusCd": "status_cd"
   },
   "required": [
@@ -30,24 +20,8 @@
       "msg": "小区信息不能为空"
     },
     {
-      "code": "roomId",
-      "msg": "房屋信息不能为空"
-    },
-    {
-      "code": "roomName",
-      "msg": "房屋名称不能为空"
-    },
-    {
-      "code": "startTime",
-      "msg": "开始时间不能为空"
-    },
-    {
-      "code": "endTime",
-      "msg": "结束时间不能为空"
-    },
-    {
-      "code": "applyType",
-      "msg": "申请类型不能为空"
+      "code": "typeName",
+      "msg": "类型名称不能为空"
     }
   ]
 }

+ 21 - 108
java110-generator/src/main/resources/web/template_1.json

@@ -1,136 +1,49 @@
 {
-  "templateName": "房屋折扣申请",
+  "templateName": "优惠申请类型",
   "directories": "property",
-  "templateCode": "applyRoomDiscount",
-  "templateKey": "ardId",
-  "templateKeyName": "申请ID",
-  "searchCode": "ardId",
-  "searchName": "申请ID",
+  "templateCode": "applyRoomDiscountType",
+  "templateKey": "applyType",
+  "templateKeyName": "类型",
+  "searchCode": "applyType",
+  "searchName": "类型",
   "conditions": [
     {
-      "name": "房屋名称",
+      "name": "类型名称",
       "inputType": "input",
-      "code": "roomName",
+      "code": "typeName",
       "whereCondition": "equal"
     },
     {
-      "name": "申请类型",
-      "inputType": "select",
-      "selectValue": "3333,4444,5555",
-      "selectValueName": "空置房,采暖不热,房屋质量问题",
-      "code": "roomName",
-      "whereCondition": "equal"
-    },
-    {
-      "name": "状态",
-      "inputType": "select",
-      "selectValue": "1,2,3,4,5",
-      "selectValueName": "申请验房,验房通过,验房不通过,审批通过,审批不通过",
-      "code": "state",
+      "name": "类型",
+      "inputType": "input",
+      "code": "applyType",
       "whereCondition": "equal"
     }
   ],
   "columns": [
     {
-      "code": "roomName",
-      "cnCode": "房屋",
-      "desc": "必填,请填写房屋",
+      "code": "typeName",
+      "cnCode": "类型名称",
+      "desc": "必填,请填写类型名称",
       "required": true,
       "hasDefaultValue": false,
       "inputType": "input",
       "limit": "maxLength",
       "limitParam": "64",
-      "limitErrInfo": "房屋格式错误",
+      "limitErrInfo": "类型名称格式错误",
       "show": true
     },
     {
-      "code": "discountId",
-      "cnCode": "折扣",
-      "desc": "必填,请选择折扣",
-      "required": true,
-      "hasDefaultValue": false,
-      "inputType": "select",
-      "selectValue": "1",
-      "selectValueName": "折扣",
-      "limit": "maxLength",
-      "limitParam": "12",
-      "limitErrInfo": "折扣错误",
-      "show": true
-    },
-    {
-      "code": "applyType",
-      "cnCode": "申请类型",
-      "desc": "必填,请选择认证方式",
-      "required": true,
-      "hasDefaultValue": false,
-      "inputType": "select",
-      "selectValue": "3333,4444,5555",
-      "selectValueName": "空置房,采暖不热,房屋质量问题",
-      "limit": "num",
-      "limitParam": "",
-      "limitErrInfo": "申请类型错误",
-      "show": true
-    },
-
-    {
-      "code": "createUserName",
-      "cnCode": "申请人",
-      "desc": "必填,请填写申请人",
-      "required": true,
-      "hasDefaultValue": false,
-      "inputType": "input",
-      "limit": "maxLength",
-      "limitParam": "64",
-      "limitErrInfo": "申请人错误",
-      "show": true
-    },
-    {
-      "code": "createUserTel",
-      "cnCode": "申请电话",
-      "desc": "必填,请填写申请电话",
-      "required": true,
-      "hasDefaultValue": false,
-      "inputType": "input",
-      "limit": "phone",
-      "limitParam": "",
-      "limitErrInfo": "申请电话错误",
-      "show": true
-    },
-    {
-      "code": "startTime",
-      "cnCode": "开始时间",
-      "desc": "必填,请选择开始时间",
-      "required": true,
-      "hasDefaultValue": false,
-      "inputType": "input",
-      "limit": "datetime",
-      "limitParam": "",
-      "limitErrInfo": "开始时间错误",
-      "show": true
-    },
-    {
-      "code": "endTime",
-      "cnCode": "结束时间",
-      "desc": "必填,请选择结束时间",
-      "required": true,
-      "hasDefaultValue": false,
-      "inputType": "input",
-      "limit": "datetime",
-      "limitParam": "",
-      "limitErrInfo": "结束时间错误",
-      "show": true
-    },
-    {
-      "code": "createRemark",
-      "cnCode": "申请说明",
-      "desc": "必填,请填写申请说明",
-      "required": true,
+      "code": "typeDesc",
+      "cnCode": "类型描述",
+      "desc": "选填,请填写类型描述",
+      "required": false,
       "hasDefaultValue": false,
       "inputType": "input",
       "limit": "maxLength",
       "limitParam": "512",
-      "limitErrInfo": "申请申请说明",
-      "show": false
+      "limitErrInfo": "类型描述错误",
+      "show": true
     }
   ]
 }

+ 53 - 0
java110-interface/src/main/java/com/java110/intf/fee/IApplyRoomDiscountTypeInnerServiceSMO.java

@@ -0,0 +1,53 @@
+package com.java110.intf.fee;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.applyRoomDiscountType.ApplyRoomDiscountTypeDto;
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+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 IApplyRoomDiscountTypeInnerServiceSMO
+ * @Description 优惠申请类型接口类
+ * @Author wuxw
+ * @Date 2019/4/24 9:04
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@FeignClient(name = "fee-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/applyRoomDiscountTypeApi")
+public interface IApplyRoomDiscountTypeInnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveApplyRoomDiscountType", method = RequestMethod.POST)
+    public int saveApplyRoomDiscountType(@RequestBody ApplyRoomDiscountTypePo applyRoomDiscountTypePo);
+
+    @RequestMapping(value = "/updateApplyRoomDiscountType", method = RequestMethod.POST)
+    public int updateApplyRoomDiscountType(@RequestBody  ApplyRoomDiscountTypePo applyRoomDiscountTypePo);
+
+    @RequestMapping(value = "/deleteApplyRoomDiscountType", method = RequestMethod.POST)
+    public int deleteApplyRoomDiscountType(@RequestBody  ApplyRoomDiscountTypePo applyRoomDiscountTypePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param applyRoomDiscountTypeDto 数据对象分享
+     * @return ApplyRoomDiscountTypeDto 对象数据
+     */
+    @RequestMapping(value = "/queryApplyRoomDiscountTypes", method = RequestMethod.POST)
+    List<ApplyRoomDiscountTypeDto> queryApplyRoomDiscountTypes(@RequestBody ApplyRoomDiscountTypeDto applyRoomDiscountTypeDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param applyRoomDiscountTypeDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryApplyRoomDiscountTypesCount", method = RequestMethod.POST)
+    int queryApplyRoomDiscountTypesCount(@RequestBody ApplyRoomDiscountTypeDto applyRoomDiscountTypeDto);
+}

+ 98 - 0
service-fee/src/main/java/com/java110/fee/api/ApplyRoomDiscountApi.java

@@ -2,12 +2,18 @@ package com.java110.fee.api;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.applyRoomDiscount.ApplyRoomDiscountDto;
+import com.java110.dto.applyRoomDiscountType.ApplyRoomDiscountTypeDto;
 import com.java110.fee.bmo.applyRoomDiscount.IAuditApplyRoomDiscountBMO;
 import com.java110.fee.bmo.applyRoomDiscount.IDeleteApplyRoomDiscountBMO;
 import com.java110.fee.bmo.applyRoomDiscount.IGetApplyRoomDiscountBMO;
 import com.java110.fee.bmo.applyRoomDiscount.ISaveApplyRoomDiscountBMO;
 import com.java110.fee.bmo.applyRoomDiscount.IUpdateApplyRoomDiscountBMO;
+import com.java110.fee.bmo.applyRoomDiscountType.IDeleteApplyRoomDiscountTypeBMO;
+import com.java110.fee.bmo.applyRoomDiscountType.IGetApplyRoomDiscountTypeBMO;
+import com.java110.fee.bmo.applyRoomDiscountType.ISaveApplyRoomDiscountTypeBMO;
+import com.java110.fee.bmo.applyRoomDiscountType.IUpdateApplyRoomDiscountTypeBMO;
 import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo;
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,6 +41,16 @@ public class ApplyRoomDiscountApi {
     @Autowired
     private IAuditApplyRoomDiscountBMO auditApplyRoomDiscountBMOImpl;
 
+    @Autowired
+    private ISaveApplyRoomDiscountTypeBMO saveApplyRoomDiscountTypeBMOImpl;
+    @Autowired
+    private IUpdateApplyRoomDiscountTypeBMO updateApplyRoomDiscountTypeBMOImpl;
+    @Autowired
+    private IDeleteApplyRoomDiscountTypeBMO deleteApplyRoomDiscountTypeBMOImpl;
+
+    @Autowired
+    private IGetApplyRoomDiscountTypeBMO getApplyRoomDiscountTypeBMOImpl;
+
     /**
      * 优惠申请
      *
@@ -146,4 +162,86 @@ public class ApplyRoomDiscountApi {
         applyRoomDiscountDto.setState(state);
         return getApplyRoomDiscountBMOImpl.get(applyRoomDiscountDto);
     }
+
+
+    /**
+     * 微信保存消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /applyRoomDiscount/saveApplyRoomDiscountType
+     * @path /app/applyRoomDiscount/saveApplyRoomDiscountType
+     */
+    @RequestMapping(value = "/saveApplyRoomDiscountType", method = RequestMethod.POST)
+    public ResponseEntity<String> saveApplyRoomDiscountType(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "typeName", "请求报文中未包含typeName");
+
+
+        ApplyRoomDiscountTypePo applyRoomDiscountTypePo = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountTypePo.class);
+        return saveApplyRoomDiscountTypeBMOImpl.save(applyRoomDiscountTypePo);
+    }
+
+    /**
+     * 微信修改消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /applyRoomDiscount/updateApplyRoomDiscountType
+     * @path /app/applyRoomDiscount/updateApplyRoomDiscountType
+     */
+    @RequestMapping(value = "/updateApplyRoomDiscountType", method = RequestMethod.POST)
+    public ResponseEntity<String> updateApplyRoomDiscountType(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "typeName", "请求报文中未包含typeName");
+        Assert.hasKeyAndValue(reqJson, "applyType", "applyType不能为空");
+
+
+        ApplyRoomDiscountTypePo applyRoomDiscountTypePo = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountTypePo.class);
+        return updateApplyRoomDiscountTypeBMOImpl.update(applyRoomDiscountTypePo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /applyRoomDiscount/deleteApplyRoomDiscountType
+     * @path /app/applyRoomDiscount/deleteApplyRoomDiscountType
+     */
+    @RequestMapping(value = "/deleteApplyRoomDiscountType", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteApplyRoomDiscountType(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "applyType", "applyType不能为空");
+
+
+        ApplyRoomDiscountTypePo applyRoomDiscountTypePo = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountTypePo.class);
+        return deleteApplyRoomDiscountTypeBMOImpl.delete(applyRoomDiscountTypePo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param communityId 小区ID
+     * @return
+     * @serviceCode /applyRoomDiscount/queryApplyRoomDiscountType
+     * @path /app/applyRoomDiscount/queryApplyRoomDiscountType
+     */
+    @RequestMapping(value = "/queryApplyRoomDiscountType", method = RequestMethod.GET)
+    public ResponseEntity<String> queryApplyRoomDiscountType(@RequestParam(value = "communityId") String communityId,
+                                                             @RequestParam(value = "applyType", required = false) String applyType,
+                                                             @RequestParam(value = "typeName", required = false) String typeName,
+                                                             @RequestParam(value = "page") int page,
+                                                             @RequestParam(value = "row") int row) {
+        ApplyRoomDiscountTypeDto applyRoomDiscountTypeDto = new ApplyRoomDiscountTypeDto();
+        applyRoomDiscountTypeDto.setPage(page);
+        applyRoomDiscountTypeDto.setRow(row);
+        applyRoomDiscountTypeDto.setCommunityId(communityId);
+        applyRoomDiscountTypeDto.setApplyType(applyType);
+        applyRoomDiscountTypeDto.setTypeName(typeName);
+        return getApplyRoomDiscountTypeBMOImpl.get(applyRoomDiscountTypeDto);
+    }
 }

+ 19 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/IDeleteApplyRoomDiscountTypeBMO.java

@@ -0,0 +1,19 @@
+package com.java110.fee.bmo.applyRoomDiscountType;
+
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeleteApplyRoomDiscountTypeBMO {
+
+
+    /**
+     * 修改优惠申请类型
+     * add by wuxw
+     *
+     * @param applyRoomDiscountTypePo
+     * @return
+     */
+    ResponseEntity<String> delete(ApplyRoomDiscountTypePo applyRoomDiscountTypePo);
+
+
+}

+ 16 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/IGetApplyRoomDiscountTypeBMO.java

@@ -0,0 +1,16 @@
+package com.java110.fee.bmo.applyRoomDiscountType;
+import com.java110.dto.applyRoomDiscountType.ApplyRoomDiscountTypeDto;
+import org.springframework.http.ResponseEntity;
+public interface IGetApplyRoomDiscountTypeBMO {
+
+
+    /**
+     * 查询优惠申请类型
+     * add by wuxw
+     * @param  applyRoomDiscountTypeDto
+     * @return
+     */
+    ResponseEntity<String> get(ApplyRoomDiscountTypeDto applyRoomDiscountTypeDto);
+
+
+}

+ 17 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/ISaveApplyRoomDiscountTypeBMO.java

@@ -0,0 +1,17 @@
+package com.java110.fee.bmo.applyRoomDiscountType;
+
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+import org.springframework.http.ResponseEntity;
+public interface ISaveApplyRoomDiscountTypeBMO {
+
+
+    /**
+     * 添加优惠申请类型
+     * add by wuxw
+     * @param applyRoomDiscountTypePo
+     * @return
+     */
+    ResponseEntity<String> save(ApplyRoomDiscountTypePo applyRoomDiscountTypePo);
+
+
+}

+ 17 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/IUpdateApplyRoomDiscountTypeBMO.java

@@ -0,0 +1,17 @@
+package com.java110.fee.bmo.applyRoomDiscountType;
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdateApplyRoomDiscountTypeBMO {
+
+
+    /**
+     * 修改优惠申请类型
+     * add by wuxw
+     * @param applyRoomDiscountTypePo
+     * @return
+     */
+    ResponseEntity<String> update(ApplyRoomDiscountTypePo applyRoomDiscountTypePo);
+
+
+}

+ 34 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/DeleteApplyRoomDiscountTypeBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.applyRoomDiscountType.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.applyRoomDiscountType.IDeleteApplyRoomDiscountTypeBMO;
+import com.java110.intf.fee.IApplyRoomDiscountTypeInnerServiceSMO;
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deleteApplyRoomDiscountTypeBMOImpl")
+public class DeleteApplyRoomDiscountTypeBMOImpl implements IDeleteApplyRoomDiscountTypeBMO {
+
+    @Autowired
+    private IApplyRoomDiscountTypeInnerServiceSMO applyRoomDiscountTypeInnerServiceSMOImpl;
+
+    /**
+     * @param applyRoomDiscountTypePo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(ApplyRoomDiscountTypePo applyRoomDiscountTypePo) {
+
+        int flag = applyRoomDiscountTypeInnerServiceSMOImpl.deleteApplyRoomDiscountType(applyRoomDiscountTypePo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 44 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/GetApplyRoomDiscountTypeBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.fee.bmo.applyRoomDiscountType.impl;
+
+import com.java110.dto.applyRoomDiscountType.ApplyRoomDiscountTypeDto;
+import com.java110.fee.bmo.applyRoomDiscountType.IGetApplyRoomDiscountTypeBMO;
+import com.java110.intf.fee.IApplyRoomDiscountTypeInnerServiceSMO;
+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("getApplyRoomDiscountTypeBMOImpl")
+public class GetApplyRoomDiscountTypeBMOImpl implements IGetApplyRoomDiscountTypeBMO {
+
+    @Autowired
+    private IApplyRoomDiscountTypeInnerServiceSMO applyRoomDiscountTypeInnerServiceSMOImpl;
+
+    /**
+     * @param applyRoomDiscountTypeDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(ApplyRoomDiscountTypeDto applyRoomDiscountTypeDto) {
+
+
+        int count = applyRoomDiscountTypeInnerServiceSMOImpl.queryApplyRoomDiscountTypesCount(applyRoomDiscountTypeDto);
+
+        List<ApplyRoomDiscountTypeDto> applyRoomDiscountTypeDtos = null;
+        if (count > 0) {
+            applyRoomDiscountTypeDtos = applyRoomDiscountTypeInnerServiceSMOImpl.queryApplyRoomDiscountTypes(applyRoomDiscountTypeDto);
+        } else {
+            applyRoomDiscountTypeDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) applyRoomDiscountTypeDto.getRow()), count, applyRoomDiscountTypeDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/SaveApplyRoomDiscountTypeBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.fee.bmo.applyRoomDiscountType.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.fee.bmo.applyRoomDiscountType.ISaveApplyRoomDiscountTypeBMO;
+import com.java110.intf.fee.IApplyRoomDiscountTypeInnerServiceSMO;
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("saveApplyRoomDiscountTypeBMOImpl")
+public class SaveApplyRoomDiscountTypeBMOImpl implements ISaveApplyRoomDiscountTypeBMO {
+
+    @Autowired
+    private IApplyRoomDiscountTypeInnerServiceSMO applyRoomDiscountTypeInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param applyRoomDiscountTypePo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(ApplyRoomDiscountTypePo applyRoomDiscountTypePo) {
+
+        applyRoomDiscountTypePo.setApplyType(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_applyType));
+        int flag = applyRoomDiscountTypeInnerServiceSMOImpl.saveApplyRoomDiscountType(applyRoomDiscountTypePo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 34 - 0
service-fee/src/main/java/com/java110/fee/bmo/applyRoomDiscountType/impl/UpdateApplyRoomDiscountTypeBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.applyRoomDiscountType.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.applyRoomDiscountType.IUpdateApplyRoomDiscountTypeBMO;
+import com.java110.intf.fee.IApplyRoomDiscountTypeInnerServiceSMO;
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updateApplyRoomDiscountTypeBMOImpl")
+public class UpdateApplyRoomDiscountTypeBMOImpl implements IUpdateApplyRoomDiscountTypeBMO {
+
+    @Autowired
+    private IApplyRoomDiscountTypeInnerServiceSMO applyRoomDiscountTypeInnerServiceSMOImpl;
+
+    /**
+     * @param applyRoomDiscountTypePo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(ApplyRoomDiscountTypePo applyRoomDiscountTypePo) {
+
+        int flag = applyRoomDiscountTypeInnerServiceSMOImpl.updateApplyRoomDiscountType(applyRoomDiscountTypePo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 61 - 0
service-fee/src/main/java/com/java110/fee/dao/IApplyRoomDiscountTypeServiceDao.java

@@ -0,0 +1,61 @@
+package com.java110.fee.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 IApplyRoomDiscountTypeServiceDao {
+
+
+    /**
+     * 保存 优惠申请类型信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveApplyRoomDiscountTypeInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询优惠申请类型信息(instance过程)
+     * 根据bId 查询优惠申请类型信息
+     * @param info bId 信息
+     * @return 优惠申请类型信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getApplyRoomDiscountTypeInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改优惠申请类型信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateApplyRoomDiscountTypeInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询优惠申请类型总数
+     *
+     * @param info 优惠申请类型信息
+     * @return 优惠申请类型数量
+     */
+    int queryApplyRoomDiscountTypesCount(Map info);
+
+}

+ 98 - 0
service-fee/src/main/java/com/java110/fee/dao/impl/ApplyRoomDiscountTypeServiceDaoImpl.java

@@ -0,0 +1,98 @@
+package com.java110.fee.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.fee.dao.IApplyRoomDiscountTypeServiceDao;
+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("applyRoomDiscountTypeServiceDaoImpl")
+//@Transactional
+public class ApplyRoomDiscountTypeServiceDaoImpl extends BaseServiceDao implements IApplyRoomDiscountTypeServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ApplyRoomDiscountTypeServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存优惠申请类型信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveApplyRoomDiscountTypeInfo(Map info) throws DAOException {
+        logger.debug("保存优惠申请类型信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("applyRoomDiscountTypeServiceDaoImpl.saveApplyRoomDiscountTypeInfo",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> getApplyRoomDiscountTypeInfo(Map info) throws DAOException {
+        logger.debug("查询优惠申请类型信息 入参 info : {}",info);
+
+        List<Map> businessApplyRoomDiscountTypeInfos = sqlSessionTemplate.selectList("applyRoomDiscountTypeServiceDaoImpl.getApplyRoomDiscountTypeInfo",info);
+
+        return businessApplyRoomDiscountTypeInfos;
+    }
+
+
+    /**
+     * 修改优惠申请类型信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateApplyRoomDiscountTypeInfo(Map info) throws DAOException {
+        logger.debug("修改优惠申请类型信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("applyRoomDiscountTypeServiceDaoImpl.updateApplyRoomDiscountTypeInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改优惠申请类型信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询优惠申请类型数量
+     * @param info 优惠申请类型信息
+     * @return 优惠申请类型数量
+     */
+    @Override
+    public int queryApplyRoomDiscountTypesCount(Map info) {
+        logger.debug("查询优惠申请类型数据 入参 info : {}",info);
+
+        List<Map> businessApplyRoomDiscountTypeInfos = sqlSessionTemplate.selectList("applyRoomDiscountTypeServiceDaoImpl.queryApplyRoomDiscountTypesCount", info);
+        if (businessApplyRoomDiscountTypeInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessApplyRoomDiscountTypeInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 83 - 0
service-fee/src/main/java/com/java110/fee/smo/impl/ApplyRoomDiscountTypeInnerServiceSMOImpl.java

@@ -0,0 +1,83 @@
+package com.java110.fee.smo.impl;
+
+
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.applyRoomDiscountType.ApplyRoomDiscountTypeDto;
+import com.java110.fee.dao.IApplyRoomDiscountTypeServiceDao;
+import com.java110.intf.fee.IApplyRoomDiscountTypeInnerServiceSMO;
+import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo;
+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 ApplyRoomDiscountTypeInnerServiceSMOImpl extends BaseServiceSMO implements IApplyRoomDiscountTypeInnerServiceSMO {
+
+    @Autowired
+    private IApplyRoomDiscountTypeServiceDao applyRoomDiscountTypeServiceDaoImpl;
+
+
+    @Override
+    public int saveApplyRoomDiscountType(@RequestBody ApplyRoomDiscountTypePo applyRoomDiscountTypePo) {
+        int saveFlag = 1;
+        applyRoomDiscountTypeServiceDaoImpl.saveApplyRoomDiscountTypeInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountTypePo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateApplyRoomDiscountType(@RequestBody ApplyRoomDiscountTypePo applyRoomDiscountTypePo) {
+        int saveFlag = 1;
+        applyRoomDiscountTypeServiceDaoImpl.updateApplyRoomDiscountTypeInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountTypePo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteApplyRoomDiscountType(@RequestBody ApplyRoomDiscountTypePo applyRoomDiscountTypePo) {
+        int saveFlag = 1;
+        applyRoomDiscountTypePo.setStatusCd("1");
+        applyRoomDiscountTypeServiceDaoImpl.updateApplyRoomDiscountTypeInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountTypePo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<ApplyRoomDiscountTypeDto> queryApplyRoomDiscountTypes(@RequestBody ApplyRoomDiscountTypeDto applyRoomDiscountTypeDto) {
+
+        //校验是否传了 分页信息
+
+        int page = applyRoomDiscountTypeDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            applyRoomDiscountTypeDto.setPage((page - 1) * applyRoomDiscountTypeDto.getRow());
+        }
+
+        List<ApplyRoomDiscountTypeDto> applyRoomDiscountTypes = BeanConvertUtil.covertBeanList(applyRoomDiscountTypeServiceDaoImpl.getApplyRoomDiscountTypeInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountTypeDto)), ApplyRoomDiscountTypeDto.class);
+
+        return applyRoomDiscountTypes;
+    }
+
+
+    @Override
+    public int queryApplyRoomDiscountTypesCount(@RequestBody ApplyRoomDiscountTypeDto applyRoomDiscountTypeDto) {
+        return applyRoomDiscountTypeServiceDaoImpl.queryApplyRoomDiscountTypesCount(BeanConvertUtil.beanCovertMap(applyRoomDiscountTypeDto));
+    }
+
+    public IApplyRoomDiscountTypeServiceDao getApplyRoomDiscountTypeServiceDaoImpl() {
+        return applyRoomDiscountTypeServiceDaoImpl;
+    }
+
+    public void setApplyRoomDiscountTypeServiceDaoImpl(IApplyRoomDiscountTypeServiceDao applyRoomDiscountTypeServiceDaoImpl) {
+        this.applyRoomDiscountTypeServiceDaoImpl = applyRoomDiscountTypeServiceDaoImpl;
+    }
+}