From 8a52084596fa59c005217d3e2edae35dac315002 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 24 七月 2021 13:08:13 +0800
Subject: [PATCH] 优化 查询用户名称错误bug
---
service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/impl/ComputeFeeDiscountBMOImpl.java | 56 ++++++++++++++++++++------------------------------------
1 files changed, 20 insertions(+), 36 deletions(-)
diff --git a/service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/impl/ComputeFeeDiscountBMOImpl.java b/service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/impl/ComputeFeeDiscountBMOImpl.java
old mode 100644
new mode 100755
index 091c177..d1545b5
--- a/service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/impl/ComputeFeeDiscountBMOImpl.java
+++ b/service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/impl/ComputeFeeDiscountBMOImpl.java
@@ -1,28 +1,23 @@
package com.java110.fee.bmo.feeDiscountRuleSpec.impl;
-import com.java110.dto.fee.FeeDto;
-import com.java110.dto.payFeeConfigDiscount.PayFeeConfigDiscountDto;
+import com.java110.dto.fee.FeeDetailDto;
+import com.java110.dto.feeDiscount.ComputeDiscountDto;
import com.java110.fee.bmo.feeDiscountRuleSpec.IComputeFeeDiscountBMO;
-import com.java110.intf.fee.IFeeInnerServiceSMO;
-import com.java110.intf.fee.IPayFeeConfigDiscountInnerServiceSMO;
-import com.java110.utils.util.Assert;
+import com.java110.fee.smo.impl.FeeDiscountInnerServiceSMOImpl;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
import java.util.List;
@Service("computeFeeDiscountBMOImpl")
public class ComputeFeeDiscountBMOImpl implements IComputeFeeDiscountBMO {
-
@Autowired
- private IFeeInnerServiceSMO feeInnerServiceSMOImpl;
-
- @Autowired
- private IPayFeeConfigDiscountInnerServiceSMO payFeeConfigDiscountInnerServiceSMOImpl;
-
+ private FeeDiscountInnerServiceSMOImpl feeDiscountInnerServiceSMOImpl;
/**
* 璁$畻鎶樻墸
@@ -35,30 +30,19 @@
* @return
*/
@Override
- public ResponseEntity<String> compute(String feeId, String communityId, double cycles, int page, int row) {
-
- FeeDto feeDto = new FeeDto();
- feeDto.setFeeId(feeId);
- feeDto.setCommunityId(communityId);
- feeDto.setState(FeeDto.STATE_DOING);
- List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);
- Assert.listOnlyOne(feeDtos, "璐圭敤涓嶅瓨鍦�");
-
- PayFeeConfigDiscountDto payFeeConfigDiscountDto = new PayFeeConfigDiscountDto();
- payFeeConfigDiscountDto.setConfigId(feeDtos.get(0).getConfigId());
- payFeeConfigDiscountDto.setCommunityId(communityId);
- List<PayFeeConfigDiscountDto> payFeeConfigDiscountDtos =
- payFeeConfigDiscountInnerServiceSMOImpl.queryPayFeeConfigDiscounts(payFeeConfigDiscountDto);
-
- if (payFeeConfigDiscountDtos == null || payFeeConfigDiscountDtos.size() < 1) {
- return ResultVo.success();
- }
-
-
- for(PayFeeConfigDiscountDto tmpPayFeeConfigDiscountDto : payFeeConfigDiscountDtos){
-
- }
-
- return null;
+ public ResponseEntity<String> compute(String feeId, String communityId, double cycles, String payerObjId, String payerObjType, String endTime, int page, int row) throws ParseException {
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ FeeDetailDto feeDetailDto = new FeeDetailDto();
+ feeDetailDto.setCommunityId(communityId);
+ feeDetailDto.setFeeId(feeId);
+ feeDetailDto.setCycles(cycles + "");
+ feeDetailDto.setPayerObjId(payerObjId);
+ feeDetailDto.setPayerObjType(payerObjType);
+ //缂磋垂寮�濮嬫椂闂翠负涓婃湀鍒版湡鏃堕棿
+ feeDetailDto.setStartTime(simpleDateFormat.parse(endTime));
+ feeDetailDto.setRow(row);
+ feeDetailDto.setPage(page);
+ List<ComputeDiscountDto> computeDiscountDtos = feeDiscountInnerServiceSMOImpl.computeDiscount(feeDetailDto);
+ return ResultVo.createResponseEntity(computeDiscountDtos);
}
}
--
Gitblit v1.8.0