Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-strategy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bc90a4f4
authored
Jan 27, 2026
by
杨卫
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:订单统计默认返回null
1 parent
136e1e04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyDetailService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyDetailService.java
View file @
bc90a4f
package
cn
.
com
.
glsx
.
dj
.
strategy
.
service
;
import
cn.com.glsx.dj.peanalysis.dto.analysis.StrategyOrderStatisticsDTO
;
import
cn.com.glsx.dj.peanalysis.dto.analysis.StrategyOrderStatisticsRespDTO
;
import
cn.com.glsx.dj.peanalysis.enums.BusinessTypeEnum
;
import
cn.com.glsx.dj.peanalysis.remote.BiAnalyseBackgroundRemote
;
import
cn.com.glsx.dj.smartcarlife.enums.SceneTypeEnum
;
...
...
@@ -37,7 +36,6 @@ import org.springframework.stereotype.Service;
import
tk.mybatis.mapper.entity.Example
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
...
...
@@ -120,14 +118,17 @@ public class StrategyDetailService {
// 订单统计
StrategyOrderStatisticsDTO
strategyOrderStatisticsDTO
=
strategyOrderStatisticsBuilder
(
strategyInfo
,
strategyByValue
);
log
.
info
(
"strategyId: {} order statistics rpc strategyOrderStatisticsDTO:{}"
,
strategyInfo
.
getId
(),
strategyOrderStatisticsDTO
);
RpcResponse
<
StrategyOrderStatisticsRespDTO
>
strategyOrderInfoResponse
=
biAnalyseBackgroundRemote
.
getStrategyOrderInfo
(
strategyOrderStatisticsDTO
);
/*
RpcResponse<StrategyOrderStatisticsRespDTO> strategyOrderInfoResponse = biAnalyseBackgroundRemote.getStrategyOrderInfo(strategyOrderStatisticsDTO);
if (strategyOrderInfoResponse.isFailed()) {
throw new RpcServiceException(strategyOrderInfoResponse.getError(), strategyOrderInfoResponse.getMessage());
}
StrategyOrderStatisticsRespDTO strategyOrderStatisticsRespDTO = Optional.ofNullable(strategyOrderInfoResponse.getResult()).orElseGet(StrategyOrderStatisticsRespDTO::new);
result.setOrderTotalCount(strategyOrderStatisticsRespDTO.getOrderCount());
result.setOrderTotalAmount(Optional.ofNullable(strategyOrderStatisticsRespDTO.getTotalPrice()).orElse(BigDecimal.ZERO).setScale(2, RoundingMode.HALF_UP));
result
.
setDiscountTotalAmount
(
Optional
.
ofNullable
(
strategyOrderStatisticsRespDTO
.
getDiscountPrice
()).
orElse
(
BigDecimal
.
ZERO
).
setScale
(
2
,
RoundingMode
.
HALF_UP
));
result.setDiscountTotalAmount(Optional.ofNullable(strategyOrderStatisticsRespDTO.getDiscountPrice()).orElse(BigDecimal.ZERO).setScale(2, RoundingMode.HALF_UP));*/
result
.
setOrderTotalCount
(
null
);
result
.
setOrderTotalAmount
(
null
);
result
.
setDiscountTotalAmount
(
null
);
break
;
default
:
throw
new
RpcServiceException
(
StrategyErrorEnum
.
STRATEGY_TYPE_NOT_SUPPORTED
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment