diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java index 99e54670..88c451db 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java @@ -38,11 +38,19 @@ public class XhpcClearingCheckoutController extends BaseController { String status, String operatorId, String startTime, - String endTime) { + String endTime, + String tenantId) { LoginUser loginUser = logUserUtils.getLogUser(request); startPage(); + if(StringUtils.isEmpty(tenantId)){ + tenantId = loginUser.getTenantId(); + } + if("-1".equals(tenantId)){ + tenantId = ""; + } + Map params = new HashMap<>(); - params.put("tenantId", loginUser.getTenantId()); + params.put("tenantId", tenantId); params.put("status", status); params.put("operatorId", operatorId); params.put("startTime", startTime); @@ -51,6 +59,18 @@ public class XhpcClearingCheckoutController extends BaseController { } + @GetMapping("/getCheckoutPage") + public TableDataInfo getCheckoutPage(String operatorId, + String tenantId) { + + startPage(); + Map params = new HashMap<>(); + params.put("tenantId", tenantId); + params.put("operatorId", operatorId); + return getDataTable(checkoutService.getCheckoutPage(params)); + } + + @GetMapping("/detail") public R getDetail(@RequestParam("checkoutId") Long checkoutId) { return R.ok(checkoutService.getDomainByPk(checkoutId)); diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java index 04caa751..4ef730f5 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java @@ -99,12 +99,11 @@ public class XhpcClearingHistoryOrderController extends BaseController { LoginUser loginUser = logUserUtils.getLogUser(request); startPage(); Map params = new HashMap<>(); - params.put("tenantId", loginUser.getTenantId()); + if(StringUtils.isEmpty(operatorId)){ operatorId = loginUser.getSysUser().getOperatorId() + ""; } params.put("operatorId", operatorId); - if(params.get("operatorId") == null || StringUtils.isEmpty(params.get("operatorId").toString()) || "null".equals(params.get("operatorId").toString())){ throw new CustomException("运营商ID错误,请登陆运营商账户再试"); } @@ -117,12 +116,12 @@ public class XhpcClearingHistoryOrderController extends BaseController { LoginUser loginUser = logUserUtils.getLogUser(request); Map params = new HashMap<>(); - params.put("tenantId", loginUser.getTenantId()); + if(StringUtils.isEmpty(operatorId)){ operatorId = loginUser.getSysUser().getOperatorId() + ""; } - params.put("operatorId", operatorId); + params.put("operatorId", operatorId); if(params.get("operatorId") == null || StringUtils.isEmpty(params.get("operatorId").toString()) || "null".equals(params.get("operatorId").toString())){ throw new CustomException("运营商ID错误,请登陆运营商账户再试"); } diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcClearingCheckoutDomain.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcClearingCheckoutDomain.java index 3603fe9d..a2b44f4c 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcClearingCheckoutDomain.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcClearingCheckoutDomain.java @@ -97,5 +97,7 @@ public class XhpcClearingCheckoutDomain implements Serializable { private String clearingOrderIds; + private String tenantName; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java index 0ddf3d69..a354e424 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java @@ -19,13 +19,17 @@ public interface XhpcClearingCheckoutMapper { List selectByParams(@Param("params") Map params); + + List> selectCheckoutMapByParams(@Param("params") Map params); + + int deleteLogicByPrimaryKey(Long clearingCheckoutId); boolean checkByPrimaryKey(XhpcClearingCheckoutDomain domain); boolean updateStatusByPrimaryKey(XhpcClearingCheckoutDomain domain); - BigDecimal selectAmountByStatus(@Param("tenantId")String tenantId, @Param("operatorId")String operatorId, @Param("status")Integer status); + BigDecimal selectAmountByStatus(@Param("operatorId")String operatorId, @Param("status")Integer status); List selectOrderMapByCheckoutIds(@Param("checkoutIds")String checkoutIds); diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/XhpcClearingCheckoutService.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/XhpcClearingCheckoutService.java index bf5019e0..904ba326 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/XhpcClearingCheckoutService.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/XhpcClearingCheckoutService.java @@ -12,6 +12,8 @@ public interface XhpcClearingCheckoutService { List getPage(Map params); + List> getCheckoutPage(Map params); + XhpcClearingCheckoutDomain getDomainByPk(Long checkoutId); Map getTmpCheckoutData(Long operatorId); diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java index 5314305a..a5cfda9f 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java @@ -73,6 +73,11 @@ public class XhpcClearingCheckoutServiceImpl extends BaseService implements Xhpc return checkoutMapper.selectByParams(params); } + @Override + public List> getCheckoutPage(Map params){ + return checkoutMapper.selectCheckoutMapByParams(params); + } + @Override public Map getTmpCheckoutData(Long operatorId) { XhpcClearingBankDomain bankDomain = bankMapper.selectOneByOperatorId(operatorId.toString()); diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingHistoryOrderServiceImpl.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingHistoryOrderServiceImpl.java index 77d217c5..82d8c8c6 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingHistoryOrderServiceImpl.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingHistoryOrderServiceImpl.java @@ -138,7 +138,6 @@ public class XhpcClearingHistoryOrderServiceImpl implements XhpcClearingHistoryO public Map getOperatorData(Map params) { String operatorId = params.get("operatorId").toString(); - String tenantId = params.get("tenantId").toString(); Map bankDomain = bankMapper.selectOneMapByOperatorId(operatorId); // 待清分金额 @@ -148,10 +147,10 @@ public class XhpcClearingHistoryOrderServiceImpl implements XhpcClearingHistoryO BigDecimal checkedAmount = historyOrderMapper.selectCheckedAmount(operatorId); // 已提现金额 - BigDecimal cashedAmount = checkoutMapper.selectAmountByStatus(tenantId, operatorId, 6); + BigDecimal cashedAmount = checkoutMapper.selectAmountByStatus(operatorId, 6); // 提现中金额 - BigDecimal cashingAmount = checkoutMapper.selectAmountByStatus(tenantId, operatorId, 1); + BigDecimal cashingAmount = checkoutMapper.selectAmountByStatus(operatorId, 1); // 可提现金额 Map cashMap = historyOrderMapper.selectCashAmount(operatorId); diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml index ec877b03..8aa9a9e8 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml @@ -37,9 +37,12 @@ + + + + diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcHistoryOrderMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcHistoryOrderMapper.xml index 2940bb49..c62cd804 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcHistoryOrderMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcHistoryOrderMapper.xml @@ -88,7 +88,7 @@