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
466e9416
Commit
466e9416
authored
Dec 14, 2019
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口增加enterpriseId
parent
8e352461
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
27 deletions
+29
-27
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+4
-4
GoodsCategoryController.java
...ic/plug/web/controller/goods/GoodsCategoryController.java
+10
-10
GoodsController.java
...va/com/gic/plug/web/controller/goods/GoodsController.java
+13
-11
GoodsPropertyController.java
...ic/plug/web/controller/goods/GoodsPropertyController.java
+2
-2
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
466e9416
...
...
@@ -56,7 +56,7 @@ public class GoodsBrandController {
}
}
}
return
findBrandListByParams
(
currentPage
,
pageSize
,
goodsDomainId
,
search
);
return
findBrandListByParams
(
currentPage
,
pageSize
,
goodsDomainId
,
search
,
Constant
.
TEST_ENTERPRISE_ID
);
}
...
...
@@ -70,12 +70,12 @@ public class GoodsBrandController {
*/
@RequestMapping
(
"/goods-brand-list-for-rights"
)
public
RestResponse
goodsBrandListForRights
(
int
pageSize
,
int
currentPage
,
String
search
,
Long
goodsDomainId
)
{
return
findBrandListByParams
(
currentPage
,
pageSize
,
goodsDomainId
,
search
);
return
findBrandListByParams
(
currentPage
,
pageSize
,
goodsDomainId
,
search
,
Constant
.
TEST_ENTERPRISE_ID
);
}
private
RestResponse
findBrandListByParams
(
int
currentPage
,
int
pageSize
,
Long
goodsDomainId
,
String
search
)
{
private
RestResponse
findBrandListByParams
(
int
currentPage
,
int
pageSize
,
Long
goodsDomainId
,
String
search
,
Integer
enterpriseId
)
{
List
<
Long
>
branIdList
=
new
ArrayList
<>();
ServiceResponse
<
Page
<
BrandDTO
>>
serviceResponse
=
brandApiService
.
findBrandPage
(
currentPage
,
pageSize
,
goodsDomainId
,
search
,
branIdList
,
SortType
.
sortDescType
);
ServiceResponse
<
Page
<
BrandDTO
>>
serviceResponse
=
brandApiService
.
findBrandPage
(
currentPage
,
pageSize
,
goodsDomainId
,
search
,
branIdList
,
SortType
.
sortDescType
,
enterpriseId
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsCategoryController.java
View file @
466e9416
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
java.util.List
;
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
;
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.CategoryDTO
;
import
com.gic.goods.api.dto.ErrorCode
;
import
com.gic.goods.api.service.CategoryApiService
;
import
java.util.List
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.plug.web.vo.goods.CategoryVO
;
@RestController
public
class
GoodsCategoryController
{
...
...
@@ -33,7 +33,7 @@ public class GoodsCategoryController {
if
(
goodsDomainId
==
null
||
StringUtils
.
isBlank
(
channelCode
))
{
return
RestResponse
.
failure
(
ErrorCode
.
UNKNOW_ERROR
.
getCode
(),
"参数不全"
);
}
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listParentAll
(
channelCode
,
goodsDomainId
);
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listParentAll
(
channelCode
,
goodsDomainId
,
null
,
Constant
.
TEST_ENTERPRISE_ID
);
List
<
CategoryDTO
>
result
=
serviceResponse
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
))
{
return
RestResponse
.
success
();
...
...
@@ -52,7 +52,7 @@ public class GoodsCategoryController {
if
(
specParentId
==
null
||
StringUtils
.
isBlank
(
channelCode
))
{
return
RestResponse
.
failure
(
ErrorCode
.
UNKNOW_ERROR
.
getCode
(),
"参数不全"
);
}
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listChildAll
(
channelCode
,
specParentId
);
ServiceResponse
<
List
<
CategoryDTO
>>
serviceResponse
=
categoryApiSerivce
.
listChildAll
(
channelCode
,
specParentId
,
null
,
Constant
.
TEST_ENTERPRISE_ID
);
List
<
CategoryDTO
>
result
=
serviceResponse
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
))
{
return
RestResponse
.
success
();
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsController.java
View file @
466e9416
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.curator.shaded.com.google.common.collect.Lists
;
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
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.GoodsSkuDTO
;
import
com.gic.goods.api.service.GoodsApiService
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.plug.web.vo.goods.GoodsVO
;
import
com.gic.search.business.api.constant.enums.OperateEnum
;
import
com.gic.search.business.api.dto.DynamicSearchDTO
;
...
...
@@ -13,16 +25,6 @@ import com.gic.search.business.api.dto.ESResponseQueryBatchDTO;
import
com.gic.search.business.api.service.EsBusinessOperaApiService
;
import
com.gic.search.business.api.utils.QueryConditionAssemblyUtil
;
import
com.gic.widget.screening.api.service.EsScreeningSearchService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.curator.shaded.com.google.common.collect.Lists
;
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
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @ClassName: GoodsTagController
...
...
@@ -82,7 +84,7 @@ public class GoodsController {
}
//2、获取商品ID信息
List
<
Long
>
goodsIds
=
goodsVOS
.
stream
().
mapToLong
(
GoodsVO:
:
getGoodsId
).
boxed
().
collect
(
Collectors
.
toList
());
ServiceResponse
<
List
<
GoodsSkuDTO
>>
skuResponse
=
goodsApiService
.
listSku
ByGoods
(
goodsIds
);
ServiceResponse
<
List
<
GoodsSkuDTO
>>
skuResponse
=
goodsApiService
.
listSku
(
goodsIds
,
channelCode
,
Constant
.
TEST_ENTERPRISE_ID
);
if
(!
skuResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
skuResponse
.
getCode
(),
skuResponse
.
getMessage
());
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsPropertyController.java
View file @
466e9416
...
...
@@ -12,7 +12,7 @@ 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.PropertyDTO
;
import
com.gic.goods.api.dto.
Full
PropertyDTO
;
import
com.gic.goods.api.dto.PropertyValueDTO
;
import
com.gic.goods.api.service.PropertyApiService
;
import
com.gic.goods.api.service.PropertyValueApiService
;
...
...
@@ -38,7 +38,7 @@ public class GoodsPropertyController {
arrayList
.
add
(
Constant
.
PROPERTY_TYPE_PERCENT
);
arrayList
.
add
(
Constant
.
PROPERTY_TYPE_NUM
);
arrayList
.
add
(
Constant
.
PROPERTY_TYPE_REAL_NUM
);
ServiceResponse
<
Page
<
PropertyDTO
>>
serviceResponse
=
propertyApiService
.
findPropertyExceptType
(
currentPage
,
pageSize
,
goodsDomainId
,
arrayList
,
search
);
ServiceResponse
<
Page
<
FullPropertyDTO
>>
serviceResponse
=
propertyApiService
.
findPropertyExceptType
(
currentPage
,
pageSize
,
goodsDomainId
,
arrayList
,
search
,
Constant
.
TEST_ENTERPRISE_ID
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
...
...
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