java110 před 4 roky
rodič
revize
ab4cf523f7
21 změnil soubory, kde provedl 1093 přidání a 426 odebrání
  1. 118 0
      java110-bean/src/main/java/com/java110/dto/onlinePay/OnlinePayDto.java
  2. 117 0
      java110-bean/src/main/java/com/java110/po/onlinePay/OnlinePayPo.java
  3. 158 0
      java110-db/src/main/resources/mapper/acct/OnlinePayV1ServiceDaoImplMapper.xml
  4. 19 22
      java110-generator/src/main/java/com/java110/code/TableToJson.java
  5. 1 1
      java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java
  6. 1 1
      java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java
  7. 25 55
      java110-generator/src/main/resources/newBack/template_1.json
  8. 68 0
      java110-interface/src/main/java/com/java110/intf/acct/IOnlinePayV1InnerServiceSMO.java
  9. 71 0
      service-acct/src/main/java/com/java110/acct/cmd/onlinePay/DeleteOnlinePayCmd.java
  10. 84 0
      service-acct/src/main/java/com/java110/acct/cmd/onlinePay/ListOnlinePayCmd.java
  11. 78 0
      service-acct/src/main/java/com/java110/acct/cmd/onlinePay/SaveOnlinePayCmd.java
  12. 75 0
      service-acct/src/main/java/com/java110/acct/cmd/onlinePay/UpdateOnlinePayCmd.java
  13. 77 0
      service-acct/src/main/java/com/java110/acct/dao/IOnlinePayV1ServiceDao.java
  14. 112 0
      service-acct/src/main/java/com/java110/acct/dao/impl/OnlinePayV1ServiceDaoImpl.java
  15. 89 0
      service-acct/src/main/java/com/java110/acct/smo/impl/OnlinePayV1InnerServiceSMOImpl.java
  16. 0 119
      service-busi-merge/pom.xml
  17. 0 81
      service-busi-merge/src/main/java/com/java110/BusiServiceApplicationStart.java
  18. 0 109
      service-busi-merge/src/main/resources/application-dev.yml
  19. 0 3
      service-busi-merge/src/main/resources/application.yml
  20. 0 32
      service-busi-merge/src/main/resources/dataSource.yml
  21. 0 3
      service-busi-merge/src/main/resources/java110.properties

+ 118 - 0
java110-bean/src/main/java/com/java110/dto/onlinePay/OnlinePayDto.java

@@ -0,0 +1,118 @@
+package com.java110.dto.onlinePay;
+
+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 OnlinePayDto extends PageDto implements Serializable {
+
+    private String refundFee;
+private String mchId;
+private String orderId;
+private String totalFee;
+private String openId;
+private String appId;
+private String payId;
+private String state;
+private String message;
+private String payName;
+private String transactionId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getRefundFee() {
+        return refundFee;
+    }
+public void setRefundFee(String refundFee) {
+        this.refundFee = refundFee;
+    }
+public String getMchId() {
+        return mchId;
+    }
+public void setMchId(String mchId) {
+        this.mchId = mchId;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getTotalFee() {
+        return totalFee;
+    }
+public void setTotalFee(String totalFee) {
+        this.totalFee = totalFee;
+    }
+public String getOpenId() {
+        return openId;
+    }
+public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+public String getAppId() {
+        return appId;
+    }
+public void setAppId(String appId) {
+        this.appId = appId;
+    }
+public String getPayId() {
+        return payId;
+    }
+public void setPayId(String payId) {
+        this.payId = payId;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getMessage() {
+        return message;
+    }
+public void setMessage(String message) {
+        this.message = message;
+    }
+public String getPayName() {
+        return payName;
+    }
+public void setPayName(String payName) {
+        this.payName = payName;
+    }
+public String getTransactionId() {
+        return transactionId;
+    }
+public void setTransactionId(String transactionId) {
+        this.transactionId = transactionId;
+    }
+
+
+    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;
+    }
+}

+ 117 - 0
java110-bean/src/main/java/com/java110/po/onlinePay/OnlinePayPo.java

@@ -0,0 +1,117 @@
+/*
+ * 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.onlinePay;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2021-12-21 13:05:25 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 OnlinePayPo implements Serializable {
+
+    private String refundFee;
+private String mchId;
+private String orderId;
+private String totalFee;
+private String openId;
+private String appId;
+private String statusCd = "0";
+private String payId;
+private String state;
+private String message;
+private String payName;
+private String transactionId;
+public String getRefundFee() {
+        return refundFee;
+    }
+public void setRefundFee(String refundFee) {
+        this.refundFee = refundFee;
+    }
+public String getMchId() {
+        return mchId;
+    }
+public void setMchId(String mchId) {
+        this.mchId = mchId;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getTotalFee() {
+        return totalFee;
+    }
+public void setTotalFee(String totalFee) {
+        this.totalFee = totalFee;
+    }
+public String getOpenId() {
+        return openId;
+    }
+public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+public String getAppId() {
+        return appId;
+    }
+public void setAppId(String appId) {
+        this.appId = appId;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getPayId() {
+        return payId;
+    }
+public void setPayId(String payId) {
+        this.payId = payId;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getMessage() {
+        return message;
+    }
+public void setMessage(String message) {
+        this.message = message;
+    }
+public String getPayName() {
+        return payName;
+    }
+public void setPayName(String payName) {
+        this.payName = payName;
+    }
+public String getTransactionId() {
+        return transactionId;
+    }
+public void setTransactionId(String transactionId) {
+        this.transactionId = transactionId;
+    }
+
+
+
+}

+ 158 - 0
java110-db/src/main/resources/mapper/acct/OnlinePayV1ServiceDaoImplMapper.xml

@@ -0,0 +1,158 @@
+<?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="onlinePayV1ServiceDaoImpl">
+
+
+    <!-- 保存线上支付信息 add by wuxw 2018-07-03 -->
+    <insert id="saveOnlinePayInfo" parameterType="Map">
+        insert into online_pay(
+        refund_fee,mch_id,order_id,total_fee,open_id,app_id,pay_id,state,message,pay_name,transaction_id
+        ) values (
+        #{refundFee},#{mchId},#{orderId},#{totalFee},#{openId},#{appId},#{payId},#{state},#{message},#{payName},#{transactionId}
+        )
+    </insert>
+
+
+    <!-- 查询线上支付信息 add by wuxw 2018-07-03 -->
+    <select id="getOnlinePayInfo" parameterType="Map" resultType="Map">
+        select t.refund_fee,t.refund_fee refundFee,t.mch_id,t.mch_id mchId,t.order_id,t.order_id
+        orderId,t.total_fee,t.total_fee totalFee,t.open_id,t.open_id openId,t.app_id,t.app_id
+        appId,t.status_cd,t.status_cd statusCd,t.pay_id,t.pay_id payId,t.state,t.message,t.pay_name,t.pay_name
+        payName,t.transaction_id,t.transaction_id transactionId
+        from online_pay t
+        where 1 =1
+        <if test="refundFee !=null and refundFee != ''">
+            and t.refund_fee= #{refundFee}
+        </if>
+        <if test="mchId !=null and mchId != ''">
+            and t.mch_id= #{mchId}
+        </if>
+        <if test="orderId !=null and orderId != ''">
+            and t.order_id= #{orderId}
+        </if>
+        <if test="totalFee !=null and totalFee != ''">
+            and t.total_fee= #{totalFee}
+        </if>
+        <if test="openId !=null and openId != ''">
+            and t.open_id= #{openId}
+        </if>
+        <if test="appId !=null and appId != ''">
+            and t.app_id= #{appId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="payId !=null and payId != ''">
+            and t.pay_id= #{payId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="message !=null and message != ''">
+            and t.message= #{message}
+        </if>
+        <if test="payName !=null and payName != ''">
+            and t.pay_name= #{payName}
+        </if>
+        <if test="transactionId !=null and transactionId != ''">
+            and t.transaction_id= #{transactionId}
+        </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="updateOnlinePayInfo" parameterType="Map">
+        update online_pay t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="refundFee !=null and refundFee != ''">
+            , t.refund_fee= #{refundFee}
+        </if>
+        <if test="mchId !=null and mchId != ''">
+            , t.mch_id= #{mchId}
+        </if>
+        <if test="orderId !=null and orderId != ''">
+            , t.order_id= #{orderId}
+        </if>
+        <if test="totalFee !=null and totalFee != ''">
+            , t.total_fee= #{totalFee}
+        </if>
+        <if test="openId !=null and openId != ''">
+            , t.open_id= #{openId}
+        </if>
+        <if test="appId !=null and appId != ''">
+            , t.app_id= #{appId}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="message !=null and message != ''">
+            , t.message= #{message}
+        </if>
+        <if test="payName !=null and payName != ''">
+            , t.pay_name= #{payName}
+        </if>
+        <if test="transactionId !=null and transactionId != ''">
+            , t.transaction_id= #{transactionId}
+        </if>
+        where 1=1
+        <if test="payId !=null and payId != ''">
+            and t.pay_id= #{payId}
+        </if>
+
+    </update>
+
+    <!-- 查询线上支付数量 add by wuxw 2018-07-03 -->
+    <select id="queryOnlinePaysCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from online_pay t
+        where 1 =1
+        <if test="refundFee !=null and refundFee != ''">
+            and t.refund_fee= #{refundFee}
+        </if>
+        <if test="mchId !=null and mchId != ''">
+            and t.mch_id= #{mchId}
+        </if>
+        <if test="orderId !=null and orderId != ''">
+            and t.order_id= #{orderId}
+        </if>
+        <if test="totalFee !=null and totalFee != ''">
+            and t.total_fee= #{totalFee}
+        </if>
+        <if test="openId !=null and openId != ''">
+            and t.open_id= #{openId}
+        </if>
+        <if test="appId !=null and appId != ''">
+            and t.app_id= #{appId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="payId !=null and payId != ''">
+            and t.pay_id= #{payId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="message !=null and message != ''">
+            and t.message= #{message}
+        </if>
+        <if test="payName !=null and payName != ''">
+            and t.pay_name= #{payName}
+        </if>
+        <if test="transactionId !=null and transactionId != ''">
+            and t.transaction_id= #{transactionId}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 19 - 22
java110-generator/src/main/java/com/java110/code/TableToJson.java

@@ -18,32 +18,29 @@ import java.nio.charset.Charset;
 public class TableToJson {
 
     //show create table c_orders  用这个语句获取
-    public static final String createTableSql = "CREATE TABLE `r_repair_user` (\n" +
-            "  `ru_id` varchar(30) NOT NULL COMMENT '报修派单ID',\n" +
-            "  `repair_id` varchar(30) NOT NULL COMMENT '报修ID',\n" +
-            "  `b_id` varchar(30) NOT NULL COMMENT '业务Id',\n" +
-            "  `community_id` varchar(30) NOT NULL COMMENT '小区ID',\n" +
+    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" +
-            "  `state` varchar(8) NOT NULL COMMENT '员工处理状态,请查看t_dict 表',\n" +
-            "  `context` longtext COMMENT '报修内容',\n" +
-            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效',\n" +
-            "  `staff_id` varchar(30) NOT NULL COMMENT '当前处理员工',\n" +
-            "  `staff_name` varchar(64) NOT NULL COMMENT '当前处理员工名称',\n" +
-            "  `pre_staff_id` varchar(30) NOT NULL COMMENT '上一节点处理员工',\n" +
-            "  `pre_staff_name` varchar(64) NOT NULL COMMENT '上一节点处理员工名称',\n" +
-            "  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始时间',\n" +
-            "  `end_time` timestamp NULL DEFAULT NULL COMMENT '结束时间',\n" +
-            "  `repair_event` varchar(12) NOT NULL COMMENT '事件,startUser 开始用户 auditUser 审核处理员工',\n" +
-            "  `pre_ru_id` varchar(30) NOT NULL COMMENT '上一节点处理ID'\n" +
+            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效'\n" +
             ")";
 
     public static void main(String[] args) {
-        String desc = "费用明细";
-        String id = "ruId";
-        String name = "repairUserNew";
-        String shareName = "fee"; //生成到那个服务下
-        String shareColumn = "community_id";
-        String shareParam = "communityId";
+        String desc = "线上支付";
+        String id = "payId";
+        String name = "onlinePay";
+        String shareName = "acct"; //生成到那个服务下
+        String shareColumn = "order_id";
+        String shareParam = "orderId";
         //业务名称 desc 业务编码名称生成后类名 name 主键 id  需要放到那个服务 shareName
         String newSql = createTableSql.substring(createTableSql.indexOf("(") + 1, createTableSql.lastIndexOf(")"));
         String tableName = createTableSql.substring(createTableSql.indexOf("TABLE") + 5, createTableSql.indexOf("("));

+ 1 - 1
java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java

@@ -70,7 +70,7 @@ public class BackCoderGeneratorStart extends BaseGenerator {
         generatorInnerServiceSMOImpl.generator(data);
 
         GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean();
-        //generatorDtoBean.generator(data);
+        generatorDtoBean.generator(data);
 
         GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO();
         generatorIInnerServiceSMO.generator(data);

+ 1 - 1
java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java

@@ -14,7 +14,7 @@ public class GeneratorApiListener extends BaseGenerator {
      * @param data
      */
     public void generator(Data data) throws Exception {
-        //genneratorPo(data);             //API DataVo对象
+        genneratorPo(data);             //API DataVo对象
         genneratorSaveCmd(data);            //Api BmoImpl
         genneratorUpdateBmoImpl(data);            //Api BmoImpl
         genneratorDeleteBmoImpl(data);            //Api BmoImpl

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

@@ -1,72 +1,42 @@
 {
   "param": {
-    "repairEvent": "repair_event",
-    "preStaffName": "pre_staff_name",
-    "repairId": "repair_id",
+    "refundFee": "refund_fee",
+    "mchId": "mch_id",
+    "orderId": "order_id",
+    "totalFee": "total_fee",
+    "openId": "open_id",
+    "appId": "app_id",
     "statusCd": "status_cd",
-    "ruId": "ru_id",
-    "preStaffId": "pre_staff_id",
-    "context": "context",
-    "staffName": "staff_name",
-    "preRuId": "pre_ru_id",
-    "startTime": "start_time",
+    "payId": "pay_id",
     "state": "state",
-    "endTime": "end_time",
-    "communityId": "community_id",
-    "staffId": "staff_id"
+    "message": "message",
+    "payName": "pay_name",
+    "transactionId": "transaction_id"
   },
-  "name": "repairUserNew",
-  "shareColumn": "community_id",
-  "id": "ruId",
-  "shareName": "fee",
+  "name": "onlinePay",
+  "shareColumn": "order_id",
+  "id": "payId",
+  "shareName": "acct",
   "autoMove": true,
   "required": [
     {
-      "msg": "报修派单ID不能为空",
-      "code": "ruId"
+      "msg": "单ID不能为空",
+      "code": "orderId"
     },
     {
-      "msg": "报修ID不能为空",
-      "code": "repairId"
+      "msg": "商户ID不能为空",
+      "code": "mchId"
     },
     {
-      "msg": "小区ID不能为空",
-      "code": "communityId"
+      "msg": "付款总金额不能为空",
+      "code": "totalFee"
     },
     {
-      "msg": "员工处理状态不能为空",
-      "code": "state"
-    },
-    {
-      "msg": "当前处理员工不能为空",
-      "code": "staffId"
-    },
-    {
-      "msg": "当前处理员工名称不能为空",
-      "code": "staffName"
-    },
-    {
-      "msg": "上一节点处理员工不能为空",
-      "code": "preStaffId"
-    },
-    {
-      "msg": "上一节点处理员工名称不能为空",
-      "code": "preStaffName"
-    },
-    {
-      "msg": "开始时间不能为空",
-      "code": "startTime"
-    },
-    {
-      "msg": "事件不能为空",
-      "code": "repairEvent"
-    },
-    {
-      "msg": "上一节点处理ID'不能为空",
-      "code": "preRuId"
+      "msg": "退款金额不能为空",
+      "code": "refundFee"
     }
   ],
-  "desc": "费用明细",
-  "shareParam": "communityId",
-  "tableName": "r_repair_user"
+  "desc": "线上支付",
+  "shareParam": "orderId",
+  "tableName": "online_pay"
 }

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/acct/IOnlinePayV1InnerServiceSMO.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.acct;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.onlinePay.OnlinePayDto;
+import com.java110.po.onlinePay.OnlinePayPo;
+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 2021-12-21 13:05:25 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 = "acct-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/onlinePayV1Api")
+public interface IOnlinePayV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveOnlinePay", method = RequestMethod.POST)
+    public int saveOnlinePay(@RequestBody  OnlinePayPo onlinePayPo);
+
+    @RequestMapping(value = "/updateOnlinePay", method = RequestMethod.POST)
+    public int updateOnlinePay(@RequestBody  OnlinePayPo onlinePayPo);
+
+    @RequestMapping(value = "/deleteOnlinePay", method = RequestMethod.POST)
+    public int deleteOnlinePay(@RequestBody  OnlinePayPo onlinePayPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param onlinePayDto 数据对象分享
+     * @return OnlinePayDto 对象数据
+     */
+    @RequestMapping(value = "/queryOnlinePays", method = RequestMethod.POST)
+    List<OnlinePayDto> queryOnlinePays(@RequestBody OnlinePayDto onlinePayDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param onlinePayDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryOnlinePaysCount", method = RequestMethod.POST)
+    int queryOnlinePaysCount(@RequestBody OnlinePayDto onlinePayDto);
+}

+ 71 - 0
service-acct/src/main/java/com/java110/acct/cmd/onlinePay/DeleteOnlinePayCmd.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.acct.cmd.onlinePay;
+
+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.acct.IOnlinePayV1InnerServiceSMO;
+import com.java110.po.onlinePay.OnlinePayPo;
+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;
+/**
+ * 类表述:删除
+ * 服务编码:onlinePay.deleteOnlinePay
+ * 请求路劲:/app/onlinePay.DeleteOnlinePay
+ * add by 吴学文 at 2021-12-21 13:05:25 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 = "onlinePay.deleteOnlinePay")
+public class DeleteOnlinePayCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteOnlinePayCmd.class);
+
+    @Autowired
+    private IOnlinePayV1InnerServiceSMO onlinePayV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "payId", "payId不能为空");
+Assert.hasKeyAndValue(reqJson, "orderId", "orderId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OnlinePayPo onlinePayPo = BeanConvertUtil.covertBean(reqJson, OnlinePayPo.class);
+        int flag = onlinePayV1InnerServiceSMOImpl.deleteOnlinePay(onlinePayPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-acct/src/main/java/com/java110/acct/cmd/onlinePay/ListOnlinePayCmd.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.acct.cmd.onlinePay;
+
+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.acct.IOnlinePayV1InnerServiceSMO;
+import com.java110.po.onlinePay.OnlinePayPo;
+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.onlinePay.OnlinePayDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:onlinePay.listOnlinePay
+ * 请求路劲:/app/onlinePay.ListOnlinePay
+ * add by 吴学文 at 2021-12-21 13:05:25 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 = "onlinePay.listOnlinePay")
+public class ListOnlinePayCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListOnlinePayCmd.class);
+    @Autowired
+    private IOnlinePayV1InnerServiceSMO onlinePayV1InnerServiceSMOImpl;
+
+    @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 {
+
+           OnlinePayDto onlinePayDto = BeanConvertUtil.covertBean(reqJson, OnlinePayDto.class);
+
+           int count = onlinePayV1InnerServiceSMOImpl.queryOnlinePaysCount(onlinePayDto);
+
+           List<OnlinePayDto> onlinePayDtos = null;
+
+           if (count > 0) {
+               onlinePayDtos = onlinePayV1InnerServiceSMOImpl.queryOnlinePays(onlinePayDto);
+           } else {
+               onlinePayDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, onlinePayDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 78 - 0
service-acct/src/main/java/com/java110/acct/cmd/onlinePay/SaveOnlinePayCmd.java

@@ -0,0 +1,78 @@
+/*
+ * 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.acct.cmd.onlinePay;
+
+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.acct.IOnlinePayV1InnerServiceSMO;
+import com.java110.po.onlinePay.OnlinePayPo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:onlinePay.saveOnlinePay
+ * 请求路劲:/app/onlinePay.SaveOnlinePay
+ * add by 吴学文 at 2021-12-21 13:05:25 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 = "onlinePay.saveOnlinePay")
+public class SaveOnlinePayCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveOnlinePayCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IOnlinePayV1InnerServiceSMO onlinePayV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "orderId", "请求报文中未包含orderId");
+Assert.hasKeyAndValue(reqJson, "mchId", "请求报文中未包含mchId");
+Assert.hasKeyAndValue(reqJson, "totalFee", "请求报文中未包含totalFee");
+Assert.hasKeyAndValue(reqJson, "refundFee", "请求报文中未包含refundFee");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OnlinePayPo onlinePayPo = BeanConvertUtil.covertBean(reqJson, OnlinePayPo.class);
+        onlinePayPo.setPayId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = onlinePayV1InnerServiceSMOImpl.saveOnlinePay(onlinePayPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-acct/src/main/java/com/java110/acct/cmd/onlinePay/UpdateOnlinePayCmd.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.acct.cmd.onlinePay;
+
+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.acct.IOnlinePayV1InnerServiceSMO;
+import com.java110.po.onlinePay.OnlinePayPo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:onlinePay.updateOnlinePay
+ * 请求路劲:/app/onlinePay.UpdateOnlinePay
+ * add by 吴学文 at 2021-12-21 13:05:25 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 = "onlinePay.updateOnlinePay")
+public class UpdateOnlinePayCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateOnlinePayCmd.class);
+
+
+    @Autowired
+    private IOnlinePayV1InnerServiceSMO onlinePayV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "payId", "payId不能为空");
+Assert.hasKeyAndValue(reqJson, "orderId", "orderId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OnlinePayPo onlinePayPo = BeanConvertUtil.covertBean(reqJson, OnlinePayPo.class);
+        int flag = onlinePayV1InnerServiceSMOImpl.updateOnlinePay(onlinePayPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-acct/src/main/java/com/java110/acct/dao/IOnlinePayV1ServiceDao.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.acct.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 2021-12-21 13:05:25 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 IOnlinePayV1ServiceDao {
+
+
+    /**
+     * 保存 线上支付信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveOnlinePayInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询线上支付信息(instance过程)
+     * 根据bId 查询线上支付信息
+     * @param info bId 信息
+     * @return 线上支付信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getOnlinePayInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改线上支付信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateOnlinePayInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询线上支付总数
+     *
+     * @param info 线上支付信息
+     * @return 线上支付数量
+     */
+    int queryOnlinePaysCount(Map info);
+
+}

+ 112 - 0
service-acct/src/main/java/com/java110/acct/dao/impl/OnlinePayV1ServiceDaoImpl.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.acct.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.acct.dao.IOnlinePayV1ServiceDao;
+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 2021-12-21 13:05:25 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("onlinePayV1ServiceDaoImpl")
+public class OnlinePayV1ServiceDaoImpl extends BaseServiceDao implements IOnlinePayV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(OnlinePayV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存线上支付信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveOnlinePayInfo(Map info) throws DAOException {
+        logger.debug("保存 saveOnlinePayInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("onlinePayV1ServiceDaoImpl.saveOnlinePayInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询线上支付信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getOnlinePayInfo(Map info) throws DAOException {
+        logger.debug("查询 getOnlinePayInfo 入参 info : {}",info);
+
+        List<Map> businessOnlinePayInfos = sqlSessionTemplate.selectList("onlinePayV1ServiceDaoImpl.getOnlinePayInfo",info);
+
+        return businessOnlinePayInfos;
+    }
+
+
+    /**
+     * 修改线上支付信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateOnlinePayInfo(Map info) throws DAOException {
+        logger.debug("修改 updateOnlinePayInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("onlinePayV1ServiceDaoImpl.updateOnlinePayInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询线上支付数量
+     * @param info 线上支付信息
+     * @return 线上支付数量
+     */
+    @Override
+    public int queryOnlinePaysCount(Map info) {
+        logger.debug("查询 queryOnlinePaysCount 入参 info : {}",info);
+
+        List<Map> businessOnlinePayInfos = sqlSessionTemplate.selectList("onlinePayV1ServiceDaoImpl.queryOnlinePaysCount", info);
+        if (businessOnlinePayInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOnlinePayInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-acct/src/main/java/com/java110/acct/smo/impl/OnlinePayV1InnerServiceSMOImpl.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.acct.smo.impl;
+
+
+import com.java110.acct.dao.IOnlinePayV1ServiceDao;
+import com.java110.intf.acct.IOnlinePayV1InnerServiceSMO;
+import com.java110.dto.onlinePay.OnlinePayDto;
+import com.java110.po.onlinePay.OnlinePayPo;
+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 2021-12-21 13:05:25 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 OnlinePayV1InnerServiceSMOImpl extends BaseServiceSMO implements IOnlinePayV1InnerServiceSMO {
+
+    @Autowired
+    private IOnlinePayV1ServiceDao onlinePayV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveOnlinePay(@RequestBody  OnlinePayPo onlinePayPo) {
+        int saveFlag = onlinePayV1ServiceDaoImpl.saveOnlinePayInfo(BeanConvertUtil.beanCovertMap(onlinePayPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateOnlinePay(@RequestBody  OnlinePayPo onlinePayPo) {
+        int saveFlag = onlinePayV1ServiceDaoImpl.updateOnlinePayInfo(BeanConvertUtil.beanCovertMap(onlinePayPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteOnlinePay(@RequestBody  OnlinePayPo onlinePayPo) {
+       onlinePayPo.setStatusCd("1");
+       int saveFlag = onlinePayV1ServiceDaoImpl.updateOnlinePayInfo(BeanConvertUtil.beanCovertMap(onlinePayPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<OnlinePayDto> queryOnlinePays(@RequestBody  OnlinePayDto onlinePayDto) {
+
+        //校验是否传了 分页信息
+
+        int page = onlinePayDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            onlinePayDto.setPage((page - 1) * onlinePayDto.getRow());
+        }
+
+        List<OnlinePayDto> onlinePays = BeanConvertUtil.covertBeanList(onlinePayV1ServiceDaoImpl.getOnlinePayInfo(BeanConvertUtil.beanCovertMap(onlinePayDto)), OnlinePayDto.class);
+
+        return onlinePays;
+    }
+
+
+    @Override
+    public int queryOnlinePaysCount(@RequestBody OnlinePayDto onlinePayDto) {
+        return onlinePayV1ServiceDaoImpl.queryOnlinePaysCount(BeanConvertUtil.beanCovertMap(onlinePayDto));    }
+
+}

+ 0 - 119
service-busi-merge/pom.xml

@@ -1,119 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>MicroCommunity</artifactId>
-        <groupId>com.java110</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>service-busi-merge</artifactId>
-    <packaging>jar</packaging>
-
-    <name>service-busi-merge</name>
-    <url>http://maven.apache.org</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-service</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-acct</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-common</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-community</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-dev</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-fee</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-job</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-oa</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-report</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-store</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>service-user</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-    </dependencies>
-
-
-    <build>
-        <finalName>service-busi-merge</finalName>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.10</version>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>java110-interface</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>com.java110.BusiServiceApplicationStart</mainClass>
-                </configuration>
-            </plugin>
-        </plugins>
-
-    </build>
-</project>

+ 0 - 81
service-busi-merge/src/main/java/com/java110/BusiServiceApplicationStart.java

@@ -1,81 +0,0 @@
-package com.java110;
-
-import com.java110.core.annotation.Java110CmdDiscovery;
-import com.java110.core.annotation.Java110ListenerDiscovery;
-import com.java110.core.client.RestTemplate;
-import com.java110.core.event.cmd.ServiceCmdEventPublishing;
-import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing;
-import com.java110.service.init.ServiceStartInit;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.cloud.openfeign.EnableFeignClients;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.http.converter.StringHttpMessageConverter;
-
-import java.nio.charset.Charset;
-
-
-/**
- * spring boot 初始化启动类
- *
- * @version v0.1
- * @auther com.java110.wuxw
- * @mail 928255095@qq.com
- * @date 2016年8月6日
- * @tag
- */
-@SpringBootApplication(
-        scanBasePackages = {"com.java110.service",
-                "com.java110.core",
-                "com.java110.user",
-                "com.java110.acct",
-                "com.java110.common",
-                "com.java110.community",
-                "com.java110.dev",
-                "com.java110.fee",
-                "com.java110.job",
-                "com.java110.oa",
-                "com.java110.report",
-                "com.java110.store",
-                "com.java110.config.properties.code",
-                "com.java110.db"}
-)
-@EnableDiscoveryClient
-@Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
-        basePackages = {"com.java110.user.listener","com.java110.acct.listener"})
-@Java110CmdDiscovery(cmdPublishClass = ServiceCmdEventPublishing.class,
-        basePackages = {"com.java110.user.cmd","com.java110.acct.cmd"})
-public class BusiServiceApplicationStart {
-
-    private static Logger logger = LoggerFactory.getLogger(BusiServiceApplicationStart.class);
-
-    public static void main(String[] args) throws Exception {
-        try {
-            ApplicationContext context = SpringApplication.run(BusiServiceApplicationStart.class, args);
-            ServiceStartInit.initSystemConfig(context);
-            //加载业务侦听
-            // SystemStartLoadBusinessConfigure.initSystemConfig(LISTENER_PATH);
-        } catch (Throwable e) {
-            logger.error("系统启动失败", e);
-        }
-    }
-
-    /**
-     * 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力.
-     *
-     * @return restTemplate
-     */
-    @Bean
-    @LoadBalanced
-    public RestTemplate restTemplate() {
-        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class);
-        return restTemplate;
-    }
-}

+ 0 - 109
service-busi-merge/src/main/resources/application-dev.yml

@@ -1,109 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: dev.redis.java110.com
-    port: 6379
-    timeout: 3000
-    password: hc
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    leaseExpirationDurationInSeconds: 30
-    preferIpAddress: true
-    instanceId: ${spring.cloud.client.ip-address}:${server.port}
-  client:
-    serviceUrl:
-      defaultZone: http://dev.java110.com:8761/eureka/
-      #defaultZone: http://localhost:8761/eureka/
-server:
-  port: 8000
-  tomcat:
-    uri-encoding: UTF-8
-
-java110:
-  community-service: busi-service
-  acct-service: busi-service
-  user-service: busi-service
-  store-service: busi-service
-  common-service: busi-service
-  job-service: busi-service
-  fee-service: busi-service
-  report-service: busi-service
-  dev-service: busi-service
-  oa-service: busi-service
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  application:
-    name: busi-service
-  redis:
-    database: 0
-    host: dev.redis.java110.com
-    port: 6379
-    password: hc
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-  datasource:
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-    type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    maxPoolPreparedStatementPerConnectionSize: 20
-    password: TT@12345678
-    testOnBorrow: false
-    testWhileIdle: true
-    minEvictableIdleTimeMillis: 300000
-    timeBetweenEvictionRunsMillis: 60000
-    testOnReturn: false
-    driverClassName: com.mysql.cj.jdbc.Driver
-    maxActive: 20
-    username: TT
-
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: notifyBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 3
service-busi-merge/src/main/resources/application.yml

@@ -1,3 +0,0 @@
-spring:
-  profiles:
-    active: dev

+ 0 - 32
service-busi-merge/src/main/resources/dataSource.yml

@@ -1,32 +0,0 @@
-dataSources:
-  ds1: !!com.alibaba.druid.pool.DruidDataSource
-    driverClassName: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC
-    username: TT
-    password: TT@12345678
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-
-shardingRule:
-  tables:
-    business_xxx:
-      actualDataNodes: ds1.business_community
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-
-  bindingTables:
-    - business_xxx
-
-  defaultDataSourceName: ds1
-  defaultDatabaseStrategy:
-    none:
-  defaultTableStrategy:
-    none:
-props:
-  sql.show: true

+ 0 - 3
service-busi-merge/src/main/resources/java110.properties

@@ -1,3 +0,0 @@
-java110.mappingPath=classpath:mapper/**/**/*.xml
-
-