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
664ee1d5
Commit
664ee1d5
authored
Mar 03, 2020
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
fae0c8f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
19 deletions
+38
-19
AppletConfigGoodsController.java
...lug/web/controller/goods/AppletConfigGoodsController.java
+38
-19
No files found.
src/main/java/com/gic/plug/web/controller/goods/AppletConfigGoodsController.java
View file @
664ee1d5
...
...
@@ -54,16 +54,25 @@ public class AppletConfigGoodsController {
private
EsBusinessOperaApiService
esBusinessOperaApiService
;
@RequestMapping
(
"get-mall-cord-list"
)
public
RestResponse
getMallCordList
(
String
appConfigId
)
{
ServiceResponse
<
AppletsConfigSimpleOutputDTO
>
appServiceResponse
=
appletsConfigApiService
.
selectAppletsConfigIdByAppId
(
appConfigId
,
1129
);
if
(
appServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
}
ServiceResponse
<
ShopDTO
>
shopDTOServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
1129
,
1
);
if
(
shopDTOServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
public
RestResponse
getMallCordList
(
String
appConfigId
,
Long
shopId
)
{
Long
areaId
=
null
;
if
(
StringUtils
.
isNotBlank
(
appConfigId
))
{
ServiceResponse
<
AppletsConfigSimpleOutputDTO
>
appServiceResponse
=
appletsConfigApiService
.
selectAppletsConfigIdByAppId
(
appConfigId
,
1129
);
if
(
appServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
}
ServiceResponse
<
ShopDTO
>
shopDTOServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
1129
,
1
);
if
(
shopDTOServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
}
areaId
=
shopDTOServiceResponse
.
getResult
().
getAreaId
();
}
else
if
(
shopId
!=
null
)
{
ServiceResponse
<
ShopDTO
>
shopDTOServiceResponse
=
shopApiService
.
getShopDetailsById
(
shopId
,
1129
);
if
(
shopDTOServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
}
areaId
=
shopDTOServiceResponse
.
getResult
().
getAreaId
();
}
Long
areaId
=
shopDTOServiceResponse
.
getResult
().
getAreaId
();
ServiceResponse
<
List
<
SpecCordDTO
>>
listServiceResponse
=
cordApiService
.
listSpecCordDTO
(
areaId
);
return
RestResponse
.
success
(
EntityUtil
.
changeEntityListByOrika
(
MallGoodsCordVO
.
class
,
listServiceResponse
.
getResult
()));
...
...
@@ -80,17 +89,27 @@ public class AppletConfigGoodsController {
*/
@RequestMapping
(
"list-mall-goods-selector"
)
public
RestResponse
listGoodsByChannel
(
@RequestParam
(
value
=
"currentPage"
,
defaultValue
=
"1"
)
Integer
currentPage
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
String
appConfigId
,
String
search
,
Long
cordId
)
{
ServiceResponse
<
AppletsConfigSimpleOutputDTO
>
appServiceResponse
=
appletsConfigApiService
.
selectAppletsConfigIdByAppId
(
appConfigId
,
1129
);
if
(
appServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
}
Integer
shopType
=
1
;
ServiceResponse
<
ShopDTO
>
shopDTOServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
1129
,
shopType
);
if
(
shopDTOServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
String
appConfigId
,
String
search
,
Long
cordId
,
Long
shopId
)
{
Long
areaId
=
null
;
if
(
StringUtils
.
isNotBlank
(
appConfigId
))
{
ServiceResponse
<
AppletsConfigSimpleOutputDTO
>
appServiceResponse
=
appletsConfigApiService
.
selectAppletsConfigIdByAppId
(
appConfigId
,
1129
);
if
(
appServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"小程序不存在"
);
}
Integer
shopType
=
1
;
ServiceResponse
<
ShopDTO
>
shopDTOServiceResponse
=
shopApiService
.
getShopByAppletId
(
appServiceResponse
.
getResult
().
getAppletConfigId
(),
1129
,
shopType
);
if
(
shopDTOServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
}
areaId
=
shopDTOServiceResponse
.
getResult
().
getAreaId
();
}
else
if
(
shopId
!=
null
)
{
ServiceResponse
<
ShopDTO
>
shopDTOServiceResponse
=
shopApiService
.
getShopDetailsById
(
shopId
,
1129
);
if
(
shopDTOServiceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"不存在店铺"
);
}
areaId
=
shopDTOServiceResponse
.
getResult
().
getAreaId
();
}
Long
areaId
=
shopDTOServiceResponse
.
getResult
().
getAreaId
();
JSONObject
cordJSON
=
null
;
if
(
cordId
!=
null
)
{
ServiceResponse
<
List
<
GoodsCordDTO
>>
serviceResponse
=
cordApiService
.
listChildAll
(
cordId
);
...
...
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