From 0b3ff378a9faaf9d7a4831b7f0de67378fe0dfea Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:20:15 +0800
Subject: [PATCH] optimize 统计
---
service-fee/src/main/java/com/java110/fee/api/FeeApi.java | 43 ++++++++++++++-----------------------------
1 files changed, 14 insertions(+), 29 deletions(-)
diff --git a/service-fee/src/main/java/com/java110/fee/api/FeeApi.java b/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
index c6cfbcd..2bf9282 100755
--- a/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
+++ b/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
@@ -4,6 +4,7 @@
import com.java110.core.base.controller.BaseController;
import com.java110.core.context.BusinessServiceDataFlow;
import com.java110.core.factory.DataTransactionFactory;
+import com.java110.core.log.LoggerFactory;
import com.java110.dto.fee.FeeAttrDto;
import com.java110.dto.fee.FeeDto;
import com.java110.fee.bmo.*;
@@ -14,7 +15,6 @@
import com.java110.utils.util.Assert;
import com.java110.utils.util.StringUtil;
import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@@ -171,13 +171,21 @@
* @path /app/feeApi/listOweFees
*/
@RequestMapping(value = "/listOweFees", method = RequestMethod.GET)
- public ResponseEntity<String> listOweFees(
- @RequestParam(value = "payObjId") String payObjId,
- @RequestParam(value = "payObjType") String payObjType,
- @RequestParam(value = "communityId") String communityId) {
+ public ResponseEntity<String> listOweFees(@RequestParam(value = "payObjId", required = false) String payObjId,
+ @RequestParam(value = "payObjType", required = false) String payObjType,
+ @RequestParam(value = "ownerId", required = false) String ownerId,
+ @RequestParam(value = "communityId") String communityId) {
+ if (StringUtil.isEmpty(payObjId) && StringUtil.isEmpty(ownerId)) {
+ throw new IllegalArgumentException("璐圭敤瀵硅薄鎴栬�呬笟涓讳笉鑳介兘涓虹┖");
+ }
FeeDto feeDto = new FeeDto();
- feeDto.setPayerObjId(payObjId);
+ if(payObjId.contains(",")){
+ feeDto.setPayerObjIds(payObjId.split(","));
+ }else {
+ feeDto.setPayerObjId(payObjId);
+ }
feeDto.setPayerObjType(payObjType);
+ feeDto.setOwnerId(ownerId);
feeDto.setCommunityId(communityId);
return queryOweFeeImpl.query(feeDto);
}
@@ -199,29 +207,6 @@
feeDto.setPayerObjType(FeeDto.PAYER_OBJ_TYPE_ROOM);
feeDto.setCommunityId(communityId);
return queryOweFeeImpl.querys(feeDto);
- }
-
- /**
- * 鏌ヨ娆犺垂璐圭敤
- *
- * @param feeId 璐圭敤ID
- * @param communityId 灏忓尯ID
- * @param cycle 鍛ㄦ湡
- * @return
- * @path /app/feeApi/listFeeObj
- */
- @RequestMapping(value = "/listFeeObj", method = RequestMethod.GET)
- public ResponseEntity<String> listFeeObj(
- @RequestParam(value = "feeId") String feeId,
- @RequestParam(value = "cycle", required = false) String cycle,
- @RequestParam(value = "communityId") String communityId) {
- FeeDto feeDto = new FeeDto();
- feeDto.setFeeId(feeId);
- feeDto.setCommunityId(communityId);
- if (!StringUtil.isEmpty(cycle)) {
- feeDto.setCycle(cycle);
- }
- return queryOweFeeImpl.listFeeObj(feeDto);
}
--
Gitblit v1.8.0