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
bf387539
Commit
bf387539
authored
Sep 14, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pmd
parent
258f273d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
AppletConfigGoodsController.java
...lug/web/controller/goods/AppletConfigGoodsController.java
+16
-16
No files found.
src/main/java/com/gic/plug/web/controller/goods/AppletConfigGoodsController.java
View file @
bf387539
...
@@ -74,11 +74,11 @@ public class AppletConfigGoodsController extends BaseGoodsController {
...
@@ -74,11 +74,11 @@ public class AppletConfigGoodsController extends BaseGoodsController {
if
(
appServiceResponse
.
getResult
()
==
null
)
{
if
(
appServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
}
}
ServiceResponse
<
ShopDTO
>
shopD
TO
ServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
getEnterpriseId
(),
1
);
ServiceResponse
<
ShopDTO
>
shopD
to
ServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
getEnterpriseId
(),
1
);
if
(
shopD
TO
ServiceResponse
.
getResult
()
==
null
)
{
if
(
shopD
to
ServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
}
}
shopId
=
shopD
TO
ServiceResponse
.
getResult
().
getId
();
shopId
=
shopD
to
ServiceResponse
.
getResult
().
getId
();
}
}
ServiceResponse
<
List
<
MallGoodsCordDTO
>>
listServiceResponse
=
mallCordApiService
.
listSpecCordDTO
(
shopId
,
getEnterpriseId
());
ServiceResponse
<
List
<
MallGoodsCordDTO
>>
listServiceResponse
=
mallCordApiService
.
listSpecCordDTO
(
shopId
,
getEnterpriseId
());
return
RestResponse
return
RestResponse
...
@@ -105,16 +105,16 @@ public class AppletConfigGoodsController extends BaseGoodsController {
...
@@ -105,16 +105,16 @@ public class AppletConfigGoodsController extends BaseGoodsController {
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
}
}
Integer
shopType
=
1
;
Integer
shopType
=
1
;
ServiceResponse
<
ShopDTO
>
shopD
TO
ServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
getEnterpriseId
(),
shopType
);
ServiceResponse
<
ShopDTO
>
shopD
to
ServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
getEnterpriseId
(),
shopType
);
if
(
shopD
TO
ServiceResponse
.
getResult
()
==
null
)
{
if
(
shopD
to
ServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
}
}
shopId
=
shopD
TO
ServiceResponse
.
getResult
().
getId
();
shopId
=
shopD
to
ServiceResponse
.
getResult
().
getId
();
}
}
if
(
shopId
==
null
)
{
if
(
shopId
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
}
}
JSONObject
cordJ
SON
=
null
;
JSONObject
cordJ
son
=
null
;
if
(
cordId
!=
null
)
{
if
(
cordId
!=
null
)
{
ServiceResponse
<
List
<
GoodsCordDTO
>>
serviceResponse
=
cordApiService
.
listChildAll
(
cordId
,
getEnterpriseId
());
ServiceResponse
<
List
<
GoodsCordDTO
>>
serviceResponse
=
cordApiService
.
listChildAll
(
cordId
,
getEnterpriseId
());
List
<
Long
>
cordList
=
new
ArrayList
<>();
List
<
Long
>
cordList
=
new
ArrayList
<>();
...
@@ -122,11 +122,11 @@ public class AppletConfigGoodsController extends BaseGoodsController {
...
@@ -122,11 +122,11 @@ public class AppletConfigGoodsController extends BaseGoodsController {
cordList
.
add
(
goodsCord
.
getSpecCordId
());
cordList
.
add
(
goodsCord
.
getSpecCordId
());
}
}
cordList
.
add
(
cordId
);
cordList
.
add
(
cordId
);
cordJ
SON
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"cordId"
,
cordJ
son
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"cordId"
,
OperateEnum
.
OPERATE_CONTAIN
,
Joiner
.
on
(
" "
).
join
(
cordList
));
OperateEnum
.
OPERATE_CONTAIN
,
Joiner
.
on
(
" "
).
join
(
cordList
));
}
}
ServiceResponse
<
ESResponseQueryBatchDTO
>
serviceResponse
=
searchGoods
(
currentPage
,
pageSize
,
null
,
shopId
,
search
,
ServiceResponse
<
ESResponseQueryBatchDTO
>
serviceResponse
=
searchGoods
(
currentPage
,
pageSize
,
null
,
shopId
,
search
,
Constant
.
CHANNEL_CODE_MALL
,
cordJ
SON
,
1
);
Constant
.
CHANNEL_CODE_MALL
,
cordJ
son
,
1
);
if
(
serviceResponse
.
isSuccess
())
{
if
(
serviceResponse
.
isSuccess
())
{
List
<
Long
>
goodsIds
=
new
ArrayList
<>();
List
<
Long
>
goodsIds
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
serviceResponse
.
getResult
().
getRes
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
serviceResponse
.
getResult
().
getRes
()))
{
...
@@ -211,13 +211,13 @@ public class AppletConfigGoodsController extends BaseGoodsController {
...
@@ -211,13 +211,13 @@ public class AppletConfigGoodsController extends BaseGoodsController {
log
.
info
(
"查不到小程序信息 appConfigId={}"
,
appConfigId
);
log
.
info
(
"查不到小程序信息 appConfigId={}"
,
appConfigId
);
}
}
Integer
shopType
=
2
;
Integer
shopType
=
2
;
ServiceResponse
<
ShopDTO
>
shopD
TO
ServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
getEnterpriseId
(),
shopType
);
ServiceResponse
<
ShopDTO
>
shopD
to
ServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
getEnterpriseId
(),
shopType
);
if
(
shopD
TO
ServiceResponse
.
getResult
()
==
null
)
{
if
(
shopD
to
ServiceResponse
.
getResult
()
==
null
)
{
log
.
info
(
"查不到店铺信息 appConfigId={}"
,
appConfigId
);
log
.
info
(
"查不到店铺信息 appConfigId={}"
,
appConfigId
);
return
null
;
return
null
;
}
}
goodsDomainId
=
shopD
TO
ServiceResponse
.
getResult
().
getAreaId
();
goodsDomainId
=
shopD
to
ServiceResponse
.
getResult
().
getAreaId
();
return
goodsDomainId
;
return
goodsDomainId
;
}
}
...
@@ -340,11 +340,11 @@ public class AppletConfigGoodsController extends BaseGoodsController {
...
@@ -340,11 +340,11 @@ public class AppletConfigGoodsController extends BaseGoodsController {
}
}
if
(
ids
!=
null
)
{
if
(
ids
!=
null
)
{
List
<
Long
>
collect
=
Splitter
.
on
(
","
).
splitToList
(
ids
).
stream
().
map
(
x
->
Long
.
parseLong
(
x
)).
collect
(
Collectors
.
toList
());
List
<
Long
>
collect
=
Splitter
.
on
(
","
).
splitToList
(
ids
).
stream
().
map
(
x
->
Long
.
parseLong
(
x
)).
collect
(
Collectors
.
toList
());
JSONObject
goodsIdsJ
SON
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"id"
,
OperateEnum
.
OPERATE_CONTAIN
,
Joiner
.
on
(
" "
).
join
(
collect
));
JSONObject
goodsIdsJ
son
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"id"
,
OperateEnum
.
OPERATE_CONTAIN
,
Joiner
.
on
(
" "
).
join
(
collect
));
JSONObject
strategyJson
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"strategyFlag"
,
OperateEnum
.
OPERATE_EQ
,
0
);
JSONObject
strategyJson
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"strategyFlag"
,
OperateEnum
.
OPERATE_EQ
,
0
);
JSONObject
strategyAndgoodsIdsJ
SON
=
QueryConditionAssemblyUtil
.
addQueryNodeForSiblin
(
goodsIdsJSON
,
strategyJson
,
OperateEnum
.
OPERATE_OR
);
JSONObject
strategyAndgoodsIdsJ
son
=
QueryConditionAssemblyUtil
.
addQueryNodeForSiblin
(
goodsIdsJson
,
strategyJson
,
OperateEnum
.
OPERATE_OR
);
json
=
QueryConditionAssemblyUtil
.
addQueryNodeForSiblin
(
json
,
strategyAndgoodsIdsJ
SON
,
OperateEnum
.
OPERATE_AND
);
json
=
QueryConditionAssemblyUtil
.
addQueryNodeForSiblin
(
json
,
strategyAndgoodsIdsJ
son
,
OperateEnum
.
OPERATE_AND
);
jsonArray
.
add
(
strategyAndgoodsIdsJ
SON
);
jsonArray
.
add
(
strategyAndgoodsIdsJ
son
);
}
else
{
}
else
{
JSONObject
strategyJson
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"strategyFlag"
,
OperateEnum
.
OPERATE_EQ
,
0
);
JSONObject
strategyJson
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"strategyFlag"
,
OperateEnum
.
OPERATE_EQ
,
0
);
json
=
QueryConditionAssemblyUtil
.
addQueryNodeForSiblin
(
json
,
strategyJson
,
OperateEnum
.
OPERATE_AND
);
json
=
QueryConditionAssemblyUtil
.
addQueryNodeForSiblin
(
json
,
strategyJson
,
OperateEnum
.
OPERATE_AND
);
...
...
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