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
f7bab85c
Commit
f7bab85c
authored
Sep 02, 2019
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新商品品牌接口
parent
be5315fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+23
-3
dubbo-gic-webapp-plug.xml
src/main/resources/dubbo-gic-webapp-plug.xml
+2
-0
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
f7bab85c
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.contants.SortType
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.goods.api.dto.BrandDTO
;
import
com.gic.goods.api.service.BrandApiService
;
import
com.gic.plug.web.vo.goods.GoodsBrandVO
;
@RestController
public
class
GoodsBrandController
{
@
RequestMapping
(
"/goods-brand-list"
)
p
ublic
RestResponse
goodsBrandList
()
{
@
Autowired
p
rivate
BrandApiService
brandApiService
;
return
null
;
@RequestMapping
(
"/goods-brand-list"
)
public
RestResponse
goodsBrandList
(
int
pageSize
,
int
currentPage
,
String
search
,
Long
goodsDomainId
)
{
ServiceResponse
<
Page
<
BrandDTO
>>
serviceResponse
=
brandApiService
.
findBrandPage
(
currentPage
,
pageSize
,
goodsDomainId
,
search
,
SortType
.
sortDescType
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
Page
<
GoodsBrandVO
>
page
=
PageHelperUtils
.
changePageToCurrentPage
(
serviceResponse
.
getResult
(),
GoodsBrandVO
.
class
);
//TODO 品牌id的拼写错误
for
(
int
i
=
0
;
i
<
page
.
getResult
().
size
();
i
++)
{
GoodsBrandVO
goodsBrandVO
=
page
.
getResult
().
get
(
i
);
goodsBrandVO
.
setSpecBrandId
(
serviceResponse
.
getResult
().
getResult
().
get
(
i
).
getSepcBrandId
());
}
return
RestResponse
.
success
(
page
);
}
}
src/main/resources/dubbo-gic-webapp-plug.xml
View file @
f7bab85c
...
...
@@ -40,5 +40,6 @@
<dubbo:reference
interface=
"com.gic.goods.api.service.CategoryApiService"
id=
"categoryApiService"
timeout=
"60000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.goods.api.service.PropertyValueApiService"
id=
"propertyValueApiService"
timeout=
"60000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.goods.api.service.PropertyApiService"
id=
"propertyApiService"
timeout=
"60000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.goods.api.service.BrandApiService"
id=
"brandApiService"
timeout=
"60000"
retries=
"0"
/>
<!-- -->
</beans>
\ 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