Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
6f993f22
Commit
6f993f22
authored
Mar 11, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成预计发佣记录是查询出账币种、默认结算汇率2
parent
950aeb25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
2 deletions
+58
-2
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiExpectedFortuneService.java
+3
-2
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+0
-0
yd-csf-service/src/main/java/com/yd/csf/service/helper/FeignResultHelper.java
+55
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiExpectedFortuneService.java
View file @
6f993f22
...
@@ -15,11 +15,11 @@ import com.yd.csf.service.dto.QueryPolicyAndBrokerDto;
...
@@ -15,11 +15,11 @@ import com.yd.csf.service.dto.QueryPolicyAndBrokerDto;
import
com.yd.csf.service.model.CommissionRuleBinding
;
import
com.yd.csf.service.model.CommissionRuleBinding
;
import
com.yd.csf.service.model.ExpectedFortune
;
import
com.yd.csf.service.model.ExpectedFortune
;
import
com.yd.csf.service.vo.ExpectedFortuneStatisticsVO
;
import
com.yd.csf.service.vo.ExpectedFortuneStatisticsVO
;
import
com.yd.product.feign.response.announcementcommissionratio.ApiAnnouncementCommissionRatioListResponse
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
public
interface
ApiExpectedFortuneService
{
public
interface
ApiExpectedFortuneService
{
Result
<
ApiGenerateExpectedFortuneResponse
>
generate
(
ApiGenerateExpectedFortuneRequest
request
);
Result
<
ApiGenerateExpectedFortuneResponse
>
generate
(
ApiGenerateExpectedFortuneRequest
request
);
...
@@ -37,7 +37,8 @@ public interface ApiExpectedFortuneService {
...
@@ -37,7 +37,8 @@ public interface ApiExpectedFortuneService {
@Async
(
"asyncQueryExecutor"
)
@Async
(
"asyncQueryExecutor"
)
Result
execute
(
List
<
QueryPolicyAndBrokerDto
>
queryPolicyAndBrokerDtoList
,
Result
execute
(
List
<
QueryPolicyAndBrokerDto
>
queryPolicyAndBrokerDtoList
,
List
<
CommissionRuleBinding
>
commissionRuleBindingList
,
List
<
CommissionRuleBinding
>
commissionRuleBindingList
,
String
policyNo
);
String
policyNo
,
List
<
ApiAnnouncementCommissionRatioListResponse
>
announcementRatioList
);
/**
/**
* 同步执行预计发佣生成
* 同步执行预计发佣生成
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
6f993f22
This diff is collapsed.
Click to expand it.
yd-csf-service/src/main/java/com/yd/csf/service/helper/FeignResultHelper.java
0 → 100644
View file @
6f993f22
package
com
.
yd
.
csf
.
service
.
helper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yd.common.enums.ResultCode
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.result.Result
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
public
class
FeignResultHelper
{
private
final
ObjectMapper
objectMapper
=
new
ObjectMapper
();
public
<
T
>
T
extractData
(
Result
<
T
>
result
)
{
if
(
result
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"远程调用返回null"
);
}
if
(
result
.
getCode
()
!=
ResultCode
.
SUCCESS
.
getCode
())
{
throw
new
BusinessException
(
result
.
getCode
(),
result
.
getMsg
());
}
return
result
.
getData
();
}
public
<
T
>
List
<
T
>
extractListData
(
Result
<?>
result
,
Class
<
T
>
elementType
)
{
if
(
result
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"远程调用返回null"
);
}
if
(
result
.
getCode
()
!=
ResultCode
.
SUCCESS
.
getCode
())
{
throw
new
BusinessException
(
result
.
getCode
(),
result
.
getMsg
());
}
Object
data
=
result
.
getData
();
if
(
data
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"远程调用 result.getData() 为 null"
);
}
if
(
data
instanceof
List
)
{
if
(((
List
<?>)
data
).
isEmpty
())
{
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"远程调用 result.getData() 为 []"
);
}
return
objectMapper
.
convertValue
(
data
,
objectMapper
.
getTypeFactory
().
constructCollectionType
(
List
.
class
,
elementType
)
);
}
else
{
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"返回数据类型错误"
);
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment