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
01fb98f2
Commit
01fb98f2
authored
Jul 28, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tab_store&tab_store_field_rel&tab_store_region_rel&tab_store_brand_ref own_type改成owner_flag
parent
c864ef22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
68 additions
and
57 deletions
+68
-57
ScreeningController.java
...java/com/gic/plug/web/controller/ScreeningController.java
+9
-9
StoreBrandController.java
...ava/com/gic/plug/web/controller/StoreBrandController.java
+5
-4
StoreController.java
...ain/java/com/gic/plug/web/controller/StoreController.java
+0
-2
StoreTypeController.java
...java/com/gic/plug/web/controller/StoreTypeController.java
+7
-1
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+12
-20
GoodsDomainController.java
.../gic/plug/web/controller/goods/GoodsDomainController.java
+9
-18
GoodsRightsSelectorController.java
...g/web/controller/goods/GoodsRightsSelectorController.java
+1
-1
GoodsSelectorController.java
...ic/plug/web/controller/goods/GoodsSelectorController.java
+0
-0
WidgetValuesNewVO.java
src/main/java/com/gic/plug/web/vo/WidgetValuesNewVO.java
+9
-0
WidgetValuesOldVO.java
src/main/java/com/gic/plug/web/vo/WidgetValuesOldVO.java
+9
-0
StoreWidgetInterfaceVO.java
...va/com/gic/plug/web/vo/widget/StoreWidgetInterfaceVO.java
+7
-2
No files found.
src/main/java/com/gic/plug/web/controller/ScreeningController.java
View file @
01fb98f2
...
...
@@ -97,9 +97,9 @@ public class ScreeningController {
EsScreeningChainDetailDTO
item
=
this
.
esScreeningInitService
.
findRootChainByCategoryId
(
categoryId
);
String
widgetValues
=
item
.
getWidget
().
getWidgetValues
();
if
(
StringUtils
.
isNotBlank
(
widgetValues
))
{
List
<
WidgetValuesOldVO
>
oldV
OS
=
JSONObject
.
parseArray
(
widgetValues
,
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newV
OList
=
oldVOS
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
item
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newV
O
List
));
List
<
WidgetValuesOldVO
>
oldV
os
=
JSONObject
.
parseArray
(
widgetValues
,
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newV
oList
=
oldVos
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
item
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newV
o
List
));
}
all
.
add
(
item
);
}
...
...
@@ -114,9 +114,9 @@ public class ScreeningController {
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
=
list
.
stream
().
peek
(
item
->
{
if
(
StringUtils
.
isNotBlank
(
item
.
getWidget
().
getWidgetValues
()))
{
List
<
WidgetValuesOldVO
>
oldV
OS
=
JSONObject
.
parseArray
(
item
.
getWidget
().
getWidgetValues
(),
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newV
OList
=
oldVOS
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
item
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newV
O
List
));
List
<
WidgetValuesOldVO
>
oldV
os
=
JSONObject
.
parseArray
(
item
.
getWidget
().
getWidgetValues
(),
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newV
oList
=
oldVos
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
item
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newV
o
List
));
}
}).
collect
(
Collectors
.
toList
());
}
...
...
@@ -141,9 +141,9 @@ public class ScreeningController {
public
Object
getScreeningWidgetDetail
(
String
widgetChainId
)
{
EsScreeningChainDetailDTO
dto
=
this
.
esScreeningInitService
.
findChainDetail
(
widgetChainId
);
if
(
dto
!=
null
&&
dto
.
getWidget
()
!=
null
&&
StringUtils
.
isNotBlank
(
dto
.
getWidget
().
getWidgetValues
()))
{
List
<
WidgetValuesOldVO
>
oldV
OS
=
JSONObject
.
parseArray
(
dto
.
getWidget
().
getWidgetValues
(),
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newV
OList
=
oldVOS
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
dto
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newV
O
List
));
List
<
WidgetValuesOldVO
>
oldV
os
=
JSONObject
.
parseArray
(
dto
.
getWidget
().
getWidgetValues
(),
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newV
oList
=
oldVos
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
dto
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newV
o
List
));
}
return
RestResponse
.
success
(
dto
);
}
...
...
src/main/java/com/gic/plug/web/controller/StoreBrandController.java
View file @
01fb98f2
...
...
@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.service.EnterpriseApiService
;
import
com.gic.plug.web.vo.widget.StoreWidgetInterfaceShareVO
;
import
com.gic.store.constant.StoreOwnerFlagEnum
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -47,7 +48,7 @@ public class StoreBrandController {
List
<
StoreWidgetInterfaceShareVO
>
voList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
//共享类型
List
<
Integer
>
brandIdList
=
list
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
get
Type
(),
2
))
List
<
Integer
>
brandIdList
=
list
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
get
OwnerFlag
(),
StoreOwnerFlagEnum
.
OTHER
.
getCode
()
))
.
mapToInt
(
e
->
e
.
getStoreBrandId
())
.
boxed
()
.
collect
(
Collectors
.
toList
());
...
...
@@ -59,10 +60,10 @@ public class StoreBrandController {
if
(
brandResponse
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
brandResponse
.
getResult
()))
{
List
<
StoreBrandDTO
>
brandList
=
brandResponse
.
getResult
();
List
<
Integer
>
enterpriseIdList
=
brandList
.
stream
()
.
filter
(
e
->
Objects
.
equals
(
e
.
get
Type
(),
1
))
.
filter
(
e
->
Objects
.
equals
(
e
.
get
OwnerFlag
(),
StoreOwnerFlagEnum
.
OWNER
.
getCode
()
))
.
mapToInt
(
e
->
e
.
getEnterpriseId
()).
boxed
()
.
collect
(
Collectors
.
toList
());
brandIdMap
=
brandList
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
get
Type
(),
1
))
brandIdMap
=
brandList
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
get
OwnerFlag
(),
StoreOwnerFlagEnum
.
OWNER
.
getCode
()
))
.
collect
(
Collectors
.
toMap
(
e
->
e
.
getStoreBrandId
(),
e
->
e
.
getEnterpriseId
()));
ServiceResponse
<
List
<
EnterpriseDTO
>>
enterpriseResponse
=
enterpriseApiService
.
listEnterpriseByIds
(
enterpriseIdList
);
...
...
@@ -79,7 +80,7 @@ public class StoreBrandController {
vo
.
setLabel
(
e
.
getStoreBrandName
());
vo
.
setValue
(
e
.
getStoreBrandId
().
toString
());
//共享类型
if
(
Objects
.
equals
(
e
.
get
Type
(),
2
))
{
if
(
Objects
.
equals
(
e
.
get
OwnerFlag
(),
StoreOwnerFlagEnum
.
OTHER
.
getCode
()
))
{
Integer
tempEnterpriseId
=
finalBrandIdMap
.
get
(
e
.
getStoreBrandId
());
vo
.
setEnterpriseName
(
finalEnterpriseMap
.
get
(
tempEnterpriseId
));
}
...
...
src/main/java/com/gic/plug/web/controller/StoreController.java
View file @
01fb98f2
...
...
@@ -252,7 +252,6 @@ public class StoreController {
public
RestResponse
getStoreWidget
(
Integer
storeWidgetId
)
throws
ClassNotFoundException
{
ServiceResponse
<
StoreWidgetDTO
>
response
=
this
.
storeWidgetApiService
.
getStoreWidget
(
storeWidgetId
);
StoreWidgetVO
storeWidgetVO
=
EntityUtil
.
changeEntityByJSON
(
StoreWidgetVO
.
class
,
response
.
getResult
());
// storeWidgetVO.setScreenBack(this.getScreenBack(storeWidgetVO.getSearchParam()));
return
RestResponse
.
success
(
storeWidgetVO
);
}
...
...
@@ -289,7 +288,6 @@ public class StoreController {
StoreResourceVO
vo
=
EntityUtil
.
changeEntityNew
(
StoreResourceVO
.
class
,
storeWidgetDTO
);
vo
.
setSearchJson
(
storeWidgetDTO
.
getSearchParam
());
// vo.setSceenBack(getScreenBack(storeWidgetDTO.getSearchParam()));
return
vo
;
}
}
...
...
src/main/java/com/gic/plug/web/controller/StoreTypeController.java
View file @
01fb98f2
...
...
@@ -15,7 +15,13 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 门店类型
* @ClassName:
* @Description:
* @author guojuxing
* @date 2021/7/28 10:37 AM
*/
@RestController
@RequestMapping
(
"/store-type"
)
public
class
StoreTypeController
{
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
01fb98f2
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
...
...
@@ -13,18 +23,8 @@ import com.gic.goods.api.dto.GoodsRightsSelectorDTO;
import
com.gic.goods.api.dto.GoodsSelectorDTO
;
import
com.gic.goods.api.service.BrandApiService
;
import
com.gic.goods.api.service.GoodsRightsSelectorApiService
;
import
com.gic.goods.api.service.GoodsSelectorApiService
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.plug.web.vo.goods.GoodsBrandVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
/**
* 商品
* @ClassName: GoodsBrandController
...
...
@@ -41,9 +41,6 @@ public class GoodsBrandController extends BaseGoodsController {
@Autowired
private
GoodsRightsSelectorApiService
goodsRightsSelectorApiService
;
@Autowired
private
GoodsSelectorApiService
goodsSelectorApiService
;
private
static
final
int
DEFAULT_PAGE_SIZE
=
999
;
@RequestMapping
(
"/goods-brand-list"
)
...
...
@@ -51,13 +48,8 @@ public class GoodsBrandController extends BaseGoodsController {
pageSize
=
DEFAULT_PAGE_SIZE
;
String
goodsRightsBrands
=
null
;
if
(
goodsSelectorId
!=
null
)
{
ServiceResponse
<
GoodsSelectorDTO
>
selectorServiceResponse
=
goodsSelectorApiService
.
getGoodsSelector
(
goodsSelectorId
,
getEnterpriseId
());
if
(
selectorServiceResponse
.
getResult
()
!=
null
)
{
goodsRightsBrands
=
selectorServiceResponse
.
getResult
().
getGoodsRightsBrands
();
}
else
{
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
else
{
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getGoodsResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getGoodsResourceInfo
().
getGoodsResourceId
();
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsDomainController.java
View file @
01fb98f2
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
java.util.*
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
...
...
@@ -10,17 +18,9 @@ import com.gic.goods.api.dto.GoodsRightsSelectorDTO;
import
com.gic.goods.api.dto.GoodsSelectorDTO
;
import
com.gic.goods.api.service.GoodsDomainApiService
;
import
com.gic.goods.api.service.GoodsRightsSelectorApiService
;
import
com.gic.goods.api.service.GoodsSelectorApiService
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.plug.web.vo.goods.GoodsChannelVO
;
import
com.gic.plug.web.vo.goods.GoodsDomainVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.*
;
/**
* 门店
* @ClassName: GoodsDomainController
...
...
@@ -37,8 +37,6 @@ public class GoodsDomainController extends BaseGoodsController {
@Autowired
private
GoodsRightsSelectorApiService
goodsRightsSelectorApiService
;
@Autowired
private
GoodsSelectorApiService
goodsSelectorApiService
;
/**
* @return com.gic.commons.webapi.reponse.RestResponse
...
...
@@ -69,14 +67,7 @@ public class GoodsDomainController extends BaseGoodsController {
String
goodsDomian
=
null
;
Integer
hasRights
=
0
;
if
(
goodsSelectorId
!=
null
)
{
ServiceResponse
<
GoodsSelectorDTO
>
selectorServiceResponse
=
goodsSelectorApiService
.
getGoodsSelector
(
goodsSelectorId
,
getEnterpriseId
());
if
(
selectorServiceResponse
.
getResult
()
!=
null
)
{
goodsDomian
=
selectorServiceResponse
.
getResult
().
getGoodsRightsBrands
();
hasRights
=
selectorServiceResponse
.
getResult
().
getHasRights
();
}
else
{
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
else
{
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getGoodsResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getGoodsResourceInfo
().
getGoodsResourceId
();
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsRightsSelectorController.java
View file @
01fb98f2
...
...
@@ -27,7 +27,7 @@ public class GoodsRightsSelectorController extends BaseGoodsController {
@Autowired
private
GoodsRightsSelectorApiService
goodsRightsSelectorApiService
;
private
Logger
log
=
LogManager
.
getLogger
(
GoodsSelectorController
.
class
);
private
Logger
log
=
LogManager
.
getLogger
(
Goods
Rights
SelectorController
.
class
);
/**
* @Title: BaseGoodsController
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsSelectorController.java
View file @
01fb98f2
This diff is collapsed.
Click to expand it.
src/main/java/com/gic/plug/web/vo/WidgetValuesNewVO.java
View file @
01fb98f2
...
...
@@ -46,4 +46,13 @@ public class WidgetValuesNewVO implements Serializable {
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
@Override
public
String
toString
()
{
return
"WidgetValuesNewVO{"
+
"key='"
+
key
+
'\''
+
", label='"
+
label
+
'\''
+
", value='"
+
value
+
'\''
+
'}'
;
}
}
src/main/java/com/gic/plug/web/vo/WidgetValuesOldVO.java
View file @
01fb98f2
...
...
@@ -37,4 +37,13 @@ public class WidgetValuesOldVO implements Serializable {
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Override
public
String
toString
()
{
return
"WidgetValuesOldVO{"
+
"key='"
+
key
+
'\''
+
", value='"
+
value
+
'\''
+
", name='"
+
name
+
'\''
+
'}'
;
}
}
src/main/java/com/gic/plug/web/vo/widget/StoreWidgetInterfaceVO.java
View file @
01fb98f2
...
...
@@ -50,7 +50,12 @@ public class StoreWidgetInterfaceVO implements Serializable{
return
this
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
@Override
public
String
toString
()
{
return
"StoreWidgetInterfaceVO{"
+
"value='"
+
value
+
'\''
+
", label='"
+
label
+
'\''
+
", key='"
+
key
+
'\''
+
'}'
;
}
}
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