Home
Explore
Information
Event
License
Tool
软件代码质量检测云服务
持续集成与部署云服务
社区个性化内容推荐服务
贡献审阅人推荐服务
群体化学习服务
重睛鸟代码扫描工具
Sign in
Sign up
Fetch the repository succeeded.
Watch
64
Star
5.3K
Fork
411
nageoffer
/
congomall
Fork this repository
Loading
Cancel
Confirm
Code
Issues
63
Pull Requests
5
Insights
Update failed. Please try again later!
Issues
/
详情
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
支付服务代码逻辑顺序问题
Backlog
#I9HK5T
Sheamus
Opened this issue
2024-04-17 20:18
PayServiceImpl 中的 ```java @Override public PayRespDTO commonPay(PayRequest requestParam) { /** * {@link AliPayNativeHandler} */ // 策略模式:通过策略模式封装支付渠道和支付场景,用户支付时动态选择对应的支付组件 PayResponse result = abstractStrategyChoose.chooseAndExecuteResp(requestParam.buildMark(), requestParam); payRepository.createPay(BeanUtil.convert(requestParam, Pay.class)); return BeanUtil.convert(result, PayRespDTO.class); } ``` 调用三方接口的代码和存储的代码顺序应该换一下位置,系统的一致性更容易得到保证。 tips: 如果本身项目只是为了演示如何写 DDD 的代码可以忽略,很多一致性的代码还是缺少的。
PayServiceImpl 中的 ```java @Override public PayRespDTO commonPay(PayRequest requestParam) { /** * {@link AliPayNativeHandler} */ // 策略模式:通过策略模式封装支付渠道和支付场景,用户支付时动态选择对应的支付组件 PayResponse result = abstractStrategyChoose.chooseAndExecuteResp(requestParam.buildMark(), requestParam); payRepository.createPay(BeanUtil.convert(requestParam, Pay.class)); return BeanUtil.convert(result, PayRespDTO.class); } ``` 调用三方接口的代码和存储的代码顺序应该换一下位置,系统的一致性更容易得到保证。 tips: 如果本身项目只是为了演示如何写 DDD 的代码可以忽略,很多一致性的代码还是缺少的。
Comments (
0
)
Sheamus
created
任务
Sign in
to comment
Status
Backlog
Backlog
Doing
Done
Closed
Assignees
Not set
Labels
Not set
Label settings
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
No related branch
main
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(1)