浏览代码

aska管理

shiyunlong 1 年之前
父节点
当前提交
f408bf7eb1
共有 58 个文件被更改,包括 1290 次插入23 次删除
  1. 2 2
      .idea/mybatisx/templates.xml
  2. 3 3
      admin/src/main/java/com/mofangchuxing/aska/admin/controller/ChannelController.java
  3. 22 3
      admin/src/main/java/com/mofangchuxing/aska/admin/controller/FinancialController.java
  4. 35 1
      admin/src/main/java/com/mofangchuxing/aska/admin/controller/RetailController.java
  5. 二进制
      admin/target/aska-admin.jar
  6. 二进制
      admin/target/aska-admin.jar.original
  7. 二进制
      admin/target/classes/com/mofangchuxing/aska/admin/controller/ChannelController.class
  8. 二进制
      admin/target/classes/com/mofangchuxing/aska/admin/controller/FinancialController.class
  9. 二进制
      admin/target/classes/com/mofangchuxing/aska/admin/controller/RetailController.class
  10. 527 0
      dao/src/main/java/com/mofangchuxing/aska/dao/domain/AskaPlatform.java
  11. 2 1
      dao/src/main/java/com/mofangchuxing/aska/dao/mapper/AskaCashrequestMapper.java
  12. 25 0
      dao/src/main/java/com/mofangchuxing/aska/dao/mapper/AskaPlatformMapper.java
  13. 4 1
      dao/src/main/resources/mapper/AskaCashrequestMapper.xml
  14. 219 0
      dao/src/main/resources/mapper/AskaPlatformMapper.xml
  15. 12 1
      dao/src/main/resources/mapper/PayRequestMapper.xml
  16. 二进制
      dao/target/aska-dao-1.0.jar
  17. 二进制
      dao/target/classes/com/mofangchuxing/aska/dao/domain/AskaPlatform.class
  18. 二进制
      dao/target/classes/com/mofangchuxing/aska/dao/mapper/AskaCashrequestMapper.class
  19. 二进制
      dao/target/classes/com/mofangchuxing/aska/dao/mapper/AskaPlatformMapper.class
  20. 二进制
      dao/target/classes/com/mofangchuxing/aska/dao/mapper/PayRequestMapper.class
  21. 4 1
      dao/target/classes/mapper/AskaCashrequestMapper.xml
  22. 219 0
      dao/target/classes/mapper/AskaPlatformMapper.xml
  23. 14 0
      dao/target/classes/mapper/PayRequestMapper.xml
  24. 2 0
      dao/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  25. 2 0
      dao/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  26. 18 0
      domain/src/main/java/com/mofangchuxing/aska/domain/dto/CashDto.java
  27. 2 0
      domain/src/main/java/com/mofangchuxing/aska/domain/dto/RetailDto.java
  28. 24 0
      domain/src/main/java/com/mofangchuxing/aska/domain/vo/FinancialVo.java
  29. 二进制
      domain/target/aska-domain-1.0.jar
  30. 二进制
      domain/target/classes/com/mofangchuxing/aska/domain/dto/CashDto.class
  31. 二进制
      domain/target/classes/com/mofangchuxing/aska/domain/dto/RetailDto.class
  32. 二进制
      domain/target/classes/com/mofangchuxing/aska/domain/vo/FinancialVo.class
  33. 2 0
      domain/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  34. 2 0
      domain/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  35. 二进制
      main/target/aska.jar
  36. 二进制
      main/target/aska.jar.original
  37. 13 0
      service/src/main/java/com/mofangchuxing/aska/service/CashService.java
  38. 2 5
      service/src/main/java/com/mofangchuxing/aska/service/ChannelService.java
  39. 13 0
      service/src/main/java/com/mofangchuxing/aska/service/FinancialService.java
  40. 4 0
      service/src/main/java/com/mofangchuxing/aska/service/RetailService.java
  41. 32 0
      service/src/main/java/com/mofangchuxing/aska/service/impl/CashServiceImpl.java
  42. 6 3
      service/src/main/java/com/mofangchuxing/aska/service/impl/ChannelServiceImpl.java
  43. 38 0
      service/src/main/java/com/mofangchuxing/aska/service/impl/FinancialServiceImpl.java
  44. 5 2
      service/src/main/java/com/mofangchuxing/aska/service/impl/OrderServiceImpl.java
  45. 29 0
      service/src/main/java/com/mofangchuxing/aska/service/impl/RetailServiceImpl.java
  46. 二进制
      service/target/aska-service-1.0.jar
  47. 二进制
      service/target/classes/com/mofangchuxing/aska/service/CashService.class
  48. 二进制
      service/target/classes/com/mofangchuxing/aska/service/ChannelService.class
  49. 二进制
      service/target/classes/com/mofangchuxing/aska/service/FinancialService.class
  50. 二进制
      service/target/classes/com/mofangchuxing/aska/service/OrderService.class
  51. 二进制
      service/target/classes/com/mofangchuxing/aska/service/RetailService.class
  52. 二进制
      service/target/classes/com/mofangchuxing/aska/service/impl/CashServiceImpl.class
  53. 二进制
      service/target/classes/com/mofangchuxing/aska/service/impl/ChannelServiceImpl.class
  54. 二进制
      service/target/classes/com/mofangchuxing/aska/service/impl/FinancialServiceImpl.class
  55. 二进制
      service/target/classes/com/mofangchuxing/aska/service/impl/OrderServiceImpl.class
  56. 二进制
      service/target/classes/com/mofangchuxing/aska/service/impl/RetailServiceImpl.class
  57. 4 0
      service/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  58. 4 0
      service/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

+ 2 - 2
.idea/mybatisx/templates.xml

@@ -49,8 +49,8 @@
             <option name="tableUIInfoList">
               <list>
                 <TableUIInfo>
-                  <option name="className" value="AskaStat" />
-                  <option name="tableName" value="aska_stat" />
+                  <option name="className" value="AskaPlatform" />
+                  <option name="tableName" value="aska_platform" />
                 </TableUIInfo>
               </list>
             </option>

+ 3 - 3
admin/src/main/java/com/mofangchuxing/aska/admin/controller/ChannelController.java

@@ -98,12 +98,12 @@ public class ChannelController extends AdminBaseController{
     }
 
     @PostMapping("/getCashHistory")
-    public R getCashHistory(@RequestBody ChannelDto channelDto) {
-        AskaAccounts askaAccounts = getSysUser(channelDto.getT());
+    public R getCashHistory(@RequestBody OrderDto orderDto) {
+        AskaAccounts askaAccounts = getSysUser(orderDto.getT());
         if (askaAccounts == null){
             return R.error("用户未登录或没有权限");
         }
-        PageUtils pageUtils = channelService.getCashHistory(channelDto);
+        PageUtils pageUtils = channelService.getCashHistory(orderDto);
         return R.ok(pageUtils);
     }
 

+ 22 - 3
admin/src/main/java/com/mofangchuxing/aska/admin/controller/FinancialController.java

@@ -2,10 +2,14 @@ package com.mofangchuxing.aska.admin.controller;
 
 import com.mofangchuxing.aska.dao.domain.AskaAccounts;
 import com.mofangchuxing.aska.domain.R;
+import com.mofangchuxing.aska.domain.dto.CashDto;
 import com.mofangchuxing.aska.domain.dto.ChannelDto;
 import com.mofangchuxing.aska.domain.dto.OrderDto;
 import com.mofangchuxing.aska.domain.utils.PageUtils;
+import com.mofangchuxing.aska.domain.vo.FinancialVo;
+import com.mofangchuxing.aska.service.CashService;
 import com.mofangchuxing.aska.service.ChannelService;
+import com.mofangchuxing.aska.service.FinancialService;
 import com.mofangchuxing.aska.service.OrderService;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -27,6 +31,10 @@ public class FinancialController extends AdminBaseController{
     private OrderService orderService;
     @Resource
     private ChannelService channelService;
+    @Resource
+    private CashService cashService;
+    @Resource
+    private FinancialService financialService;
 
     @PostMapping("/getOrderList")
     public R getOrderList(@RequestBody OrderDto orderDto) {
@@ -39,12 +47,12 @@ public class FinancialController extends AdminBaseController{
     }
 
     @PostMapping("/listCashRequest")
-    public R listCashRequest(@RequestBody ChannelDto channelDto) {
-        AskaAccounts askaAccounts = getSysUser(channelDto.getT());
+    public R listCashRequest(@RequestBody OrderDto orderDto) {
+        AskaAccounts askaAccounts = getSysUser(orderDto.getT());
         if (askaAccounts == null){
             return R.error("用户未登录或没有权限");
         }
-        PageUtils pageUtils = channelService.getCashHistory(channelDto);
+        PageUtils pageUtils = channelService.getCashHistory(orderDto);
         return R.ok(pageUtils);
     }
 
@@ -54,6 +62,17 @@ public class FinancialController extends AdminBaseController{
         if (askaAccounts == null){
             return R.error("用户未登录或没有权限");
         }
+        FinancialVo financialVo = financialService.getBalance();
+        return R.ok(financialVo);
+    }
+
+    @PostMapping("/setCashResult")
+    public R setCashResult(@RequestBody CashDto cashDto) {
+        AskaAccounts askaAccounts = getSysUser(cashDto.getT());
+        if (askaAccounts == null){
+            return R.error("用户未登录或没有权限");
+        }
+        cashService.setCashResult(cashDto);
         return R.ok();
     }
 }

+ 35 - 1
admin/src/main/java/com/mofangchuxing/aska/admin/controller/RetailController.java

@@ -2,10 +2,12 @@ package com.mofangchuxing.aska.admin.controller;
 
 import com.mofangchuxing.aska.dao.domain.AskaAccounts;
 import com.mofangchuxing.aska.domain.R;
+import com.mofangchuxing.aska.domain.dto.ChannelDto;
 import com.mofangchuxing.aska.domain.dto.OrderDto;
 import com.mofangchuxing.aska.domain.dto.RetailDto;
 import com.mofangchuxing.aska.domain.utils.PageUtils;
 import com.mofangchuxing.aska.domain.vo.AskaRetailsVo;
+import com.mofangchuxing.aska.service.ChannelService;
 import com.mofangchuxing.aska.service.OrderService;
 import com.mofangchuxing.aska.service.RetailService;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -27,6 +29,8 @@ public class RetailController extends AdminBaseController{
     private OrderService orderService;
     @Resource
     private RetailService retailService;
+    @Resource
+    private ChannelService channelService;
 
     @PostMapping("/getOrderList")
     public R getOrderList(@RequestBody OrderDto orderDto) {
@@ -54,7 +58,37 @@ public class RetailController extends AdminBaseController{
         if (askaAccounts == null){
             return R.error("用户未登录或没有权限");
         }
-        PageUtils pageUtils = orderService.getOrderList(orderDto);
+        PageUtils pageUtils = orderService.queryPayment(orderDto);
+        return R.ok(pageUtils);
+    }
+
+    @PostMapping("/report")
+    public R report(@RequestBody OrderDto orderDto) {
+        AskaAccounts askaAccounts = getSysUser(orderDto.getT());
+        if (askaAccounts == null){
+            return R.error("用户未登录或没有权限");
+        }
+        PageUtils pageUtils = orderService.queryPayment(orderDto);
+        return R.ok(pageUtils);
+    }
+
+    @PostMapping("/getCashHistory")
+    public R getCashHistory(@RequestBody OrderDto orderDto) {
+        AskaAccounts askaAccounts = getSysUser(orderDto.getT());
+        if (askaAccounts == null){
+            return R.error("用户未登录或没有权限");
+        }
+        PageUtils pageUtils = channelService.getCashHistory(orderDto);
         return R.ok(pageUtils);
     }
+
+    @PostMapping("/getCash")
+    public R getCash(@RequestBody RetailDto retailDto) {
+        AskaAccounts askaAccounts = getSysUser(retailDto.getT());
+        if (askaAccounts == null){
+            return R.error("用户未登录或没有权限");
+        }
+        retailService.addCashRequest(askaAccounts, retailDto);
+        return R.ok();
+    }
 }

二进制
admin/target/aska-admin.jar


二进制
admin/target/aska-admin.jar.original


二进制
admin/target/classes/com/mofangchuxing/aska/admin/controller/ChannelController.class


二进制
admin/target/classes/com/mofangchuxing/aska/admin/controller/FinancialController.class


二进制
admin/target/classes/com/mofangchuxing/aska/admin/controller/RetailController.class


+ 527 - 0
dao/src/main/java/com/mofangchuxing/aska/dao/domain/AskaPlatform.java

@@ -0,0 +1,527 @@
+package com.mofangchuxing.aska.dao.domain;
+
+import java.io.Serializable;
+
+/**
+ * 
+ * @TableName aska_platform
+ */
+public class AskaPlatform implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 
+     */
+    private String name;
+
+    /**
+     * 
+     */
+    private String address;
+
+    /**
+     * 备注
+     */
+    private String note;
+
+    /**
+     * 收款账号mchid或openid
+     */
+    private String account;
+
+    /**
+     * 
+     */
+    private String accountName;
+
+    /**
+     * {personal,merchant}
+     */
+    private String accountType;
+
+    /**
+     * 
+     */
+    private String apiv3;
+
+    /**
+     * 
+     */
+    private String certPath;
+
+    /**
+     * 渠道可用状态{运营,暂停}
+     */
+    private String status;
+
+    /**
+     * 收入总额
+     */
+    private Integer totalIncome;
+
+    /**
+     * 退款总额
+     */
+    private Integer totalRefund;
+
+    /**
+     * 门店实时分账总额
+     */
+    private Integer totalRetailSplit;
+
+    /**
+     * 门店记账总额
+     */
+    private Integer totalRetailAccounting;
+
+    /**
+     * 门店分账退款总额
+     */
+    private Integer totalRetailSplitRefund;
+
+    /**
+     * 门店记账退款总额
+     */
+    private Integer totalRetailAccountingRefund;
+
+    /**
+     * 渠道实时分账总额
+     */
+    private Integer totalChannelSplit;
+
+    /**
+     * 渠道记账总额
+     */
+    private Integer totalChannelAccounting;
+
+    /**
+     * 渠道分账退款总额
+     */
+    private Integer totalChannelSplitRefund;
+
+    /**
+     * 渠道记账退款总额
+     */
+    private Integer totalChannelAccountingRefund;
+
+    /**
+     * 提现总额
+     */
+    private Integer totalCashOut;
+
+    /**
+     * 余额
+     */
+    private Integer balance;
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 
+     */
+    public String getAddress() {
+        return address;
+    }
+
+    /**
+     * 
+     */
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    /**
+     * 备注
+     */
+    public String getNote() {
+        return note;
+    }
+
+    /**
+     * 备注
+     */
+    public void setNote(String note) {
+        this.note = note;
+    }
+
+    /**
+     * 收款账号mchid或openid
+     */
+    public String getAccount() {
+        return account;
+    }
+
+    /**
+     * 收款账号mchid或openid
+     */
+    public void setAccount(String account) {
+        this.account = account;
+    }
+
+    /**
+     * 
+     */
+    public String getAccountName() {
+        return accountName;
+    }
+
+    /**
+     * 
+     */
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    /**
+     * {personal,merchant}
+     */
+    public String getAccountType() {
+        return accountType;
+    }
+
+    /**
+     * {personal,merchant}
+     */
+    public void setAccountType(String accountType) {
+        this.accountType = accountType;
+    }
+
+    /**
+     * 
+     */
+    public String getApiv3() {
+        return apiv3;
+    }
+
+    /**
+     * 
+     */
+    public void setApiv3(String apiv3) {
+        this.apiv3 = apiv3;
+    }
+
+    /**
+     * 
+     */
+    public String getCertPath() {
+        return certPath;
+    }
+
+    /**
+     * 
+     */
+    public void setCertPath(String certPath) {
+        this.certPath = certPath;
+    }
+
+    /**
+     * 渠道可用状态{运营,暂停}
+     */
+    public String getStatus() {
+        return status;
+    }
+
+    /**
+     * 渠道可用状态{运营,暂停}
+     */
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    /**
+     * 收入总额
+     */
+    public Integer getTotalIncome() {
+        return totalIncome;
+    }
+
+    /**
+     * 收入总额
+     */
+    public void setTotalIncome(Integer totalIncome) {
+        this.totalIncome = totalIncome;
+    }
+
+    /**
+     * 退款总额
+     */
+    public Integer getTotalRefund() {
+        return totalRefund;
+    }
+
+    /**
+     * 退款总额
+     */
+    public void setTotalRefund(Integer totalRefund) {
+        this.totalRefund = totalRefund;
+    }
+
+    /**
+     * 门店实时分账总额
+     */
+    public Integer getTotalRetailSplit() {
+        return totalRetailSplit;
+    }
+
+    /**
+     * 门店实时分账总额
+     */
+    public void setTotalRetailSplit(Integer totalRetailSplit) {
+        this.totalRetailSplit = totalRetailSplit;
+    }
+
+    /**
+     * 门店记账总额
+     */
+    public Integer getTotalRetailAccounting() {
+        return totalRetailAccounting;
+    }
+
+    /**
+     * 门店记账总额
+     */
+    public void setTotalRetailAccounting(Integer totalRetailAccounting) {
+        this.totalRetailAccounting = totalRetailAccounting;
+    }
+
+    /**
+     * 门店分账退款总额
+     */
+    public Integer getTotalRetailSplitRefund() {
+        return totalRetailSplitRefund;
+    }
+
+    /**
+     * 门店分账退款总额
+     */
+    public void setTotalRetailSplitRefund(Integer totalRetailSplitRefund) {
+        this.totalRetailSplitRefund = totalRetailSplitRefund;
+    }
+
+    /**
+     * 门店记账退款总额
+     */
+    public Integer getTotalRetailAccountingRefund() {
+        return totalRetailAccountingRefund;
+    }
+
+    /**
+     * 门店记账退款总额
+     */
+    public void setTotalRetailAccountingRefund(Integer totalRetailAccountingRefund) {
+        this.totalRetailAccountingRefund = totalRetailAccountingRefund;
+    }
+
+    /**
+     * 渠道实时分账总额
+     */
+    public Integer getTotalChannelSplit() {
+        return totalChannelSplit;
+    }
+
+    /**
+     * 渠道实时分账总额
+     */
+    public void setTotalChannelSplit(Integer totalChannelSplit) {
+        this.totalChannelSplit = totalChannelSplit;
+    }
+
+    /**
+     * 渠道记账总额
+     */
+    public Integer getTotalChannelAccounting() {
+        return totalChannelAccounting;
+    }
+
+    /**
+     * 渠道记账总额
+     */
+    public void setTotalChannelAccounting(Integer totalChannelAccounting) {
+        this.totalChannelAccounting = totalChannelAccounting;
+    }
+
+    /**
+     * 渠道分账退款总额
+     */
+    public Integer getTotalChannelSplitRefund() {
+        return totalChannelSplitRefund;
+    }
+
+    /**
+     * 渠道分账退款总额
+     */
+    public void setTotalChannelSplitRefund(Integer totalChannelSplitRefund) {
+        this.totalChannelSplitRefund = totalChannelSplitRefund;
+    }
+
+    /**
+     * 渠道记账退款总额
+     */
+    public Integer getTotalChannelAccountingRefund() {
+        return totalChannelAccountingRefund;
+    }
+
+    /**
+     * 渠道记账退款总额
+     */
+    public void setTotalChannelAccountingRefund(Integer totalChannelAccountingRefund) {
+        this.totalChannelAccountingRefund = totalChannelAccountingRefund;
+    }
+
+    /**
+     * 提现总额
+     */
+    public Integer getTotalCashOut() {
+        return totalCashOut;
+    }
+
+    /**
+     * 提现总额
+     */
+    public void setTotalCashOut(Integer totalCashOut) {
+        this.totalCashOut = totalCashOut;
+    }
+
+    /**
+     * 余额
+     */
+    public Integer getBalance() {
+        return balance;
+    }
+
+    /**
+     * 余额
+     */
+    public void setBalance(Integer balance) {
+        this.balance = balance;
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        AskaPlatform other = (AskaPlatform) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
+            && (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()))
+            && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
+            && (this.getAccountName() == null ? other.getAccountName() == null : this.getAccountName().equals(other.getAccountName()))
+            && (this.getAccountType() == null ? other.getAccountType() == null : this.getAccountType().equals(other.getAccountType()))
+            && (this.getApiv3() == null ? other.getApiv3() == null : this.getApiv3().equals(other.getApiv3()))
+            && (this.getCertPath() == null ? other.getCertPath() == null : this.getCertPath().equals(other.getCertPath()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+            && (this.getTotalIncome() == null ? other.getTotalIncome() == null : this.getTotalIncome().equals(other.getTotalIncome()))
+            && (this.getTotalRefund() == null ? other.getTotalRefund() == null : this.getTotalRefund().equals(other.getTotalRefund()))
+            && (this.getTotalRetailSplit() == null ? other.getTotalRetailSplit() == null : this.getTotalRetailSplit().equals(other.getTotalRetailSplit()))
+            && (this.getTotalRetailAccounting() == null ? other.getTotalRetailAccounting() == null : this.getTotalRetailAccounting().equals(other.getTotalRetailAccounting()))
+            && (this.getTotalRetailSplitRefund() == null ? other.getTotalRetailSplitRefund() == null : this.getTotalRetailSplitRefund().equals(other.getTotalRetailSplitRefund()))
+            && (this.getTotalRetailAccountingRefund() == null ? other.getTotalRetailAccountingRefund() == null : this.getTotalRetailAccountingRefund().equals(other.getTotalRetailAccountingRefund()))
+            && (this.getTotalChannelSplit() == null ? other.getTotalChannelSplit() == null : this.getTotalChannelSplit().equals(other.getTotalChannelSplit()))
+            && (this.getTotalChannelAccounting() == null ? other.getTotalChannelAccounting() == null : this.getTotalChannelAccounting().equals(other.getTotalChannelAccounting()))
+            && (this.getTotalChannelSplitRefund() == null ? other.getTotalChannelSplitRefund() == null : this.getTotalChannelSplitRefund().equals(other.getTotalChannelSplitRefund()))
+            && (this.getTotalChannelAccountingRefund() == null ? other.getTotalChannelAccountingRefund() == null : this.getTotalChannelAccountingRefund().equals(other.getTotalChannelAccountingRefund()))
+            && (this.getTotalCashOut() == null ? other.getTotalCashOut() == null : this.getTotalCashOut().equals(other.getTotalCashOut()))
+            && (this.getBalance() == null ? other.getBalance() == null : this.getBalance().equals(other.getBalance()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
+        result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
+        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
+        result = prime * result + ((getAccountName() == null) ? 0 : getAccountName().hashCode());
+        result = prime * result + ((getAccountType() == null) ? 0 : getAccountType().hashCode());
+        result = prime * result + ((getApiv3() == null) ? 0 : getApiv3().hashCode());
+        result = prime * result + ((getCertPath() == null) ? 0 : getCertPath().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getTotalIncome() == null) ? 0 : getTotalIncome().hashCode());
+        result = prime * result + ((getTotalRefund() == null) ? 0 : getTotalRefund().hashCode());
+        result = prime * result + ((getTotalRetailSplit() == null) ? 0 : getTotalRetailSplit().hashCode());
+        result = prime * result + ((getTotalRetailAccounting() == null) ? 0 : getTotalRetailAccounting().hashCode());
+        result = prime * result + ((getTotalRetailSplitRefund() == null) ? 0 : getTotalRetailSplitRefund().hashCode());
+        result = prime * result + ((getTotalRetailAccountingRefund() == null) ? 0 : getTotalRetailAccountingRefund().hashCode());
+        result = prime * result + ((getTotalChannelSplit() == null) ? 0 : getTotalChannelSplit().hashCode());
+        result = prime * result + ((getTotalChannelAccounting() == null) ? 0 : getTotalChannelAccounting().hashCode());
+        result = prime * result + ((getTotalChannelSplitRefund() == null) ? 0 : getTotalChannelSplitRefund().hashCode());
+        result = prime * result + ((getTotalChannelAccountingRefund() == null) ? 0 : getTotalChannelAccountingRefund().hashCode());
+        result = prime * result + ((getTotalCashOut() == null) ? 0 : getTotalCashOut().hashCode());
+        result = prime * result + ((getBalance() == null) ? 0 : getBalance().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", name=").append(name);
+        sb.append(", address=").append(address);
+        sb.append(", note=").append(note);
+        sb.append(", account=").append(account);
+        sb.append(", accountName=").append(accountName);
+        sb.append(", accountType=").append(accountType);
+        sb.append(", apiv3=").append(apiv3);
+        sb.append(", certPath=").append(certPath);
+        sb.append(", status=").append(status);
+        sb.append(", totalIncome=").append(totalIncome);
+        sb.append(", totalRefund=").append(totalRefund);
+        sb.append(", totalRetailSplit=").append(totalRetailSplit);
+        sb.append(", totalRetailAccounting=").append(totalRetailAccounting);
+        sb.append(", totalRetailSplitRefund=").append(totalRetailSplitRefund);
+        sb.append(", totalRetailAccountingRefund=").append(totalRetailAccountingRefund);
+        sb.append(", totalChannelSplit=").append(totalChannelSplit);
+        sb.append(", totalChannelAccounting=").append(totalChannelAccounting);
+        sb.append(", totalChannelSplitRefund=").append(totalChannelSplitRefund);
+        sb.append(", totalChannelAccountingRefund=").append(totalChannelAccountingRefund);
+        sb.append(", totalCashOut=").append(totalCashOut);
+        sb.append(", balance=").append(balance);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 2 - 1
dao/src/main/java/com/mofangchuxing/aska/dao/mapper/AskaCashrequestMapper.java

@@ -2,6 +2,7 @@ package com.mofangchuxing.aska.dao.mapper;
 
 import com.mofangchuxing.aska.dao.domain.AskaCashrequest;
 import com.mofangchuxing.aska.domain.dto.ChannelDto;
+import com.mofangchuxing.aska.domain.dto.OrderDto;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -26,5 +27,5 @@ public interface AskaCashrequestMapper {
 
     int updateByPrimaryKey(AskaCashrequest record);
 
-    List<AskaCashrequest> getCashHistory(ChannelDto channelDto);
+    List<AskaCashrequest> getCashHistory(OrderDto orderDto);
 }

+ 25 - 0
dao/src/main/java/com/mofangchuxing/aska/dao/mapper/AskaPlatformMapper.java

@@ -0,0 +1,25 @@
+package com.mofangchuxing.aska.dao.mapper;
+
+import com.mofangchuxing.aska.dao.domain.AskaPlatform;
+
+/**
+* @author syl
+* @description 针对表【aska_platform】的数据库操作Mapper
+* @createDate 2023-11-08 17:16:33
+* @Entity com.mofangchuxing.aska.dao.domain.AskaPlatform
+*/
+public interface AskaPlatformMapper {
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AskaPlatform record);
+
+    int insertSelective(AskaPlatform record);
+
+    AskaPlatform selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(AskaPlatform record);
+
+    int updateByPrimaryKey(AskaPlatform record);
+
+}

+ 4 - 1
dao/src/main/resources/mapper/AskaCashrequestMapper.xml

@@ -37,7 +37,10 @@
         from aska_cashrequest
         where 1=1
         <if test="channelId != null and channelId != ''">
-            and partnerId = #{channelId}
+            and partnerType = 'channel' and partnerId = #{channelId}
+        </if>
+        <if test="retailId != null and retailId != ''">
+            and partnerType = 'retail' and partnerId = #{retailId}
         </if>
     </select>
 

+ 219 - 0
dao/src/main/resources/mapper/AskaPlatformMapper.xml

@@ -0,0 +1,219 @@
+<?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="com.mofangchuxing.aska.dao.mapper.AskaPlatformMapper">
+
+    <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaPlatform">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="name" column="name" jdbcType="CHAR"/>
+            <result property="address" column="address" jdbcType="VARCHAR"/>
+            <result property="note" column="note" jdbcType="VARCHAR"/>
+            <result property="account" column="account" jdbcType="VARCHAR"/>
+            <result property="accountName" column="accountName" jdbcType="VARCHAR"/>
+            <result property="accountType" column="accountType" jdbcType="CHAR"/>
+            <result property="apiv3" column="apiv3" jdbcType="VARCHAR"/>
+            <result property="certPath" column="certPath" jdbcType="VARCHAR"/>
+            <result property="status" column="status" jdbcType="CHAR"/>
+            <result property="totalIncome" column="totalIncome" jdbcType="INTEGER"/>
+            <result property="totalRefund" column="totalRefund" jdbcType="INTEGER"/>
+            <result property="totalRetailSplit" column="totalRetailSplit" jdbcType="INTEGER"/>
+            <result property="totalRetailAccounting" column="totalRetailAccounting" jdbcType="INTEGER"/>
+            <result property="totalRetailSplitRefund" column="totalRetailSplitRefund" jdbcType="INTEGER"/>
+            <result property="totalRetailAccountingRefund" column="totalRetailAccountingRefund" jdbcType="INTEGER"/>
+            <result property="totalChannelSplit" column="totalChannelSplit" jdbcType="INTEGER"/>
+            <result property="totalChannelAccounting" column="totalChannelAccounting" jdbcType="INTEGER"/>
+            <result property="totalChannelSplitRefund" column="totalChannelSplitRefund" jdbcType="INTEGER"/>
+            <result property="totalChannelAccountingRefund" column="totalChannelAccountingRefund" jdbcType="INTEGER"/>
+            <result property="totalCashOut" column="totalCashOut" jdbcType="INTEGER"/>
+            <result property="balance" column="balance" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,name,address,
+        note,account,accountName,
+        accountType,apiv3,certPath,
+        status,totalIncome,totalRefund,
+        totalRetailSplit,totalRetailAccounting,totalRetailSplitRefund,
+        totalRetailAccountingRefund,totalChannelSplit,totalChannelAccounting,
+        totalChannelSplitRefund,totalChannelAccountingRefund,totalCashOut,
+        balance
+    </sql>
+
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from aska_platform
+        where  id = #{id,jdbcType=INTEGER} 
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete from aska_platform
+        where  id = #{id,jdbcType=INTEGER} 
+    </delete>
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform" useGeneratedKeys="true">
+        insert into aska_platform
+        ( id,name,address
+        ,note,account,accountName
+        ,accountType,apiv3,certPath
+        ,status,totalIncome,totalRefund
+        ,totalRetailSplit,totalRetailAccounting,totalRetailSplitRefund
+        ,totalRetailAccountingRefund,totalChannelSplit,totalChannelAccounting
+        ,totalChannelSplitRefund,totalChannelAccountingRefund,totalCashOut
+        ,balance)
+        values (#{id,jdbcType=INTEGER},#{name,jdbcType=CHAR},#{address,jdbcType=VARCHAR}
+        ,#{note,jdbcType=VARCHAR},#{account,jdbcType=VARCHAR},#{accountName,jdbcType=VARCHAR}
+        ,#{accountType,jdbcType=CHAR},#{apiv3,jdbcType=VARCHAR},#{certPath,jdbcType=VARCHAR}
+        ,#{status,jdbcType=CHAR},#{totalIncome,jdbcType=INTEGER},#{totalRefund,jdbcType=INTEGER}
+        ,#{totalRetailSplit,jdbcType=INTEGER},#{totalRetailAccounting,jdbcType=INTEGER},#{totalRetailSplitRefund,jdbcType=INTEGER}
+        ,#{totalRetailAccountingRefund,jdbcType=INTEGER},#{totalChannelSplit,jdbcType=INTEGER},#{totalChannelAccounting,jdbcType=INTEGER}
+        ,#{totalChannelSplitRefund,jdbcType=INTEGER},#{totalChannelAccountingRefund,jdbcType=INTEGER},#{totalCashOut,jdbcType=INTEGER}
+        ,#{balance,jdbcType=INTEGER})
+    </insert>
+    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform" useGeneratedKeys="true">
+        insert into aska_platform
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="name != null">name,</if>
+                <if test="address != null">address,</if>
+                <if test="note != null">note,</if>
+                <if test="account != null">account,</if>
+                <if test="accountName != null">accountName,</if>
+                <if test="accountType != null">accountType,</if>
+                <if test="apiv3 != null">apiv3,</if>
+                <if test="certPath != null">certPath,</if>
+                <if test="status != null">status,</if>
+                <if test="totalIncome != null">totalIncome,</if>
+                <if test="totalRefund != null">totalRefund,</if>
+                <if test="totalRetailSplit != null">totalRetailSplit,</if>
+                <if test="totalRetailAccounting != null">totalRetailAccounting,</if>
+                <if test="totalRetailSplitRefund != null">totalRetailSplitRefund,</if>
+                <if test="totalRetailAccountingRefund != null">totalRetailAccountingRefund,</if>
+                <if test="totalChannelSplit != null">totalChannelSplit,</if>
+                <if test="totalChannelAccounting != null">totalChannelAccounting,</if>
+                <if test="totalChannelSplitRefund != null">totalChannelSplitRefund,</if>
+                <if test="totalChannelAccountingRefund != null">totalChannelAccountingRefund,</if>
+                <if test="totalCashOut != null">totalCashOut,</if>
+                <if test="balance != null">balance,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id,jdbcType=INTEGER},</if>
+                <if test="name != null">#{name,jdbcType=CHAR},</if>
+                <if test="address != null">#{address,jdbcType=VARCHAR},</if>
+                <if test="note != null">#{note,jdbcType=VARCHAR},</if>
+                <if test="account != null">#{account,jdbcType=VARCHAR},</if>
+                <if test="accountName != null">#{accountName,jdbcType=VARCHAR},</if>
+                <if test="accountType != null">#{accountType,jdbcType=CHAR},</if>
+                <if test="apiv3 != null">#{apiv3,jdbcType=VARCHAR},</if>
+                <if test="certPath != null">#{certPath,jdbcType=VARCHAR},</if>
+                <if test="status != null">#{status,jdbcType=CHAR},</if>
+                <if test="totalIncome != null">#{totalIncome,jdbcType=INTEGER},</if>
+                <if test="totalRefund != null">#{totalRefund,jdbcType=INTEGER},</if>
+                <if test="totalRetailSplit != null">#{totalRetailSplit,jdbcType=INTEGER},</if>
+                <if test="totalRetailAccounting != null">#{totalRetailAccounting,jdbcType=INTEGER},</if>
+                <if test="totalRetailSplitRefund != null">#{totalRetailSplitRefund,jdbcType=INTEGER},</if>
+                <if test="totalRetailAccountingRefund != null">#{totalRetailAccountingRefund,jdbcType=INTEGER},</if>
+                <if test="totalChannelSplit != null">#{totalChannelSplit,jdbcType=INTEGER},</if>
+                <if test="totalChannelAccounting != null">#{totalChannelAccounting,jdbcType=INTEGER},</if>
+                <if test="totalChannelSplitRefund != null">#{totalChannelSplitRefund,jdbcType=INTEGER},</if>
+                <if test="totalChannelAccountingRefund != null">#{totalChannelAccountingRefund,jdbcType=INTEGER},</if>
+                <if test="totalCashOut != null">#{totalCashOut,jdbcType=INTEGER},</if>
+                <if test="balance != null">#{balance,jdbcType=INTEGER},</if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform">
+        update aska_platform
+        <set>
+                <if test="name != null">
+                    name = #{name,jdbcType=CHAR},
+                </if>
+                <if test="address != null">
+                    address = #{address,jdbcType=VARCHAR},
+                </if>
+                <if test="note != null">
+                    note = #{note,jdbcType=VARCHAR},
+                </if>
+                <if test="account != null">
+                    account = #{account,jdbcType=VARCHAR},
+                </if>
+                <if test="accountName != null">
+                    accountName = #{accountName,jdbcType=VARCHAR},
+                </if>
+                <if test="accountType != null">
+                    accountType = #{accountType,jdbcType=CHAR},
+                </if>
+                <if test="apiv3 != null">
+                    apiv3 = #{apiv3,jdbcType=VARCHAR},
+                </if>
+                <if test="certPath != null">
+                    certPath = #{certPath,jdbcType=VARCHAR},
+                </if>
+                <if test="status != null">
+                    status = #{status,jdbcType=CHAR},
+                </if>
+                <if test="totalIncome != null">
+                    totalIncome = #{totalIncome,jdbcType=INTEGER},
+                </if>
+                <if test="totalRefund != null">
+                    totalRefund = #{totalRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailSplit != null">
+                    totalRetailSplit = #{totalRetailSplit,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailAccounting != null">
+                    totalRetailAccounting = #{totalRetailAccounting,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailSplitRefund != null">
+                    totalRetailSplitRefund = #{totalRetailSplitRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailAccountingRefund != null">
+                    totalRetailAccountingRefund = #{totalRetailAccountingRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelSplit != null">
+                    totalChannelSplit = #{totalChannelSplit,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelAccounting != null">
+                    totalChannelAccounting = #{totalChannelAccounting,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelSplitRefund != null">
+                    totalChannelSplitRefund = #{totalChannelSplitRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelAccountingRefund != null">
+                    totalChannelAccountingRefund = #{totalChannelAccountingRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalCashOut != null">
+                    totalCashOut = #{totalCashOut,jdbcType=INTEGER},
+                </if>
+                <if test="balance != null">
+                    balance = #{balance,jdbcType=INTEGER},
+                </if>
+        </set>
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform">
+        update aska_platform
+        set 
+            name =  #{name,jdbcType=CHAR},
+            address =  #{address,jdbcType=VARCHAR},
+            note =  #{note,jdbcType=VARCHAR},
+            account =  #{account,jdbcType=VARCHAR},
+            accountName =  #{accountName,jdbcType=VARCHAR},
+            accountType =  #{accountType,jdbcType=CHAR},
+            apiv3 =  #{apiv3,jdbcType=VARCHAR},
+            certPath =  #{certPath,jdbcType=VARCHAR},
+            status =  #{status,jdbcType=CHAR},
+            totalIncome =  #{totalIncome,jdbcType=INTEGER},
+            totalRefund =  #{totalRefund,jdbcType=INTEGER},
+            totalRetailSplit =  #{totalRetailSplit,jdbcType=INTEGER},
+            totalRetailAccounting =  #{totalRetailAccounting,jdbcType=INTEGER},
+            totalRetailSplitRefund =  #{totalRetailSplitRefund,jdbcType=INTEGER},
+            totalRetailAccountingRefund =  #{totalRetailAccountingRefund,jdbcType=INTEGER},
+            totalChannelSplit =  #{totalChannelSplit,jdbcType=INTEGER},
+            totalChannelAccounting =  #{totalChannelAccounting,jdbcType=INTEGER},
+            totalChannelSplitRefund =  #{totalChannelSplitRefund,jdbcType=INTEGER},
+            totalChannelAccountingRefund =  #{totalChannelAccountingRefund,jdbcType=INTEGER},
+            totalCashOut =  #{totalCashOut,jdbcType=INTEGER},
+            balance =  #{balance,jdbcType=INTEGER}
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+</mapper>

+ 12 - 1
dao/src/main/resources/mapper/PayRequestMapper.xml

@@ -116,7 +116,18 @@
         where order_id = #{orderId} limit 1
     </select>
     <select id="queryPayment" resultType="java.util.Map">
-        select 
+        select retailAccountAmount as accountAmount,retailAmount as amount,retailRealtimeAmount as realtimeAmount,splitOrderId as orderSN,
+               CASE recordType WHEN 1 THEN '收入' WHEN 2 THEN '退款' end as recordType,createTime from aska_splitrecord where 1=1
+        <if test="retailId != null and retailId != ''">
+            and retailId = #{retailId}
+        </if>
+        <if test="startTime != null and startTime != ''">
+            and createTime > #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            and createTime &lt; #{endTime}
+        </if>
+        order by createTime desc
     </select>
 
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">

二进制
dao/target/aska-dao-1.0.jar


二进制
dao/target/classes/com/mofangchuxing/aska/dao/domain/AskaPlatform.class


二进制
dao/target/classes/com/mofangchuxing/aska/dao/mapper/AskaCashrequestMapper.class


二进制
dao/target/classes/com/mofangchuxing/aska/dao/mapper/AskaPlatformMapper.class


二进制
dao/target/classes/com/mofangchuxing/aska/dao/mapper/PayRequestMapper.class


+ 4 - 1
dao/target/classes/mapper/AskaCashrequestMapper.xml

@@ -37,7 +37,10 @@
         from aska_cashrequest
         where 1=1
         <if test="channelId != null and channelId != ''">
-            and partnerId = #{channelId}
+            and partnerType = 'channel' and partnerId = #{channelId}
+        </if>
+        <if test="retailId != null and retailId != ''">
+            and partnerType = 'retail' and partnerId = #{retailId}
         </if>
     </select>
 

+ 219 - 0
dao/target/classes/mapper/AskaPlatformMapper.xml

@@ -0,0 +1,219 @@
+<?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="com.mofangchuxing.aska.dao.mapper.AskaPlatformMapper">
+
+    <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaPlatform">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="name" column="name" jdbcType="CHAR"/>
+            <result property="address" column="address" jdbcType="VARCHAR"/>
+            <result property="note" column="note" jdbcType="VARCHAR"/>
+            <result property="account" column="account" jdbcType="VARCHAR"/>
+            <result property="accountName" column="accountName" jdbcType="VARCHAR"/>
+            <result property="accountType" column="accountType" jdbcType="CHAR"/>
+            <result property="apiv3" column="apiv3" jdbcType="VARCHAR"/>
+            <result property="certPath" column="certPath" jdbcType="VARCHAR"/>
+            <result property="status" column="status" jdbcType="CHAR"/>
+            <result property="totalIncome" column="totalIncome" jdbcType="INTEGER"/>
+            <result property="totalRefund" column="totalRefund" jdbcType="INTEGER"/>
+            <result property="totalRetailSplit" column="totalRetailSplit" jdbcType="INTEGER"/>
+            <result property="totalRetailAccounting" column="totalRetailAccounting" jdbcType="INTEGER"/>
+            <result property="totalRetailSplitRefund" column="totalRetailSplitRefund" jdbcType="INTEGER"/>
+            <result property="totalRetailAccountingRefund" column="totalRetailAccountingRefund" jdbcType="INTEGER"/>
+            <result property="totalChannelSplit" column="totalChannelSplit" jdbcType="INTEGER"/>
+            <result property="totalChannelAccounting" column="totalChannelAccounting" jdbcType="INTEGER"/>
+            <result property="totalChannelSplitRefund" column="totalChannelSplitRefund" jdbcType="INTEGER"/>
+            <result property="totalChannelAccountingRefund" column="totalChannelAccountingRefund" jdbcType="INTEGER"/>
+            <result property="totalCashOut" column="totalCashOut" jdbcType="INTEGER"/>
+            <result property="balance" column="balance" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,name,address,
+        note,account,accountName,
+        accountType,apiv3,certPath,
+        status,totalIncome,totalRefund,
+        totalRetailSplit,totalRetailAccounting,totalRetailSplitRefund,
+        totalRetailAccountingRefund,totalChannelSplit,totalChannelAccounting,
+        totalChannelSplitRefund,totalChannelAccountingRefund,totalCashOut,
+        balance
+    </sql>
+
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from aska_platform
+        where  id = #{id,jdbcType=INTEGER} 
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete from aska_platform
+        where  id = #{id,jdbcType=INTEGER} 
+    </delete>
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform" useGeneratedKeys="true">
+        insert into aska_platform
+        ( id,name,address
+        ,note,account,accountName
+        ,accountType,apiv3,certPath
+        ,status,totalIncome,totalRefund
+        ,totalRetailSplit,totalRetailAccounting,totalRetailSplitRefund
+        ,totalRetailAccountingRefund,totalChannelSplit,totalChannelAccounting
+        ,totalChannelSplitRefund,totalChannelAccountingRefund,totalCashOut
+        ,balance)
+        values (#{id,jdbcType=INTEGER},#{name,jdbcType=CHAR},#{address,jdbcType=VARCHAR}
+        ,#{note,jdbcType=VARCHAR},#{account,jdbcType=VARCHAR},#{accountName,jdbcType=VARCHAR}
+        ,#{accountType,jdbcType=CHAR},#{apiv3,jdbcType=VARCHAR},#{certPath,jdbcType=VARCHAR}
+        ,#{status,jdbcType=CHAR},#{totalIncome,jdbcType=INTEGER},#{totalRefund,jdbcType=INTEGER}
+        ,#{totalRetailSplit,jdbcType=INTEGER},#{totalRetailAccounting,jdbcType=INTEGER},#{totalRetailSplitRefund,jdbcType=INTEGER}
+        ,#{totalRetailAccountingRefund,jdbcType=INTEGER},#{totalChannelSplit,jdbcType=INTEGER},#{totalChannelAccounting,jdbcType=INTEGER}
+        ,#{totalChannelSplitRefund,jdbcType=INTEGER},#{totalChannelAccountingRefund,jdbcType=INTEGER},#{totalCashOut,jdbcType=INTEGER}
+        ,#{balance,jdbcType=INTEGER})
+    </insert>
+    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform" useGeneratedKeys="true">
+        insert into aska_platform
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="name != null">name,</if>
+                <if test="address != null">address,</if>
+                <if test="note != null">note,</if>
+                <if test="account != null">account,</if>
+                <if test="accountName != null">accountName,</if>
+                <if test="accountType != null">accountType,</if>
+                <if test="apiv3 != null">apiv3,</if>
+                <if test="certPath != null">certPath,</if>
+                <if test="status != null">status,</if>
+                <if test="totalIncome != null">totalIncome,</if>
+                <if test="totalRefund != null">totalRefund,</if>
+                <if test="totalRetailSplit != null">totalRetailSplit,</if>
+                <if test="totalRetailAccounting != null">totalRetailAccounting,</if>
+                <if test="totalRetailSplitRefund != null">totalRetailSplitRefund,</if>
+                <if test="totalRetailAccountingRefund != null">totalRetailAccountingRefund,</if>
+                <if test="totalChannelSplit != null">totalChannelSplit,</if>
+                <if test="totalChannelAccounting != null">totalChannelAccounting,</if>
+                <if test="totalChannelSplitRefund != null">totalChannelSplitRefund,</if>
+                <if test="totalChannelAccountingRefund != null">totalChannelAccountingRefund,</if>
+                <if test="totalCashOut != null">totalCashOut,</if>
+                <if test="balance != null">balance,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id,jdbcType=INTEGER},</if>
+                <if test="name != null">#{name,jdbcType=CHAR},</if>
+                <if test="address != null">#{address,jdbcType=VARCHAR},</if>
+                <if test="note != null">#{note,jdbcType=VARCHAR},</if>
+                <if test="account != null">#{account,jdbcType=VARCHAR},</if>
+                <if test="accountName != null">#{accountName,jdbcType=VARCHAR},</if>
+                <if test="accountType != null">#{accountType,jdbcType=CHAR},</if>
+                <if test="apiv3 != null">#{apiv3,jdbcType=VARCHAR},</if>
+                <if test="certPath != null">#{certPath,jdbcType=VARCHAR},</if>
+                <if test="status != null">#{status,jdbcType=CHAR},</if>
+                <if test="totalIncome != null">#{totalIncome,jdbcType=INTEGER},</if>
+                <if test="totalRefund != null">#{totalRefund,jdbcType=INTEGER},</if>
+                <if test="totalRetailSplit != null">#{totalRetailSplit,jdbcType=INTEGER},</if>
+                <if test="totalRetailAccounting != null">#{totalRetailAccounting,jdbcType=INTEGER},</if>
+                <if test="totalRetailSplitRefund != null">#{totalRetailSplitRefund,jdbcType=INTEGER},</if>
+                <if test="totalRetailAccountingRefund != null">#{totalRetailAccountingRefund,jdbcType=INTEGER},</if>
+                <if test="totalChannelSplit != null">#{totalChannelSplit,jdbcType=INTEGER},</if>
+                <if test="totalChannelAccounting != null">#{totalChannelAccounting,jdbcType=INTEGER},</if>
+                <if test="totalChannelSplitRefund != null">#{totalChannelSplitRefund,jdbcType=INTEGER},</if>
+                <if test="totalChannelAccountingRefund != null">#{totalChannelAccountingRefund,jdbcType=INTEGER},</if>
+                <if test="totalCashOut != null">#{totalCashOut,jdbcType=INTEGER},</if>
+                <if test="balance != null">#{balance,jdbcType=INTEGER},</if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform">
+        update aska_platform
+        <set>
+                <if test="name != null">
+                    name = #{name,jdbcType=CHAR},
+                </if>
+                <if test="address != null">
+                    address = #{address,jdbcType=VARCHAR},
+                </if>
+                <if test="note != null">
+                    note = #{note,jdbcType=VARCHAR},
+                </if>
+                <if test="account != null">
+                    account = #{account,jdbcType=VARCHAR},
+                </if>
+                <if test="accountName != null">
+                    accountName = #{accountName,jdbcType=VARCHAR},
+                </if>
+                <if test="accountType != null">
+                    accountType = #{accountType,jdbcType=CHAR},
+                </if>
+                <if test="apiv3 != null">
+                    apiv3 = #{apiv3,jdbcType=VARCHAR},
+                </if>
+                <if test="certPath != null">
+                    certPath = #{certPath,jdbcType=VARCHAR},
+                </if>
+                <if test="status != null">
+                    status = #{status,jdbcType=CHAR},
+                </if>
+                <if test="totalIncome != null">
+                    totalIncome = #{totalIncome,jdbcType=INTEGER},
+                </if>
+                <if test="totalRefund != null">
+                    totalRefund = #{totalRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailSplit != null">
+                    totalRetailSplit = #{totalRetailSplit,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailAccounting != null">
+                    totalRetailAccounting = #{totalRetailAccounting,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailSplitRefund != null">
+                    totalRetailSplitRefund = #{totalRetailSplitRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalRetailAccountingRefund != null">
+                    totalRetailAccountingRefund = #{totalRetailAccountingRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelSplit != null">
+                    totalChannelSplit = #{totalChannelSplit,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelAccounting != null">
+                    totalChannelAccounting = #{totalChannelAccounting,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelSplitRefund != null">
+                    totalChannelSplitRefund = #{totalChannelSplitRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalChannelAccountingRefund != null">
+                    totalChannelAccountingRefund = #{totalChannelAccountingRefund,jdbcType=INTEGER},
+                </if>
+                <if test="totalCashOut != null">
+                    totalCashOut = #{totalCashOut,jdbcType=INTEGER},
+                </if>
+                <if test="balance != null">
+                    balance = #{balance,jdbcType=INTEGER},
+                </if>
+        </set>
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaPlatform">
+        update aska_platform
+        set 
+            name =  #{name,jdbcType=CHAR},
+            address =  #{address,jdbcType=VARCHAR},
+            note =  #{note,jdbcType=VARCHAR},
+            account =  #{account,jdbcType=VARCHAR},
+            accountName =  #{accountName,jdbcType=VARCHAR},
+            accountType =  #{accountType,jdbcType=CHAR},
+            apiv3 =  #{apiv3,jdbcType=VARCHAR},
+            certPath =  #{certPath,jdbcType=VARCHAR},
+            status =  #{status,jdbcType=CHAR},
+            totalIncome =  #{totalIncome,jdbcType=INTEGER},
+            totalRefund =  #{totalRefund,jdbcType=INTEGER},
+            totalRetailSplit =  #{totalRetailSplit,jdbcType=INTEGER},
+            totalRetailAccounting =  #{totalRetailAccounting,jdbcType=INTEGER},
+            totalRetailSplitRefund =  #{totalRetailSplitRefund,jdbcType=INTEGER},
+            totalRetailAccountingRefund =  #{totalRetailAccountingRefund,jdbcType=INTEGER},
+            totalChannelSplit =  #{totalChannelSplit,jdbcType=INTEGER},
+            totalChannelAccounting =  #{totalChannelAccounting,jdbcType=INTEGER},
+            totalChannelSplitRefund =  #{totalChannelSplitRefund,jdbcType=INTEGER},
+            totalChannelAccountingRefund =  #{totalChannelAccountingRefund,jdbcType=INTEGER},
+            totalCashOut =  #{totalCashOut,jdbcType=INTEGER},
+            balance =  #{balance,jdbcType=INTEGER}
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+</mapper>

+ 14 - 0
dao/target/classes/mapper/PayRequestMapper.xml

@@ -115,6 +115,20 @@
         from pay_request
         where order_id = #{orderId} limit 1
     </select>
+    <select id="queryPayment" resultType="java.util.Map">
+        select retailAccountAmount as accountAmount,retailAmount as amount,retailRealtimeAmount as realtimeAmount,splitOrderId as orderSN,
+               CASE recordType WHEN 1 THEN '收入' WHEN 2 THEN '退款' end as recordType,createTime from aska_splitrecord where 1=1
+        <if test="retailId != null and retailId != ''">
+            and retailId = #{retailId}
+        </if>
+        <if test="startTime != null and startTime != ''">
+            and createTime > #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            and createTime &lt; #{endTime}
+        </if>
+        order by createTime desc
+    </select>
 
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
         delete from pay_request

+ 2 - 0
dao/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -8,6 +8,7 @@ com/mofangchuxing/aska/dao/domain/AskaChannelnos.class
 com/mofangchuxing/aska/dao/mapper/AskaStatMapper.class
 com/mofangchuxing/aska/dao/mapper/AskaCashrequestMapper.class
 com/mofangchuxing/aska/dao/mapper/PayRequestMapper.class
+com/mofangchuxing/aska/dao/mapper/AskaPlatformMapper.class
 com/mofangchuxing/aska/dao/domain/PayRequest.class
 com/mofangchuxing/aska/dao/mapper/AskaRetailsMapper.class
 com/mofangchuxing/aska/dao/domain/RefundOrder.class
@@ -19,6 +20,7 @@ com/mofangchuxing/aska/dao/domain/AskaSplitrecord.class
 com/mofangchuxing/aska/dao/mapper/RefundOrderMapper.class
 com/mofangchuxing/aska/dao/mapper/AskaChannelcouponnosMapper.class
 com/mofangchuxing/aska/dao/domain/SysMenu.class
+com/mofangchuxing/aska/dao/domain/AskaPlatform.class
 com/mofangchuxing/aska/dao/mapper/AskaChannelsMapper.class
 com/mofangchuxing/aska/dao/domain/AskaCashrequest.class
 com/mofangchuxing/aska/dao/domain/AskaChannelcouponnos.class

+ 2 - 0
dao/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -11,9 +11,11 @@
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/domain/AskaChannels.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/domain/AskaAccounts.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/domain/AskaSplitrecord.java
+/Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/mapper/AskaPlatformMapper.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/mapper/RefundOrderMapper.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/domain/PayRequest.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/mapper/AskaChannelsMapper.java
+/Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/domain/AskaPlatform.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/mapper/PayRequestMapper.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/domain/AskaChannelcouponnos.java
 /Users/syl/Desktop/work/aska/dao/src/main/java/com/mofangchuxing/aska/dao/mapper/AskaCashrequestMapper.java

+ 18 - 0
domain/src/main/java/com/mofangchuxing/aska/domain/dto/CashDto.java

@@ -0,0 +1,18 @@
+package com.mofangchuxing.aska.domain.dto;
+
+import lombok.Data;
+
+/**
+ * @Author: syl
+ * @Date: 2023/11/7
+ * @Description:
+ */
+@Data
+public class CashDto extends BaseDto{
+
+    private boolean agree;
+
+    private Integer cashAmount;
+
+    private Integer cashOrderId;
+}

+ 2 - 0
domain/src/main/java/com/mofangchuxing/aska/domain/dto/RetailDto.java

@@ -41,4 +41,6 @@ public class RetailDto extends BaseDto{
     private String retailType;
 
     private String cashSplit;
+
+    private Integer cashAmount;
 }

+ 24 - 0
domain/src/main/java/com/mofangchuxing/aska/domain/vo/FinancialVo.java

@@ -0,0 +1,24 @@
+package com.mofangchuxing.aska.domain.vo;
+
+import lombok.Data;
+
+/**
+ * @Author: syl
+ * @Date: 2023/11/8
+ * @Description:
+ */
+@Data
+public class FinancialVo {
+
+    private Integer balance;
+
+    private Integer totalAccounting;
+
+    private Integer totalAmount;
+
+    private Integer totalChannelAmount;
+
+    private Integer totalRefund;
+
+    private Integer totalRetailAmount;
+}

二进制
domain/target/aska-domain-1.0.jar


二进制
domain/target/classes/com/mofangchuxing/aska/domain/dto/CashDto.class


二进制
domain/target/classes/com/mofangchuxing/aska/domain/dto/RetailDto.class


二进制
domain/target/classes/com/mofangchuxing/aska/domain/vo/FinancialVo.class


+ 2 - 0
domain/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -1,3 +1,4 @@
+com/mofangchuxing/aska/domain/dto/CashDto.class
 com/mofangchuxing/aska/domain/dto/BaseDto.class
 com/mofangchuxing/aska/domain/dto/RetailDto.class
 com/mofangchuxing/aska/domain/entity/SysMenuEntity.class
@@ -24,6 +25,7 @@ com/mofangchuxing/aska/domain/vo/AskaRetailsVo.class
 com/mofangchuxing/aska/domain/enums/ItemTypeEnum.class
 com/mofangchuxing/aska/domain/enums/DelayTypeEnum.class
 com/mofangchuxing/aska/domain/dto/ChannelCouponDto.class
+com/mofangchuxing/aska/domain/vo/FinancialVo.class
 com/mofangchuxing/aska/domain/PayRequestDto.class
 com/mofangchuxing/aska/domain/vo/WeiXinPlatformCredentialVO.class
 com/mofangchuxing/aska/domain/Constant.class

+ 2 - 0
domain/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -5,8 +5,10 @@
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/vo/PayRequestVo.java
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/enums/ResultEnum.java
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/PayRequestDto.java
+/Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/dto/CashDto.java
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/dto/ChannelCouponDto.java
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/vo/AskaChannelsVo.java
+/Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/vo/FinancialVo.java
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/entity/PlainCertificateItem.java
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/entity/SysMenuEntity.java
 /Users/syl/Desktop/work/aska/domain/src/main/java/com/mofangchuxing/aska/domain/enums/RecordTypeEnum.java

二进制
main/target/aska.jar


二进制
main/target/aska.jar.original


+ 13 - 0
service/src/main/java/com/mofangchuxing/aska/service/CashService.java

@@ -0,0 +1,13 @@
+package com.mofangchuxing.aska.service;
+
+import com.mofangchuxing.aska.domain.dto.CashDto;
+
+/**
+ * @Author: syl
+ * @Date: 2023/11/7
+ * @Description:
+ */
+public interface CashService {
+
+    void setCashResult(CashDto cashDto);
+}

+ 2 - 5
service/src/main/java/com/mofangchuxing/aska/service/ChannelService.java

@@ -4,10 +4,7 @@ import com.mofangchuxing.aska.dao.domain.AskaAccounts;
 import com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos;
 import com.mofangchuxing.aska.dao.domain.AskaChannels;
 import com.mofangchuxing.aska.dao.domain.AskaRetails;
-import com.mofangchuxing.aska.domain.dto.ChannelCouponDto;
-import com.mofangchuxing.aska.domain.dto.ChannelDto;
-import com.mofangchuxing.aska.domain.dto.ChannelNoDto;
-import com.mofangchuxing.aska.domain.dto.RetailDto;
+import com.mofangchuxing.aska.domain.dto.*;
 import com.mofangchuxing.aska.domain.utils.PageUtils;
 import com.mofangchuxing.aska.domain.vo.AskaChannelsVo;
 import com.mofangchuxing.aska.domain.vo.AskaRetailsVo;
@@ -43,7 +40,7 @@ public interface ChannelService {
 
     void addCashRequest(AskaAccounts askaAccounts, ChannelDto channelDto);
 
-    PageUtils getCashHistory(ChannelDto channelDto);
+    PageUtils getCashHistory(OrderDto orderDto);
 
     void setReceivingConfig(ChannelDto channelDto);
 

+ 13 - 0
service/src/main/java/com/mofangchuxing/aska/service/FinancialService.java

@@ -0,0 +1,13 @@
+package com.mofangchuxing.aska.service;
+
+import com.mofangchuxing.aska.domain.vo.FinancialVo;
+
+/**
+ * @Author: syl
+ * @Date: 2023/11/8
+ * @Description:
+ */
+public interface FinancialService {
+
+    FinancialVo getBalance();
+}

+ 4 - 0
service/src/main/java/com/mofangchuxing/aska/service/RetailService.java

@@ -1,6 +1,8 @@
 package com.mofangchuxing.aska.service;
 
+import com.mofangchuxing.aska.dao.domain.AskaAccounts;
 import com.mofangchuxing.aska.dao.domain.AskaRetails;
+import com.mofangchuxing.aska.domain.dto.ChannelDto;
 import com.mofangchuxing.aska.domain.dto.RetailDto;
 import com.mofangchuxing.aska.domain.utils.PageUtils;
 import com.mofangchuxing.aska.domain.vo.AskaRetailsVo;
@@ -29,4 +31,6 @@ public interface RetailService {
     AskaRetails getRetailDetail(RetailDto retailDto);
 
     AskaRetailsVo getBalance(RetailDto retailDto);
+
+    void addCashRequest(AskaAccounts askaAccounts, RetailDto retailDto);
 }

+ 32 - 0
service/src/main/java/com/mofangchuxing/aska/service/impl/CashServiceImpl.java

@@ -0,0 +1,32 @@
+package com.mofangchuxing.aska.service.impl;
+
+import com.mofangchuxing.aska.dao.domain.AskaCashrequest;
+import com.mofangchuxing.aska.dao.mapper.AskaCashrequestMapper;
+import com.mofangchuxing.aska.domain.dto.CashDto;
+import com.mofangchuxing.aska.service.CashService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author: syl
+ * @Date: 2023/11/7
+ * @Description:
+ */
+@Service
+@Slf4j
+public class CashServiceImpl implements CashService {
+
+    @Resource
+    private AskaCashrequestMapper askaCashrequestMapper;
+
+    @Override
+    public void setCashResult(CashDto cashDto) {
+        AskaCashrequest askaCashrequest = new AskaCashrequest();
+        askaCashrequest.setId(cashDto.getCashOrderId());
+        askaCashrequest.setAmount(cashDto.getCashAmount());
+        askaCashrequest.setStatus(cashDto.isAgree() ? "同意" : "拒绝");
+        askaCashrequestMapper.updateByPrimaryKeySelective(askaCashrequest);
+    }
+}

+ 6 - 3
service/src/main/java/com/mofangchuxing/aska/service/impl/ChannelServiceImpl.java

@@ -11,6 +11,7 @@ import com.mofangchuxing.aska.dao.mapper.AskaChannelsMapper;
 import com.mofangchuxing.aska.domain.dto.ChannelCouponDto;
 import com.mofangchuxing.aska.domain.dto.ChannelDto;
 import com.mofangchuxing.aska.domain.dto.ChannelNoDto;
+import com.mofangchuxing.aska.domain.dto.OrderDto;
 import com.mofangchuxing.aska.domain.utils.PageUtils;
 import com.mofangchuxing.aska.domain.vo.AskaChannelsVo;
 import com.mofangchuxing.aska.service.ChannelService;
@@ -19,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -135,13 +137,14 @@ public class ChannelServiceImpl implements ChannelService {
         askaCashrequest.setNote("");
         askaCashrequest.setUserId(askaAccounts.getId());
         askaCashrequest.setUserName(askaAccounts.getName());
+        askaCashrequest.setRequestTime(new Date());
         askaCashrequestMapper.insertSelective(askaCashrequest);
     }
 
     @Override
-    public PageUtils getCashHistory(ChannelDto channelDto) {
-        PageHelper.startPage(channelDto.getPageNum(), channelDto.getPageSize());
-        List<AskaCashrequest> cashrequestList = askaCashrequestMapper.getCashHistory(channelDto);
+    public PageUtils getCashHistory(OrderDto orderDto) {
+        PageHelper.startPage(orderDto.getPageNum(), orderDto.getPageSize());
+        List<AskaCashrequest> cashrequestList = askaCashrequestMapper.getCashHistory(orderDto);
         PageInfo<AskaCashrequest> pageInfo = new PageInfo<>(cashrequestList);
         PageUtils page = new PageUtils(pageInfo.getList(), (int) pageInfo.getTotal(), pageInfo.getPageSize(), pageInfo.getPageNum());
         return page;

+ 38 - 0
service/src/main/java/com/mofangchuxing/aska/service/impl/FinancialServiceImpl.java

@@ -0,0 +1,38 @@
+package com.mofangchuxing.aska.service.impl;
+
+import com.mofangchuxing.aska.dao.domain.AskaPlatform;
+import com.mofangchuxing.aska.dao.mapper.AskaPlatformMapper;
+import com.mofangchuxing.aska.domain.vo.FinancialVo;
+import com.mofangchuxing.aska.service.FinancialService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author: syl
+ * @Date: 2023/11/8
+ * @Description:
+ */
+@Service
+public class FinancialServiceImpl implements FinancialService {
+
+    @Resource
+    private AskaPlatformMapper askaPlatformMapper;
+
+    @Override
+    public FinancialVo getBalance() {
+        AskaPlatform askaPlatform = askaPlatformMapper.selectByPrimaryKey(1l);
+        FinancialVo financialVo = new FinancialVo();
+        financialVo.setTotalAmount(askaPlatform.getTotalIncome());
+        financialVo.setTotalRefund(askaPlatform.getTotalRefund());
+        Integer totalRetailAmount = askaPlatform.getTotalRetailSplit() + askaPlatform.getTotalRetailAccounting() - askaPlatform.getTotalRetailAccountingRefund();
+        financialVo.setTotalRetailAmount(totalRetailAmount);
+        Integer totalChannelAmount = askaPlatform.getTotalChannelSplit() + askaPlatform.getTotalChannelAccounting() - askaPlatform.getTotalChannelAccountingRefund();
+        financialVo.setTotalChannelAmount(totalChannelAmount);
+        Integer totalAccounting = askaPlatform.getTotalRetailAccounting() + askaPlatform.getTotalChannelAccounting()
+                - askaPlatform.getTotalRetailAccountingRefund() - askaPlatform.getTotalChannelAccountingRefund() - askaPlatform.getTotalCashOut();
+        financialVo.setTotalAccounting(totalAccounting);
+        financialVo.setBalance(askaPlatform.getBalance());
+        return financialVo;
+    }
+}

+ 5 - 2
service/src/main/java/com/mofangchuxing/aska/service/impl/OrderServiceImpl.java

@@ -58,7 +58,10 @@ public class OrderServiceImpl implements OrderService {
             String endTime = DateUtil.parse(orderDto.getEndTime(), "yyyy/MM/dd").toDateStr();
             orderDto.setEndTime(endTime);
         }
-
-        return null;
+        log.info("startTime = {}", orderDto.getStartTime());
+        List<Map<String,Object>> list = payRequestMapper.queryPayment(orderDto);
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(list);
+        PageUtils page = new PageUtils(pageInfo.getList(), (int) pageInfo.getTotal(), pageInfo.getPageSize(), pageInfo.getPageNum());
+        return page;
     }
 }

+ 29 - 0
service/src/main/java/com/mofangchuxing/aska/service/impl/RetailServiceImpl.java

@@ -3,8 +3,12 @@ package com.mofangchuxing.aska.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.mofangchuxing.aska.dao.domain.AskaAccounts;
+import com.mofangchuxing.aska.dao.domain.AskaCashrequest;
 import com.mofangchuxing.aska.dao.domain.AskaRetails;
+import com.mofangchuxing.aska.dao.mapper.AskaCashrequestMapper;
 import com.mofangchuxing.aska.dao.mapper.AskaRetailsMapper;
+import com.mofangchuxing.aska.domain.dto.ChannelDto;
 import com.mofangchuxing.aska.domain.dto.RetailDto;
 import com.mofangchuxing.aska.domain.utils.PageUtils;
 import com.mofangchuxing.aska.domain.vo.AskaRetailsVo;
@@ -14,7 +18,9 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Author: syl
@@ -26,6 +32,8 @@ public class RetailServiceImpl implements RetailService {
 
     @Resource
     private AskaRetailsMapper askaRetailsMapper;
+    @Resource
+    private AskaCashrequestMapper askaCashrequestMapper;
 
     @Override
     public AskaRetails addRetail(RetailDto retailDto) {
@@ -107,6 +115,27 @@ public class RetailServiceImpl implements RetailService {
         askaRetailsVo.setAccountType(askaRetails.getAccountType());
         askaRetailsVo.setBalance(askaRetails.getBalance());
         askaRetailsVo.setRelation(askaRetails.getRelation());
+        askaRetailsVo.setTotalSplit(askaRetails.getCashSplit() + askaRetails.getRealtimeSplit());
+        askaRetailsVo.setTotalRefund((askaRetails.getAccountingRefund() + askaRetails.getSplitRefund()) * -1);
+        askaRetailsVo.setTotalIncome(askaRetails.getAccountingIncome() + askaRetails.getSplitIncome());
+        askaRetailsVo.setTotalCashOut(askaRetails.getCashOut());
         return askaRetailsVo;
     }
+
+    @Override
+    public void addCashRequest(AskaAccounts askaAccounts, RetailDto retailDto) {
+        AskaRetails askaRetails = askaRetailsMapper.selectByPrimaryKey(retailDto.getRetailId());
+        AskaCashrequest askaCashrequest = new AskaCashrequest();
+        askaCashrequest.setPartnerId(askaRetails.getId());
+        askaCashrequest.setPartnerType("retail");
+        askaCashrequest.setPartnerName(askaRetails.getName());
+        askaCashrequest.setRequestAmount(retailDto.getCashAmount());
+        askaCashrequest.setStatus("申请");
+        askaCashrequest.setAmount(0);
+        askaCashrequest.setNote("");
+        askaCashrequest.setUserId(askaAccounts.getId());
+        askaCashrequest.setUserName(askaAccounts.getName());
+        askaCashrequest.setRequestTime(new Date());
+        askaCashrequestMapper.insertSelective(askaCashrequest);
+    }
 }

二进制
service/target/aska-service-1.0.jar


二进制
service/target/classes/com/mofangchuxing/aska/service/CashService.class


二进制
service/target/classes/com/mofangchuxing/aska/service/ChannelService.class


二进制
service/target/classes/com/mofangchuxing/aska/service/FinancialService.class


二进制
service/target/classes/com/mofangchuxing/aska/service/OrderService.class


二进制
service/target/classes/com/mofangchuxing/aska/service/RetailService.class


二进制
service/target/classes/com/mofangchuxing/aska/service/impl/CashServiceImpl.class


二进制
service/target/classes/com/mofangchuxing/aska/service/impl/ChannelServiceImpl.class


二进制
service/target/classes/com/mofangchuxing/aska/service/impl/FinancialServiceImpl.class


二进制
service/target/classes/com/mofangchuxing/aska/service/impl/OrderServiceImpl.class


二进制
service/target/classes/com/mofangchuxing/aska/service/impl/RetailServiceImpl.class


+ 4 - 0
service/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -7,6 +7,7 @@ com/mofangchuxing/aska/service/common/XMLUtil.class
 com/mofangchuxing/aska/service/CouponService.class
 com/mofangchuxing/aska/service/impl/ProfitSharingServiceImpl.class
 com/mofangchuxing/aska/service/impl/RetailServiceImpl.class
+com/mofangchuxing/aska/service/FinancialService.class
 com/mofangchuxing/aska/service/common/PayCommonUtil.class
 com/mofangchuxing/aska/service/common/MyX509TrustManager.class
 com/mofangchuxing/aska/service/PayService.class
@@ -24,5 +25,8 @@ com/mofangchuxing/aska/service/ProfitSharingService.class
 com/mofangchuxing/aska/service/UserService.class
 com/mofangchuxing/aska/service/common/GenerateCodeUtil.class
 com/mofangchuxing/aska/service/ChannelService.class
+com/mofangchuxing/aska/service/CashService.class
+com/mofangchuxing/aska/service/impl/CashServiceImpl.class
 com/mofangchuxing/aska/service/utils/WxPayV3Utils.class
 com/mofangchuxing/aska/service/common/DelayNotifyComponent$1.class
+com/mofangchuxing/aska/service/impl/FinancialServiceImpl.class

+ 4 - 0
service/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -10,7 +10,10 @@
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/config/RedissonConfig.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/ProfitSharingService.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/impl/OrderServiceImpl.java
+/Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/impl/CashServiceImpl.java
+/Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/CashService.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/impl/RetailServiceImpl.java
+/Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/FinancialService.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/common/MD5Util.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/impl/ProfitSharingServiceImpl.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/common/ClientCustomSSL.java
@@ -23,4 +26,5 @@
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/common/DelayNotifyComponent.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/PayService.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/common/MyX509TrustManager.java
+/Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/impl/FinancialServiceImpl.java
 /Users/syl/Desktop/work/aska/service/src/main/java/com/mofangchuxing/aska/service/impl/ChannelServiceImpl.java