Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
enterprise-platform
Commits
80e558ea
Commit
80e558ea
authored
Oct 26, 2023
by
王晓旭
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/enterprise-platform
parents
a6e13349
3f6ca8fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
enterprise-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
...com/mortals/xhx/module/product/web/ProductController.java
+8
-2
No files found.
enterprise-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
View file @
80e558ea
...
...
@@ -14,6 +14,7 @@ import com.mortals.xhx.module.product.model.ProductCategoryQuery;
import
com.mortals.xhx.module.product.service.ProductCategoryService
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -80,8 +81,13 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
protected
int
editAfter
(
Long
id
,
Map
<
String
,
Object
>
model
,
ProductEntity
entity
,
Context
context
)
throws
AppException
{
String
categoryIds
=
productCategoryService
.
find
(
new
ProductCategoryQuery
().
productId
(
entity
.
getId
())).
stream
().
map
(
i
->
i
.
getCategoryId
().
toString
()).
collect
(
Collectors
.
joining
(
","
));
String
companyIds
=
companyProductService
.
find
(
new
CompanyProductQuery
().
productId
(
entity
.
getId
())).
stream
().
map
(
i
->
i
.
getProductId
().
toString
()).
collect
(
Collectors
.
joining
(
","
));
entity
.
setCompanyId
(
companyIds
);
if
(!
ObjectUtils
.
isEmpty
(
categoryIds
))
{
entity
.
setCategoryId
(
categoryIds
);
}
if
(!
ObjectUtils
.
isEmpty
(
companyIds
))
{
entity
.
setCompanyId
(
companyIds
);
}
return
super
.
editAfter
(
id
,
model
,
entity
,
context
);
}
}
\ 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