Browse Source

优化 退费 将Listener 模式调整为cmd 模式

java110 4 years ago
parent
commit
98c471c68e

+ 138 - 0
java110-bean/src/main/java/com/java110/po/returnPayFee/ReturnPayFeePo.java

@@ -0,0 +1,138 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.po.returnPayFee;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public class ReturnPayFeePo implements Serializable {
+
+    private String reason;
+private String primeRate;
+private String feeTypeCd;
+private String payTime;
+private String detailId;
+private String receivableAmount;
+private String cycles;
+private String remark;
+private String statusCd = "0";
+private String receivedAmount;
+private String feeId;
+private String returnFeeId;
+private String configId;
+private String state;
+private String communityId;
+public String getReason() {
+        return reason;
+    }
+public void setReason(String reason) {
+        this.reason = reason;
+    }
+public String getPrimeRate() {
+        return primeRate;
+    }
+public void setPrimeRate(String primeRate) {
+        this.primeRate = primeRate;
+    }
+public String getFeeTypeCd() {
+        return feeTypeCd;
+    }
+public void setFeeTypeCd(String feeTypeCd) {
+        this.feeTypeCd = feeTypeCd;
+    }
+public String getPayTime() {
+        return payTime;
+    }
+public void setPayTime(String payTime) {
+        this.payTime = payTime;
+    }
+public String getDetailId() {
+        return detailId;
+    }
+public void setDetailId(String detailId) {
+        this.detailId = detailId;
+    }
+public String getReceivableAmount() {
+        return receivableAmount;
+    }
+public void setReceivableAmount(String receivableAmount) {
+        this.receivableAmount = receivableAmount;
+    }
+public String getCycles() {
+        return cycles;
+    }
+public void setCycles(String cycles) {
+        this.cycles = cycles;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getReceivedAmount() {
+        return receivedAmount;
+    }
+public void setReceivedAmount(String receivedAmount) {
+        this.receivedAmount = receivedAmount;
+    }
+public String getFeeId() {
+        return feeId;
+    }
+public void setFeeId(String feeId) {
+        this.feeId = feeId;
+    }
+public String getReturnFeeId() {
+        return returnFeeId;
+    }
+public void setReturnFeeId(String returnFeeId) {
+        this.returnFeeId = returnFeeId;
+    }
+public String getConfigId() {
+        return configId;
+    }
+public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+
+}

+ 187 - 0
java110-db/src/main/resources/mapper/fee/ReturnPayFeeV1ServiceDaoImplMapper.xml

@@ -0,0 +1,187 @@
+<?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="returnPayFeeV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存退费表信息 add by wuxw 2018-07-03 -->
+    <insert id="saveReturnPayFeeInfo" parameterType="Map">
+        insert into return_pay_fee(
+reason,prime_rate,fee_type_cd,pay_time,detail_id,receivable_amount,cycles,remark,received_amount,fee_id,return_fee_id,config_id,state,community_id
+) values (
+#{reason},#{primeRate},#{feeTypeCd},#{payTime},#{detailId},#{receivableAmount},#{cycles},#{remark},#{receivedAmount},#{feeId},#{returnFeeId},#{configId},#{state},#{communityId}
+)
+    </insert>
+
+
+
+    <!-- 查询退费表信息 add by wuxw 2018-07-03 -->
+    <select id="getReturnPayFeeInfo" parameterType="Map" resultType="Map">
+        select  t.reason,t.prime_rate,t.prime_rate primeRate,t.fee_type_cd,t.fee_type_cd feeTypeCd,t.pay_time,t.pay_time payTime,t.detail_id,t.detail_id detailId,t.receivable_amount,t.receivable_amount receivableAmount,t.cycles,t.remark,t.status_cd,t.status_cd statusCd,t.received_amount,t.received_amount receivedAmount,t.fee_id,t.fee_id feeId,t.return_fee_id,t.return_fee_id returnFeeId,t.config_id,t.config_id configId,t.state,t.community_id,t.community_id communityId 
+from return_pay_fee t 
+where 1 =1 
+<if test="reason !=null and reason != ''">
+   and t.reason= #{reason}
+</if> 
+<if test="primeRate !=null and primeRate != ''">
+   and t.prime_rate= #{primeRate}
+</if> 
+<if test="feeTypeCd !=null and feeTypeCd != ''">
+   and t.fee_type_cd= #{feeTypeCd}
+</if> 
+<if test="payTime !=null and payTime != ''">
+   and t.pay_time= #{payTime}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="receivableAmount !=null and receivableAmount != ''">
+   and t.receivable_amount= #{receivableAmount}
+</if> 
+<if test="cycles !=null and cycles != ''">
+   and t.cycles= #{cycles}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="receivedAmount !=null and receivedAmount != ''">
+   and t.received_amount= #{receivedAmount}
+</if> 
+<if test="feeId !=null and feeId != ''">
+   and t.fee_id= #{feeId}
+</if> 
+<if test="returnFeeId !=null and returnFeeId != ''">
+   and t.return_fee_id= #{returnFeeId}
+</if> 
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</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="updateReturnPayFeeInfo" parameterType="Map">
+        update  return_pay_fee t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="reason !=null and reason != ''">
+, t.reason= #{reason}
+</if> 
+<if test="primeRate !=null and primeRate != ''">
+, t.prime_rate= #{primeRate}
+</if> 
+<if test="feeTypeCd !=null and feeTypeCd != ''">
+, t.fee_type_cd= #{feeTypeCd}
+</if> 
+<if test="payTime !=null and payTime != ''">
+, t.pay_time= #{payTime}
+</if> 
+<if test="detailId !=null and detailId != ''">
+, t.detail_id= #{detailId}
+</if> 
+<if test="receivableAmount !=null and receivableAmount != ''">
+, t.receivable_amount= #{receivableAmount}
+</if> 
+<if test="cycles !=null and cycles != ''">
+, t.cycles= #{cycles}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="receivedAmount !=null and receivedAmount != ''">
+, t.received_amount= #{receivedAmount}
+</if> 
+<if test="feeId !=null and feeId != ''">
+, t.fee_id= #{feeId}
+</if> 
+<if test="configId !=null and configId != ''">
+, t.config_id= #{configId}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+ where 1=1 <if test="returnFeeId !=null and returnFeeId != ''">
+and t.return_fee_id= #{returnFeeId}
+</if> 
+
+    </update>
+
+    <!-- 查询退费表数量 add by wuxw 2018-07-03 -->
+     <select id="queryReturnPayFeesCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from return_pay_fee t 
+where 1 =1 
+<if test="reason !=null and reason != ''">
+   and t.reason= #{reason}
+</if> 
+<if test="primeRate !=null and primeRate != ''">
+   and t.prime_rate= #{primeRate}
+</if> 
+<if test="feeTypeCd !=null and feeTypeCd != ''">
+   and t.fee_type_cd= #{feeTypeCd}
+</if> 
+<if test="payTime !=null and payTime != ''">
+   and t.pay_time= #{payTime}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="receivableAmount !=null and receivableAmount != ''">
+   and t.receivable_amount= #{receivableAmount}
+</if> 
+<if test="cycles !=null and cycles != ''">
+   and t.cycles= #{cycles}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="receivedAmount !=null and receivedAmount != ''">
+   and t.received_amount= #{receivedAmount}
+</if> 
+<if test="feeId !=null and feeId != ''">
+   and t.fee_id= #{feeId}
+</if> 
+<if test="returnFeeId !=null and returnFeeId != ''">
+   and t.return_fee_id= #{returnFeeId}
+</if> 
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 25 - 20
java110-generator/src/main/java/com/java110/code/TableToJson.java

@@ -18,29 +18,34 @@ import java.nio.charset.Charset;
 public class TableToJson {
 
     //show create table c_orders  用这个语句获取
-    public static final String createTableSql = "CREATE TABLE `online_pay` (\n" +
-            "  `pay_id` varchar(30) NOT NULL COMMENT '支付ID',\n" +
-            "  `order_id` varchar(30) NOT NULL COMMENT '订单ID',\n" +
-            "  `transaction_id` varchar(64) DEFAULT NULL COMMENT '交易ID',\n" +
-            "  `app_id` varchar(64) DEFAULT NULL COMMENT '微信APPID',\n" +
-            "  `mch_id` varchar(64) NOT NULL COMMENT '商户ID',\n" +
-            "  `total_fee` decimal(10,2) NOT NULL COMMENT '付款总金额',\n" +
-            "  `refund_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '退款金额',\n" +
-            "  `pay_name` varchar(256) DEFAULT NULL COMMENT '名称',\n" +
-            "  `open_id` varchar(30) DEFAULT NULL COMMENT '开放ID',\n" +
-            "  `state` varchar(12) NOT NULL DEFAULT 'W' COMMENT '状态 W待支付 C 支付完成 F 通知失败 WT 待退费 CT退费完成',\n" +
-            "  `message` varchar(1024) DEFAULT NULL COMMENT '状态原因',\n" +
-            "  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n" +
-            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效'\n" +
+    public static final String createTableSql = "CREATE TABLE `return_pay_fee` (\n" +
+            "  `return_fee_id` varchar(30) NOT NULL COMMENT '退费id',\n" +
+            "  `community_id` varchar(30) NOT NULL COMMENT '小区id',\n" +
+            "  `b_id` varchar(30) NOT NULL COMMENT '业务id',\n" +
+            "  `config_id` varchar(30) NOT NULL COMMENT '费用项id',\n" +
+            "  `fee_id` varchar(30) NOT NULL COMMENT '费用id',\n" +
+            "  `fee_type_cd` varchar(30) NOT NULL COMMENT '费用类型',\n" +
+            "  `detail_id` varchar(30) NOT NULL COMMENT '缴费id',\n" +
+            "  `cycles` decimal(9,2) DEFAULT NULL COMMENT '周期',\n" +
+            "  `receivable_amount` decimal(10,2) DEFAULT NULL COMMENT '应收金额',\n" +
+            "  `received_amount` decimal(10,2) DEFAULT NULL COMMENT '实收金额',\n" +
+            "  `prime_rate` decimal(3,2) DEFAULT NULL COMMENT '打折率',\n" +
+            "  `remark` varchar(200) DEFAULT NULL COMMENT '备注',\n" +
+            "  `state` varchar(4) NOT NULL COMMENT '审核状态:1000待审核1001审核通过10002审核不通过',\n" +
+            "  `status_cd` varchar(2) NOT NULL COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效',\n" +
+            "  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请退费时间',\n" +
+            "  `pay_time` datetime NOT NULL COMMENT '缴费时间',\n" +
+            "  `reason` varchar(200) NOT NULL COMMENT '退费原因',\n" +
+            "  PRIMARY KEY (`return_fee_id`)\n" +
             ")";
 
     public static void main(String[] args) {
-        String desc = "线上支付";
-        String id = "payId";
-        String name = "onlinePay";
-        String shareName = "acct"; //生成到那个服务下
-        String shareColumn = "order_id";
-        String shareParam = "orderId";
+        String desc = "退费表";
+        String id = "returnFeeId";
+        String name = "returnPayFee";
+        String shareName = "fee"; //生成到那个服务下
+        String shareColumn = "community_id";
+        String shareParam = "communityId";
         //业务名称 desc 业务编码名称生成后类名 name 主键 id  需要放到那个服务 shareName
         String newSql = createTableSql.substring(createTableSql.indexOf("(") + 1, createTableSql.lastIndexOf(")"));
         String tableName = createTableSql.substring(createTableSql.indexOf("TABLE") + 5, createTableSql.indexOf("("));

+ 28 - 25
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,42 +1,45 @@
 {
   "param": {
-    "refundFee": "refund_fee",
-    "mchId": "mch_id",
-    "orderId": "order_id",
-    "totalFee": "total_fee",
-    "openId": "open_id",
-    "appId": "app_id",
+    "reason": "reason",
+    "primeRate": "prime_rate",
+    "feeTypeCd": "fee_type_cd",
+    "payTime": "pay_time",
+    "detailId": "detail_id",
+    "receivableAmount": "receivable_amount",
+    "cycles": "cycles",
+    "remark": "remark",
     "statusCd": "status_cd",
-    "payId": "pay_id",
+    "receivedAmount": "received_amount",
+    "feeId": "fee_id",
+    "returnFeeId": "return_fee_id",
+    "configId": "config_id",
     "state": "state",
-    "message": "message",
-    "payName": "pay_name",
-    "transactionId": "transaction_id"
+    "communityId": "community_id"
   },
-  "name": "onlinePay",
-  "shareColumn": "order_id",
-  "id": "payId",
-  "shareName": "acct",
+  "name": "returnPayFee",
+  "shareColumn": "community_id",
+  "id": "returnFeeId",
+  "shareName": "fee",
   "autoMove": true,
   "required": [
     {
-      "msg": "订单ID不能为空",
-      "code": "orderId"
+      "msg": "小区id不能为空",
+      "code": "communityId"
     },
     {
-      "msg": "商户ID不能为空",
-      "code": "mchId"
+      "msg": "费用项id不能为空",
+      "code": "configId"
     },
     {
-      "msg": "付款总金额不能为空",
-      "code": "totalFee"
+      "msg": "费用id不能为空",
+      "code": "feeId"
     },
     {
-      "msg": "退款金额不能为空",
-      "code": "refundFee"
+      "msg": "费用类型不能为空",
+      "code": "feeTypeCd"
     }
   ],
-  "desc": "线上支付",
-  "shareParam": "orderId",
-  "tableName": "online_pay"
+  "desc": "退费表",
+  "shareParam": "communityId",
+  "tableName": "return_pay_fee"
 }

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/fee/IReturnPayFeeV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.fee;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.returnPayFee.ReturnPayFeeDto;
+import com.java110.po.returnPayFee.ReturnPayFeePo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "fee-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/returnPayFeeV1Api")
+public interface IReturnPayFeeV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveReturnPayFee", method = RequestMethod.POST)
+    public int saveReturnPayFee(@RequestBody  ReturnPayFeePo returnPayFeePo);
+
+    @RequestMapping(value = "/updateReturnPayFee", method = RequestMethod.POST)
+    public int updateReturnPayFee(@RequestBody  ReturnPayFeePo returnPayFeePo);
+
+    @RequestMapping(value = "/deleteReturnPayFee", method = RequestMethod.POST)
+    public int deleteReturnPayFee(@RequestBody  ReturnPayFeePo returnPayFeePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param returnPayFeeDto 数据对象分享
+     * @return ReturnPayFeeDto 对象数据
+     */
+    @RequestMapping(value = "/queryReturnPayFees", method = RequestMethod.POST)
+    List<ReturnPayFeeDto> queryReturnPayFees(@RequestBody ReturnPayFeeDto returnPayFeeDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param returnPayFeeDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryReturnPayFeesCount", method = RequestMethod.POST)
+    int queryReturnPayFeesCount(@RequestBody ReturnPayFeeDto returnPayFeeDto);
+}

+ 0 - 91
service-api/src/main/java/com/java110/api/listener/returnPayFee/SaveReturnPayFeeListener.java

@@ -1,91 +0,0 @@
-package com.java110.api.listener.returnPayFee;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.returnPayFee.IReturnPayFeeBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.dto.fee.FeeDetailDto;
-import com.java110.dto.fee.FeeDto;
-import com.java110.intf.fee.IFeeDetailInnerServiceSMO;
-import com.java110.intf.fee.IFeeInnerServiceSMO;
-import com.java110.utils.constant.ServiceCodeReturnPayFeeConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-import java.util.List;
-
-/**
- * 保存小区侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("saveReturnPayFeeListener")
-public class SaveReturnPayFeeListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IReturnPayFeeBMO returnPayFeeBMOImpl;
-
-    @Autowired
-    private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl;
-
-    @Autowired
-    private IFeeInnerServiceSMO feeInnerServiceSMOImpl;
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "configId", "请求报文中未包含configId");
-        Assert.hasKeyAndValue(reqJson, "feeId", "请求报文中未包含feeId");
-        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
-        Assert.hasKeyAndValue(reqJson, "detailId", "请求报文中未包含detailId");
-        Assert.hasKeyAndValue(reqJson, "reason", "请求报文中未包含reason");
-
-        FeeDetailDto feeDetailDto =new FeeDetailDto();
-        feeDetailDto.setCommunityId(reqJson.getString("communityId"));
-        feeDetailDto.setDetailId(reqJson.getString("detailId"));
-        feeDetailDto.setFeeId(reqJson.getString("feeId"));
-        List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto);
-
-        Assert.listOnlyOne(feeDetailDtos,"不存在该缴费记录");
-
-
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        FeeDto feeDto = new FeeDto();
-        feeDto.setCommunityId(reqJson.getString("communityId"));
-        feeDto.setFeeId(reqJson.getString("feeId"));
-
-        List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);
-
-        Assert.listOnlyOne(feeDtos,"不存在该费用");
-
-
-        reqJson.put("configId",feeDtos.get(0).getConfigId());
-        reqJson.put("feeTypeCd",feeDtos.get(0).getFeeTypeCd());
-
-        returnPayFeeBMOImpl.addReturnPayFee(reqJson, context);
-        reqJson.put("state","1000");
-        returnPayFeeBMOImpl.updateFeeDetail(reqJson, context);
-
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeReturnPayFeeConstant.ADD_RETURNPAYFEE;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-}

+ 13 - 13
service-fee/src/main/java/com/java110/fee/cmd/repairUserNew/SaveRepairUserNewCmd.java

@@ -22,15 +22,15 @@ import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.AbstractServiceCmdListener;
 import com.java110.core.event.cmd.CmdEvent;
 import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.core.log.LoggerFactory;
 import com.java110.intf.fee.IRepairUserNewV1InnerServiceSMO;
 import com.java110.po.owner.RepairUserPo;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * 类表述:保存
@@ -55,16 +55,16 @@ public class SaveRepairUserNewCmd extends AbstractServiceCmdListener {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         Assert.hasKeyAndValue(reqJson, "ruId", "请求报文中未包含ruId");
-Assert.hasKeyAndValue(reqJson, "repairId", "请求报文中未包含repairId");
-Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
-Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
-Assert.hasKeyAndValue(reqJson, "staffId", "请求报文中未包含staffId");
-Assert.hasKeyAndValue(reqJson, "staffName", "请求报文中未包含staffName");
-Assert.hasKeyAndValue(reqJson, "preStaffId", "请求报文中未包含preStaffId");
-Assert.hasKeyAndValue(reqJson, "preStaffName", "请求报文中未包含preStaffName");
-Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
-Assert.hasKeyAndValue(reqJson, "repairEvent", "请求报文中未包含repairEvent");
-Assert.hasKeyAndValue(reqJson, "preRuId", "请求报文中未包含preRuId");
+        Assert.hasKeyAndValue(reqJson, "repairId", "请求报文中未包含repairId");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
+        Assert.hasKeyAndValue(reqJson, "staffId", "请求报文中未包含staffId");
+        Assert.hasKeyAndValue(reqJson, "staffName", "请求报文中未包含staffName");
+        Assert.hasKeyAndValue(reqJson, "preStaffId", "请求报文中未包含preStaffId");
+        Assert.hasKeyAndValue(reqJson, "preStaffName", "请求报文中未包含preStaffName");
+        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
+        Assert.hasKeyAndValue(reqJson, "repairEvent", "请求报文中未包含repairEvent");
+        Assert.hasKeyAndValue(reqJson, "preRuId", "请求报文中未包含preRuId");
 
     }
 
@@ -72,7 +72,7 @@ Assert.hasKeyAndValue(reqJson, "preRuId", "请求报文中未包含preRuId");
     @Java110Transactional
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
 
-       RepairUserPo repairUserNewPo = BeanConvertUtil.covertBean(reqJson, RepairUserPo.class);
+        RepairUserPo repairUserNewPo = BeanConvertUtil.covertBean(reqJson, RepairUserPo.class);
         repairUserNewPo.setRuId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         int flag = repairUserNewV1InnerServiceSMOImpl.saveRepairUserNew(repairUserNewPo);
 

+ 71 - 0
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/DeleteReturnPayFeeCmd.java

@@ -0,0 +1,71 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.fee.cmd.returnPayFee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.fee.IReturnPayFeeV1InnerServiceSMO;
+import com.java110.po.returnPayFee.ReturnPayFeePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+/**
+ * 类表述:删除
+ * 服务编码:returnPayFee.deleteReturnPayFee
+ * 请求路劲:/app/returnPayFee.DeleteReturnPayFee
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "returnPayFee.deleteReturnPayFee")
+public class DeleteReturnPayFeeCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteReturnPayFeeCmd.class);
+
+    @Autowired
+    private IReturnPayFeeV1InnerServiceSMO returnPayFeeV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "returnFeeId", "returnFeeId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       ReturnPayFeePo returnPayFeePo = BeanConvertUtil.covertBean(reqJson, ReturnPayFeePo.class);
+        int flag = returnPayFeeV1InnerServiceSMOImpl.deleteReturnPayFee(returnPayFeePo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/ListReturnPayFeeCmd.java

@@ -0,0 +1,84 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.fee.cmd.returnPayFee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.fee.IReturnPayFeeV1InnerServiceSMO;
+import com.java110.po.returnPayFee.ReturnPayFeePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.java110.dto.returnPayFee.ReturnPayFeeDto;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:returnPayFee.listReturnPayFee
+ * 请求路劲:/app/returnPayFee.ListReturnPayFee
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "returnPayFee.listReturnPayFee")
+public class ListReturnPayFeeCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListReturnPayFeeCmd.class);
+    @Autowired
+    private IReturnPayFeeV1InnerServiceSMO returnPayFeeV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           ReturnPayFeeDto returnPayFeeDto = BeanConvertUtil.covertBean(reqJson, ReturnPayFeeDto.class);
+
+           int count = returnPayFeeV1InnerServiceSMOImpl.queryReturnPayFeesCount(returnPayFeeDto);
+
+           List<ReturnPayFeeDto> returnPayFeeDtos = null;
+
+           if (count > 0) {
+               returnPayFeeDtos = returnPayFeeV1InnerServiceSMOImpl.queryReturnPayFees(returnPayFeeDto);
+           } else {
+               returnPayFeeDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, returnPayFeeDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 131 - 0
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/SaveReturnPayFeeCmd.java

@@ -0,0 +1,131 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.fee.cmd.returnPayFee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.fee.FeeDetailDto;
+import com.java110.dto.fee.FeeDto;
+import com.java110.intf.fee.IFeeDetailInnerServiceSMO;
+import com.java110.intf.fee.IFeeInnerServiceSMO;
+import com.java110.intf.fee.IPayFeeDetailNewV1InnerServiceSMO;
+import com.java110.intf.fee.IReturnPayFeeV1InnerServiceSMO;
+import com.java110.po.fee.PayFeeDetailPo;
+import com.java110.po.returnPayFee.ReturnPayFeePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+/**
+ * 类表述:保存
+ * 服务编码:returnPayFee.saveReturnPayFee
+ * 请求路劲:/app/returnPayFee.SaveReturnPayFee
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "returnPayFee.saveReturnPayFee")
+public class SaveReturnPayFeeCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveReturnPayFeeCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IReturnPayFeeV1InnerServiceSMO returnPayFeeV1InnerServiceSMOImpl;
+
+    @Autowired
+    private IFeeInnerServiceSMO feeInnerServiceSMOImpl;
+
+    @Autowired
+    private IPayFeeDetailNewV1InnerServiceSMO payFeeDetailNewV1InnerServiceSMOImpl;
+
+
+    @Autowired
+    private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        //Assert.hasKeyAndValue(reqJson, "configId", "请求报文中未包含configId");
+        Assert.hasKeyAndValue(reqJson, "feeId", "请求报文中未包含feeId");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "detailId", "请求报文中未包含detailId");
+        Assert.hasKeyAndValue(reqJson, "reason", "请求报文中未包含reason");
+
+        FeeDetailDto feeDetailDto = new FeeDetailDto();
+        feeDetailDto.setCommunityId(reqJson.getString("communityId"));
+        feeDetailDto.setDetailId(reqJson.getString("detailId"));
+        feeDetailDto.setFeeId(reqJson.getString("feeId"));
+        List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto);
+
+        Assert.listOnlyOne(feeDetailDtos, "不存在该缴费记录");
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        FeeDto feeDto = new FeeDto();
+        feeDto.setCommunityId(reqJson.getString("communityId"));
+        feeDto.setFeeId(reqJson.getString("feeId"));
+
+        List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);
+
+        Assert.listOnlyOne(feeDtos, "不存在该费用");
+
+        reqJson.put("configId", feeDtos.get(0).getConfigId());
+        reqJson.put("feeTypeCd", feeDtos.get(0).getFeeTypeCd());
+
+        ReturnPayFeePo returnPayFeePo = BeanConvertUtil.covertBean(reqJson, ReturnPayFeePo.class);
+        returnPayFeePo.setReturnFeeId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = returnPayFeeV1InnerServiceSMOImpl.saveReturnPayFee(returnPayFeePo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+        reqJson.put("state", "1000");
+
+        FeeDetailDto feeDetailDto = new FeeDetailDto();
+        feeDetailDto.setDetailId(reqJson.getString("detailId"));
+        List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto);
+        Assert.listOnlyOne(feeDetailDtos, "未找到需要修改的活动 或多条数据");
+
+        JSONObject businessReturnPayFee = new JSONObject();
+        businessReturnPayFee.putAll(BeanConvertUtil.beanCovertMap(feeDetailDtos.get(0)));
+        businessReturnPayFee.putAll(reqJson);
+        PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(businessReturnPayFee, PayFeeDetailPo.class);
+
+        flag = payFeeDetailNewV1InnerServiceSMOImpl.updatePayFeeDetailNew(payFeeDetailPo);
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/UpdateReturnPayFeeCmd.java

@@ -0,0 +1,75 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.fee.cmd.returnPayFee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.fee.IReturnPayFeeV1InnerServiceSMO;
+import com.java110.po.returnPayFee.ReturnPayFeePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:returnPayFee.updateReturnPayFee
+ * 请求路劲:/app/returnPayFee.UpdateReturnPayFee
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "returnPayFee.updateReturnPayFee")
+public class UpdateReturnPayFeeCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateReturnPayFeeCmd.class);
+
+
+    @Autowired
+    private IReturnPayFeeV1InnerServiceSMO returnPayFeeV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "returnFeeId", "returnFeeId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       ReturnPayFeePo returnPayFeePo = BeanConvertUtil.covertBean(reqJson, ReturnPayFeePo.class);
+        int flag = returnPayFeeV1InnerServiceSMOImpl.updateReturnPayFee(returnPayFeePo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-fee/src/main/java/com/java110/fee/dao/IReturnPayFeeV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.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;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public interface IReturnPayFeeV1ServiceDao {
+
+
+    /**
+     * 保存 退费表信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveReturnPayFeeInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询退费表信息(instance过程)
+     * 根据bId 查询退费表信息
+     * @param info bId 信息
+     * @return 退费表信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getReturnPayFeeInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改退费表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateReturnPayFeeInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询退费表总数
+     *
+     * @param info 退费表信息
+     * @return 退费表数量
+     */
+    int queryReturnPayFeesCount(Map info);
+
+}

+ 112 - 0
service-fee/src/main/java/com/java110/fee/dao/impl/ReturnPayFeeV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.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.IReturnPayFeeV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Service("returnPayFeeV1ServiceDaoImpl")
+public class ReturnPayFeeV1ServiceDaoImpl extends BaseServiceDao implements IReturnPayFeeV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ReturnPayFeeV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存退费表信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveReturnPayFeeInfo(Map info) throws DAOException {
+        logger.debug("保存 saveReturnPayFeeInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("returnPayFeeV1ServiceDaoImpl.saveReturnPayFeeInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询退费表信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getReturnPayFeeInfo(Map info) throws DAOException {
+        logger.debug("查询 getReturnPayFeeInfo 入参 info : {}",info);
+
+        List<Map> businessReturnPayFeeInfos = sqlSessionTemplate.selectList("returnPayFeeV1ServiceDaoImpl.getReturnPayFeeInfo",info);
+
+        return businessReturnPayFeeInfos;
+    }
+
+
+    /**
+     * 修改退费表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateReturnPayFeeInfo(Map info) throws DAOException {
+        logger.debug("修改 updateReturnPayFeeInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("returnPayFeeV1ServiceDaoImpl.updateReturnPayFeeInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询退费表数量
+     * @param info 退费表信息
+     * @return 退费表数量
+     */
+    @Override
+    public int queryReturnPayFeesCount(Map info) {
+        logger.debug("查询 queryReturnPayFeesCount 入参 info : {}",info);
+
+        List<Map> businessReturnPayFeeInfos = sqlSessionTemplate.selectList("returnPayFeeV1ServiceDaoImpl.queryReturnPayFeesCount", info);
+        if (businessReturnPayFeeInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessReturnPayFeeInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-fee/src/main/java/com/java110/fee/smo/impl/ReturnPayFeeV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.fee.smo.impl;
+
+
+import com.java110.fee.dao.IReturnPayFeeV1ServiceDao;
+import com.java110.intf.fee.IReturnPayFeeV1InnerServiceSMO;
+import com.java110.dto.returnPayFee.ReturnPayFeeDto;
+import com.java110.po.returnPayFee.ReturnPayFeePo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2022-02-21 12:20:03 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@RestController
+public class ReturnPayFeeV1InnerServiceSMOImpl extends BaseServiceSMO implements IReturnPayFeeV1InnerServiceSMO {
+
+    @Autowired
+    private IReturnPayFeeV1ServiceDao returnPayFeeV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveReturnPayFee(@RequestBody  ReturnPayFeePo returnPayFeePo) {
+        int saveFlag = returnPayFeeV1ServiceDaoImpl.saveReturnPayFeeInfo(BeanConvertUtil.beanCovertMap(returnPayFeePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateReturnPayFee(@RequestBody  ReturnPayFeePo returnPayFeePo) {
+        int saveFlag = returnPayFeeV1ServiceDaoImpl.updateReturnPayFeeInfo(BeanConvertUtil.beanCovertMap(returnPayFeePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteReturnPayFee(@RequestBody  ReturnPayFeePo returnPayFeePo) {
+       returnPayFeePo.setStatusCd("1");
+       int saveFlag = returnPayFeeV1ServiceDaoImpl.updateReturnPayFeeInfo(BeanConvertUtil.beanCovertMap(returnPayFeePo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ReturnPayFeeDto> queryReturnPayFees(@RequestBody  ReturnPayFeeDto returnPayFeeDto) {
+
+        //校验是否传了 分页信息
+
+        int page = returnPayFeeDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            returnPayFeeDto.setPage((page - 1) * returnPayFeeDto.getRow());
+        }
+
+        List<ReturnPayFeeDto> returnPayFees = BeanConvertUtil.covertBeanList(returnPayFeeV1ServiceDaoImpl.getReturnPayFeeInfo(BeanConvertUtil.beanCovertMap(returnPayFeeDto)), ReturnPayFeeDto.class);
+
+        return returnPayFees;
+    }
+
+
+    @Override
+    public int queryReturnPayFeesCount(@RequestBody ReturnPayFeeDto returnPayFeeDto) {
+        return returnPayFeeV1ServiceDaoImpl.queryReturnPayFeesCount(BeanConvertUtil.beanCovertMap(returnPayFeeDto));    }
+
+}