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
e60a1dbc
Commit
e60a1dbc
authored
Dec 31, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端对接问题修复24
parent
b79de719
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyController.java
+3
-2
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyService.java
+2
-3
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyServiceImpl.java
+16
-5
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyController.java
View file @
e60a1dbc
...
...
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* policy接口
...
...
@@ -220,12 +221,12 @@ public class ApiPolicyController {
*/
@GetMapping
(
"/get_policy_product_info"
)
@Operation
(
summary
=
"获取保单产品信息"
)
public
Result
<
Object
>
getPolicyProductInfo
(
@RequestParam
(
"productLaunchBizId"
)
List
<
String
>
productLaunchBizId
)
{
public
Result
<
List
<
Map
<
String
,
Object
>>
>
getPolicyProductInfo
(
@RequestParam
(
"productLaunchBizId"
)
List
<
String
>
productLaunchBizId
)
{
if
(
productLaunchBizId
==
null
)
{
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
ResultCode
.
PARAMS_ERROR
.
getMessage
());
}
// 查询
Object
productLaunchPageResponse
=
policyService
.
getPolicyProductInfo
(
productLaunchBizId
);
List
<
Map
<
String
,
Object
>>
productLaunchPageResponse
=
policyService
.
getPolicyProductInfo
(
productLaunchBizId
);
// 获取封装类
return
Result
.
success
(
productLaunchPageResponse
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyService.java
View file @
e60a1dbc
...
...
@@ -6,9 +6,8 @@ import com.yd.csf.service.dto.*;
import
com.yd.csf.service.model.Policy
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yd.csf.service.vo.PolicyVO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author Zhang Jianan
...
...
@@ -29,5 +28,5 @@ public interface PolicyService extends IService<Policy> {
List
<
QueryPolicyAndBrokerDto
>
queryPolicyBrokerList
(
String
policyNo
);
List
<
Object
>
getPolicyProductInfo
(
List
<
String
>
productLaunchBizIdList
);
List
<
Map
<
String
,
Object
>
>
getPolicyProductInfo
(
List
<
String
>
productLaunchBizIdList
);
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyServiceImpl.java
View file @
e60a1dbc
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.lang.TypeReference
;
import
cn.hutool.json.JSONUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -178,14 +179,24 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyMapper, Policy>
}
@Override
public
List
<
Object
>
getPolicyProductInfo
(
List
<
String
>
productLaunchBizIdList
)
{
public
List
<
Map
<
String
,
Object
>
>
getPolicyProductInfo
(
List
<
String
>
productLaunchBizIdList
)
{
ApiRelProjectProductLaunchPageRequest
pageRequest
=
new
ApiRelProjectProductLaunchPageRequest
();
pageRequest
.
setProductLaunchBizIdList
(
productLaunchBizIdList
);
Result
<
IPage
<
ApiRelProjectProductLaunchPageResponse
>>
result
=
apiRelProjectProductLaunchFeignClient
.
page
(
pageRequest
);
if
(
result
==
null
||
ObjectUtils
.
isEmpty
(
result
.
getData
())
||
ObjectUtils
.
isEmpty
(
result
.
getData
().
getRecords
()))
{
// 修改为使用Result<Object>来接收
Result
result
=
apiRelProjectProductLaunchFeignClient
.
page
(
pageRequest
);
if
(
result
==
null
||
ObjectUtils
.
isEmpty
(
result
.
getData
()))
{
return
CollUtil
.
newArrayList
();
}
// 使用JSON工具手动转换
String
jsonData
=
JSONUtil
.
toJsonStr
(
result
.
getData
());
IPage
<
ApiRelProjectProductLaunchPageResponse
>
pageData
=
JSONUtil
.
toBean
(
jsonData
,
new
TypeReference
<
IPage
<
ApiRelProjectProductLaunchPageResponse
>>()
{},
false
);
if
(
ObjectUtils
.
isEmpty
(
pageData
.
getRecords
()))
{
return
CollUtil
.
newArrayList
();
}
List
<
ApiRelProjectProductLaunchPageResponse
>
productLaunchPageResponseList
=
result
.
getData
()
.
getRecords
();
List
<
ApiRelProjectProductLaunchPageResponse
>
productLaunchPageResponseList
=
pageData
.
getRecords
();
List
<
Map
<
String
,
Object
>>
policyProductInfoList
=
CollUtil
.
newArrayList
();
for
(
ApiRelProjectProductLaunchPageResponse
response
:
productLaunchPageResponseList
)
{
...
...
@@ -198,7 +209,7 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyMapper, Policy>
getInfo
(
apiAttributeSettingDtoList
,
infoMap
);
policyProductInfoList
.
add
(
infoMap
);
}
return
null
;
return
policyProductInfoList
;
}
/**
...
...
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