Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-webapp-plug
Commits
4383af65
Commit
4383af65
authored
Sep 23, 2019
by
xub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp品类修改
parent
a9f67393
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
GoodsCategoryController.java
...ic/plug/web/controller/goods/GoodsCategoryController.java
+15
-4
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsCategoryController.java
View file @
4383af65
...
...
@@ -3,8 +3,11 @@ package com.gic.plug.web.controller.goods;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.goods.api.dto.CategoryDTO
;
import
com.gic.goods.api.dto.ErrorCode
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.plug.web.vo.goods.CategoryVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -25,8 +28,12 @@ public class GoodsCategoryController {
* @author xub
*/
@GetMapping
(
"list-parent-category"
)
public
RestResponse
listParentCord
(
Long
goodsDomainId
)
{
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listParentAll
(
goodsDomainId
);
public
RestResponse
listParentCord
(
String
channelCode
,
Long
goodsDomainId
)
{
if
(
goodsDomainId
==
null
||
StringUtils
.
isBlank
(
channelCode
))
{
return
RestResponse
.
failure
(
ErrorCode
.
UNKNOW_ERROR
.
getCode
(),
"参数不全"
);
}
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listParentAll
(
channelCode
,
goodsDomainId
);
List
<
CategoryDTO
>
result
=
serviceResponse
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
))
{
return
RestResponse
.
success
();
...
...
@@ -40,8 +47,12 @@ public class GoodsCategoryController {
* @author xub
*/
@GetMapping
(
"list-child-category"
)
public
RestResponse
listChildAll
(
Long
specParentId
)
{
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listChildAll
(
specParentId
);
public
RestResponse
listChildAll
(
String
channelCode
,
Long
specParentId
)
{
if
(
specParentId
==
null
||
StringUtils
.
isBlank
(
channelCode
))
{
return
RestResponse
.
failure
(
ErrorCode
.
UNKNOW_ERROR
.
getCode
(),
"参数不全"
);
}
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listChildAll
(
channelCode
,
specParentId
);
List
<
CategoryDTO
>
result
=
serviceResponse
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
))
{
return
RestResponse
.
success
();
...
...
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