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
c2e248b5
Commit
c2e248b5
authored
Dec 09, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
93af2bd9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
yd-product-api/src/main/java/com/yd/product/api/service/impl/ApiProductLaunchServiceImpl.java
+30
-0
yd-product-feign/src/main/java/com/yd/product/feign/dto/ApiProductLaunchDto.java
+5
-0
yd-product-feign/src/main/java/com/yd/product/feign/dto/ApiProjectDto.java
+22
-0
No files found.
yd-product-api/src/main/java/com/yd/product/api/service/impl/ApiProductLaunchServiceImpl.java
View file @
c2e248b5
...
...
@@ -16,6 +16,7 @@ import com.yd.common.result.Result;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.product.api.service.*
;
import
com.yd.product.feign.dto.ApiProductLaunchDto
;
import
com.yd.product.feign.dto.ApiProjectDto
;
import
com.yd.product.feign.dto.ApiSpeciesPriceDto
;
import
com.yd.product.feign.dto.ApiSpeciesTypeDto
;
import
com.yd.product.feign.enums.ProductCommonEnum
;
...
...
@@ -29,8 +30,11 @@ import com.yd.product.feign.response.productlaunch.ApiProductLaunchPageResponse;
import
com.yd.product.service.model.*
;
import
com.yd.product.service.service.*
;
import
com.yd.user.feign.client.reltenantproject.ApiRelTenantProjectFeignClient
;
import
com.yd.user.feign.client.sysproject.ApiSysProjectFeignClient
;
import
com.yd.user.feign.request.reltenantproject.QueryRelTenantProjectListRequest
;
import
com.yd.user.feign.request.sysproject.ApiSysProjectListRequest
;
import
com.yd.user.feign.response.reltenantproject.QueryRelTenantProjectListResponse
;
import
com.yd.user.feign.response.sysproject.ApiSysProjectDetailResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -77,6 +81,9 @@ public class ApiProductLaunchServiceImpl implements ApiProductLaunchService {
@Autowired
private
ApiFieldFeignClient
apiFieldFeignClient
;
@Autowired
private
ApiSysProjectFeignClient
apiSysProjectFeignClient
;
@Override
public
Result
<
IPage
<
ApiProductLaunchPageResponse
>>
page
(
ApiProductLaunchPageRequest
request
)
{
Page
<
ApiProductLaunchPageResponse
>
page
=
new
Page
<
ApiProductLaunchPageResponse
>(
request
.
getPageNo
(),
request
.
getPageSize
());
...
...
@@ -170,6 +177,8 @@ public class ApiProductLaunchServiceImpl implements ApiProductLaunchService {
List
<
String
>
categoryBizIdList
=
listResult
.
getData
().
stream
().
map
(
ApiRelObjectCategoryQueryResponse:
:
getCategoryBizId
).
collect
(
Collectors
.
toList
());
apiProductLaunchDto
.
setCategoryBizIdList
(
categoryBizIdList
);
}
apiProductLaunchDto
.
setApiProjectDtoList
(
apiProjectDtoList
(
productLaunch
.
getProjectBizIdList
()));
response
.
setApiProductLaunchDto
(
apiProductLaunchDto
);
//设置的产品上架信息的参数列表
...
...
@@ -209,6 +218,27 @@ public class ApiProductLaunchServiceImpl implements ApiProductLaunchService {
}
/**
* 根据项目业务id返回封装结构
* @param projectBizIds
* @return
*/
public
List
<
ApiProjectDto
>
apiProjectDtoList
(
String
projectBizIds
)
{
List
<
String
>
projectBizIdList
=
StringUtils
.
isNotBlank
(
projectBizIds
)
?
Arrays
.
asList
(
projectBizIds
.
split
(
";"
).
clone
())
:
new
ArrayList
<>();
List
<
ApiProjectDto
>
list
=
new
ArrayList
<>();
ApiSysProjectListRequest
request
=
new
ApiSysProjectListRequest
();
request
.
setProjectBizIdList
(
projectBizIdList
);
Result
<
List
<
ApiSysProjectDetailResponse
>>
result
=
apiSysProjectFeignClient
.
list
(
request
);
if
(!
CollectionUtils
.
isEmpty
(
result
.
getData
()))
{
list
=
result
.
getData
().
stream
().
map
(
d
->
{
ApiProjectDto
dto
=
new
ApiProjectDto
();
BeanUtils
.
copyProperties
(
d
,
dto
);
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
return
list
;
}
/**
* 保存-产品上架信息
* @param request
* @return
...
...
yd-product-feign/src/main/java/com/yd/product/feign/dto/ApiProductLaunchDto.java
View file @
c2e248b5
...
...
@@ -90,6 +90,11 @@ public class ApiProductLaunchDto {
private
List
<
String
>
projectBizIdList
;
/**
* 上架到对应的项目对象列表
*/
private
List
<
ApiProjectDto
>
apiProjectDtoList
;
/**
* 分类表唯一业务ID列表
*/
private
List
<
String
>
categoryBizIdList
;
...
...
yd-product-feign/src/main/java/com/yd/product/feign/dto/ApiProjectDto.java
0 → 100644
View file @
c2e248b5
package
com
.
yd
.
product
.
feign
.
dto
;
import
lombok.Data
;
@Data
public
class
ApiProjectDto
{
/**
* 项目唯一标识(业务ID)
*/
private
String
projectBizId
;
/**
* 项目名称
*/
private
String
projectName
;
/**
* 项目编码(租户内唯一)
*/
private
String
projectCode
;
}
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