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
0355653d
Commit
0355653d
authored
Sep 10, 2019
by
xub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品查询
parent
2fe81b25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
4 deletions
+77
-4
GoodsCategoryController.java
...ic/plug/web/controller/goods/GoodsCategoryController.java
+2
-2
GoodsController.java
...va/com/gic/plug/web/controller/goods/GoodsController.java
+66
-0
dubbo-gic-webapp-plug.xml
src/main/resources/dubbo-gic-webapp-plug.xml
+9
-2
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsCategoryController.java
View file @
0355653d
...
...
@@ -21,7 +21,7 @@ public class GoodsCategoryController {
private
CategoryApiService
categoryApiSerivce
;
/**
* @Description: 查询所有(一级
分组
)
* @Description: 查询所有(一级
类目
)
* @author xub
*/
@GetMapping
(
"list-parent-category"
)
...
...
@@ -36,7 +36,7 @@ public class GoodsCategoryController {
}
/**
* @Description: 查询所有(二级
分组
)
* @Description: 查询所有(二级
类目
)
* @author xub
*/
@GetMapping
(
"list-child-category"
)
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsController.java
0 → 100644
View file @
0355653d
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.goods.api.dto.ErrorCode
;
import
com.gic.goods.api.dto.GoodsTagDTO
;
import
com.gic.goods.api.service.TagApiService
;
import
com.gic.plug.web.vo.goods.GoodsTagVO
;
import
com.gic.search.business.api.dto.DynamicSearchDTO
;
import
com.gic.search.business.api.dto.ESResponseQueryBatchDTO
;
import
com.gic.search.business.api.service.EsBusinessManageApiService
;
import
com.gic.search.business.api.service.EsBusinessOperaApiService
;
import
com.gic.search.business.api.utils.NewNodeAddUtil
;
import
com.gic.widget.screening.api.service.EsScreeningSearchService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @ClassName: GoodsTagController
* @Description: 商品标签相关接口
* @author xub
* @date 2019/8/29 上午10:03
*/
@RestController
public
class
GoodsController
{
@Autowired
private
EsBusinessOperaApiService
esBusinessOperaApiService
;
@Autowired
private
EsScreeningSearchService
esScreeningSearchService
;
/**
* @Description: 查询所有(不分页)
* @author xub
*/
@GetMapping
(
"list-goods"
)
public
RestResponse
findList
(
@RequestParam
(
value
=
"currentPage"
,
defaultValue
=
"1"
)
Integer
currentPage
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
Long
goodsDomainId
,
String
goodsCode
)
{
DynamicSearchDTO
searchDTO
=
new
DynamicSearchDTO
();
String
esName
=
esScreeningSearchService
.
getCurrentEsName
(
"goods-test-123456"
,
"goods-search"
);
searchDTO
.
setIndexName
(
esName
);
searchDTO
.
setColumnCategoryCode
(
"goods-search"
);
searchDTO
.
setEnterpriseId
(
"goods-test-123456"
);
searchDTO
.
setType
(
"mapper_type"
);
searchDTO
.
setBegin
(
currentPage
);
searchDTO
.
setRecordNumber
(
pageSize
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"goodsCode"
,
goodsCode
);
jsonObject
.
put
(
"goodsDomainId"
,
goodsDomainId
);
searchDTO
.
setSearchJson
(
jsonObject
);
ServiceResponse
<
ESResponseQueryBatchDTO
>
serviceResponse
=
esBusinessOperaApiService
.
queryDataBatch
(
searchDTO
,
false
,
null
);
if
(
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
success
(
serviceResponse
.
getResult
());
}
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
}
src/main/resources/dubbo-gic-webapp-plug.xml
View file @
0355653d
...
...
@@ -42,7 +42,13 @@
<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"
/>
<!-- -->
<dubbo:reference
id=
"tagApiService"
interface=
"com.gic.goods.api.service.TagApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"cordApiService"
interface=
"com.gic.goods.api.service.CordApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"tagApiService"
interface=
"com.gic.goods.api.service.TagApiService"
timeout=
"60000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"cordApiService"
interface=
"com.gic.goods.api.service.CordApiService"
timeout=
"60000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.search.business.api.service.EsBusinessOperaApiService"
id=
"esBusinessOperaApiService"
timeout=
"60000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.search.business.api.service.EsBusinessManageApiService"
id=
"esBusinessManageApiService"
timeout=
"60000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.widget.screening.api.service.EsScreeningSearchService"
id=
"esScreeningSearchService"
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