From 7958f1dddb8a7f4e70d232b07a7703955ecedae0 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期六, 26 八月 2023 12:45:33 +0800
Subject: [PATCH] 优化diamante
---
service-fee/src/main/java/com/java110/fee/cmd/feeConfig/ListFeeConfigsCmd.java | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/service-fee/src/main/java/com/java110/fee/cmd/feeConfig/ListFeeConfigsCmd.java b/service-fee/src/main/java/com/java110/fee/cmd/feeConfig/ListFeeConfigsCmd.java
index 9f78b1e..d9c99f4 100644
--- a/service-fee/src/main/java/com/java110/fee/cmd/feeConfig/ListFeeConfigsCmd.java
+++ b/service-fee/src/main/java/com/java110/fee/cmd/feeConfig/ListFeeConfigsCmd.java
@@ -31,35 +31,35 @@
public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
super.validatePageInfo(reqJson);
Assert.hasKeyAndValue(reqJson, "communityId", "鏈寘鍚皬鍖篒D");
-
}
@Override
public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
FeeConfigDto feeConfigDto = BeanConvertUtil.covertBean(reqJson, FeeConfigDto.class);
-
- if(!StringUtil.isEmpty(reqJson.getString("isFlag")) && reqJson.getString("isFlag").equals("0")){
+ if (!StringUtil.isEmpty(reqJson.getString("isFlag")) && reqJson.getString("isFlag").equals("0")) {
feeConfigDto.setPage(PageDto.DEFAULT_PAGE);
}
-
int count = feeConfigInnerServiceSMOImpl.queryFeeConfigsCount(feeConfigDto);
-
List<ApiFeeConfigDataVo> feeConfigs = null;
-
if (count > 0) {
feeConfigs = BeanConvertUtil.covertBeanList(feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto), ApiFeeConfigDataVo.class);
+ //澶勭悊 灏忔暟鐐瑰悗鏃犳晥鐨�0
+ for (ApiFeeConfigDataVo feeConfig : feeConfigs) {
+ if (!StringUtil.isEmpty(feeConfig.getAdditionalAmount())) {
+ feeConfig.setAdditionalAmount(Double.parseDouble(feeConfig.getAdditionalAmount()) + "");
+ }
+ if (!StringUtil.isEmpty(feeConfig.getSquarePrice())) {
+ feeConfig.setSquarePrice(Double.parseDouble(feeConfig.getSquarePrice()) + "");
+ }
+ }
} else {
feeConfigs = new ArrayList<>();
}
-
ApiFeeConfigVo apiFeeConfigVo = new ApiFeeConfigVo();
-
apiFeeConfigVo.setTotal(count);
apiFeeConfigVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row")));
apiFeeConfigVo.setFeeConfigs(feeConfigs);
-
ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiFeeConfigVo), HttpStatus.OK);
-
cmdDataFlowContext.setResponseEntity(responseEntity);
}
}
--
Gitblit v1.8.0