Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-product
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-product
Commits
9d5691e2
Commit
9d5691e2
authored
Jan 19, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
502f9287
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
1 deletions
+88
-1
yd-product-api/src/main/java/com/yd/product/api/service/impl/ApiRelProjectProductLaunchServiceImpl.java
+55
-0
yd-product-feign/src/main/java/com/yd/product/feign/request/productlaunch/ApiProductLaunchParameterPageRequest.java
+17
-0
yd-product-service/src/main/java/com/yd/product/service/dto/AttributeSettingDto.java
+7
-0
yd-product-service/src/main/java/com/yd/product/service/service/impl/AttributeSettingServiceImpl.java
+2
-0
yd-product-service/src/main/resources/mappers/RelProjectProductLaunchMapper.xml
+7
-1
No files found.
yd-product-api/src/main/java/com/yd/product/api/service/impl/ApiRelProjectProductLaunchServiceImpl.java
View file @
9d5691e2
...
...
@@ -20,11 +20,16 @@ import com.yd.product.feign.request.relprojectproductlaunch.ApiRelProjectProduct
import
com.yd.product.feign.response.productlaunch.ApiAttributeSettingDto
;
import
com.yd.product.feign.response.relprojectproductlaunch.ApiProductLaunchParameterPageResponse
;
import
com.yd.product.feign.response.relprojectproductlaunch.ApiRelProjectProductLaunchPageResponse
;
import
com.yd.product.service.dto.AttributeSettingDto
;
import
com.yd.product.service.model.AttributeSetting
;
import
com.yd.product.service.service.IAttributeSettingService
;
import
com.yd.product.service.service.IRelProjectProductLaunchService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -50,6 +55,9 @@ public class ApiRelProjectProductLaunchServiceImpl implements ApiRelProjectProdu
@Autowired
private
ApiOssFileFeignClient
apiOssFileFeignClient
;
@Autowired
private
IAttributeSettingService
iAttributeSettingService
;
/**
* 分页列表查询-租户项目产品上架关系信息
* @param request
...
...
@@ -120,6 +128,53 @@ public class ApiRelProjectProductLaunchServiceImpl implements ApiRelProjectProdu
@Override
public
Result
<
IPage
<
ApiProductLaunchParameterPageResponse
>>
parameterPage
(
ApiProductLaunchParameterPageRequest
request
)
{
Page
<
ApiProductLaunchParameterPageResponse
>
page
=
new
Page
<>(
request
.
getPageNo
(),
request
.
getPageSize
());
// 构建最终的 productLaunchBizIdList
List
<
String
>
finalProductLaunchBizIdList
=
new
ArrayList
<>();
// 如果 request 中已有 productLaunchBizIdList,先加入
if
(!
CollectionUtils
.
isEmpty
(
request
.
getProductLaunchBizIdList
()))
{
finalProductLaunchBizIdList
.
addAll
(
request
.
getProductLaunchBizIdList
());
}
// 根据分类编码列表查询产品上架ID
if
(!
CollectionUtils
.
isEmpty
(
request
.
getCategoryCodeList
()))
{
ApiRelObjectCategoryQueryRequest
categoryQueryRequest
=
new
ApiRelObjectCategoryQueryRequest
();
categoryQueryRequest
.
setCategoryCodeList
(
request
.
getCategoryCodeList
());
Result
<
List
<
ApiRelObjectCategoryQueryResponse
>>
categoryResult
=
apiRelObjectCategoryFeignClient
.
query
(
categoryQueryRequest
);
if
(
categoryResult
!=
null
&&
!
CollectionUtils
.
isEmpty
(
categoryResult
.
getData
()))
{
List
<
String
>
categoryProductLaunchIds
=
categoryResult
.
getData
().
stream
()
.
map
(
ApiRelObjectCategoryQueryResponse:
:
getObjectBizId
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
finalProductLaunchBizIdList
.
addAll
(
categoryProductLaunchIds
);
}
}
// 根据保险公司ID列表查询产品上架ID
if
(!
CollectionUtils
.
isEmpty
(
request
.
getInsuranceCompanyBizIdList
()))
{
List
<
AttributeSetting
>
attributeSettingList
=
iAttributeSettingService
.
queryList
(
AttributeSettingDto
.
builder
()
.
fieldValueBizIdList
(
request
.
getInsuranceCompanyBizIdList
())
.
build
());
if
(!
CollectionUtils
.
isEmpty
(
attributeSettingList
))
{
List
<
String
>
insuranceProductLaunchIds
=
attributeSettingList
.
stream
()
.
map
(
AttributeSetting:
:
getProductLaunchBizId
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
finalProductLaunchBizIdList
.
addAll
(
insuranceProductLaunchIds
);
}
}
// 去重并设置回 request
if
(!
CollectionUtils
.
isEmpty
(
finalProductLaunchBizIdList
))
{
request
.
setProductLaunchBizIdList
(
finalProductLaunchBizIdList
.
stream
()
.
distinct
()
.
collect
(
Collectors
.
toList
()));
}
// 执行查询
IPage
<
ApiProductLaunchParameterPageResponse
>
iPage
=
iRelProjectProductLaunchService
.
parameterPage
(
page
,
request
);
if
(!
CollectionUtils
.
isEmpty
(
iPage
.
getRecords
()))
{
List
<
ApiProductLaunchParameterPageResponse
>
responses
=
iPage
.
getRecords
();
...
...
yd-product-feign/src/main/java/com/yd/product/feign/request/productlaunch/ApiProductLaunchParameterPageRequest.java
View file @
9d5691e2
...
...
@@ -3,6 +3,8 @@ package com.yd.product.feign.request.productlaunch;
import
com.yd.common.dto.PageDto
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ApiProductLaunchParameterPageRequest
extends
PageDto
{
...
...
@@ -30,4 +32,19 @@ public class ApiProductLaunchParameterPageRequest extends PageDto {
* 字段值表唯一业务ID
*/
private
String
fieldValueBizId
;
/**
* 分类编码列表
*/
private
List
<
String
>
categoryCodeList
;
/**
* 保险公司表唯一业务ID列表
*/
private
List
<
String
>
insuranceCompanyBizIdList
;
/**
* 产品上架信息表唯一业务ID列表
*/
private
List
<
String
>
productLaunchBizIdList
;
}
yd-product-service/src/main/java/com/yd/product/service/dto/AttributeSettingDto.java
View file @
9d5691e2
...
...
@@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@Builder
...
...
@@ -15,4 +16,10 @@ public class AttributeSettingDto {
* 产品上架信息表唯一业务ID
*/
private
String
productLaunchBizId
;
/**
* 字段值表唯一业务ID列表
*/
private
List
<
String
>
fieldValueBizIdList
;
}
yd-product-service/src/main/java/com/yd/product/service/service/impl/AttributeSettingServiceImpl.java
View file @
9d5691e2
...
...
@@ -8,6 +8,7 @@ import com.yd.product.service.service.IAttributeSettingService;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
...
...
@@ -26,6 +27,7 @@ public class AttributeSettingServiceImpl extends ServiceImpl<AttributeSettingMap
public
List
<
AttributeSetting
>
queryList
(
AttributeSettingDto
dto
)
{
List
<
AttributeSetting
>
list
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
AttributeSetting
>()
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getProductLaunchBizId
()),
AttributeSetting:
:
getProductLaunchBizId
,
dto
.
getProductLaunchBizId
())
.
in
(!
CollectionUtils
.
isEmpty
(
dto
.
getFieldValueBizIdList
()),
AttributeSetting:
:
getFieldValueBizId
,
dto
.
getFieldValueBizIdList
())
);
return
list
;
}
...
...
yd-product-service/src/main/resources/mappers/RelProjectProductLaunchMapper.xml
View file @
9d5691e2
...
...
@@ -35,7 +35,7 @@
from attribute_setting s
left join rel_project_product_launch rppl on rppl.product_launch_biz_id = s.product_launch_biz_id and rppl.is_deleted = 0
left join product_launch pl on pl.product_launch_biz_id = rppl.product_launch_biz_id and pl.is_deleted = 0
left join product p on p.product_biz_id = pl.product_biz_id and p
l
.is_deleted = 0
left join product p on p.product_biz_id = pl.product_biz_id and p.is_deleted = 0
<where>
<if
test=
"request.tenantBizId != null and request.tenantBizId != ''"
>
and rppl.tenant_biz_id = #{request.tenantBizId}
...
...
@@ -48,6 +48,12 @@
</if>
and s.field_biz_id = #{request.fieldBizId}
and s.field_value_biz_id = #{request.fieldValueBizId}
<if
test=
"request.productLaunchBizIdList != null and request.productLaunchBizIdList.size > 0"
>
and s.product_launch_biz_id in
<foreach
collection=
"request.productLaunchBizIdList"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
and s.is_deleted = 0
</where>
</select>
...
...
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