Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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-platform-enterprise
Commits
6e2dc63c
Commit
6e2dc63c
authored
Apr 13, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微盟商城店铺增删改接口
parent
e4a277da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
WmMallStoreController.java
...c/enterprise/web/controller/wm/WmMallStoreController.java
+76
-0
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/wm/WmMallStoreController.java
0 → 100644
View file @
6e2dc63c
package
com
.
gic
.
enterprise
.
web
.
controller
.
wm
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.constant.MallModeEnum
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.OperationResultUtils
;
import
com.gic.enterprise.dto.WmStoreDTO
;
import
com.gic.enterprise.service.WmStoreApiService
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/wm-mall-store"
)
public
class
WmMallStoreController
{
private
final
static
Logger
LOGGER
=
LogManager
.
getLogger
(
WmMallStoreController
.
class
);
@Autowired
private
WmStoreApiService
wmStoreApiService
;
@RequestMapping
(
"/save-wm-store"
)
public
RestResponse
save
(
WmStoreDTO
dto
)
{
dto
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
return
OperationResultUtils
.
operationResult
(
wmStoreApiService
.
saveWmStore
(
dto
),
OperationResultUtils
.
LOG_NEW
+
"微盟商城店铺"
,
dto
.
getWmPidName
());
}
@RequestMapping
(
"/edit-wm-store"
)
public
RestResponse
edit
(
WmStoreDTO
dto
)
{
return
OperationResultUtils
.
operationResult
(
wmStoreApiService
.
modifyWmStore
(
dto
),
OperationResultUtils
.
LOG_EDIT
+
"微盟商城店铺"
,
dto
.
getWmPidName
());
}
@RequestMapping
(
"/get-wm-store-detail"
)
public
RestResponse
getDetail
(
Integer
wmMallStoreId
)
{
return
ResultControllerUtils
.
commonResult
(
wmStoreApiService
.
getWmStoreByWmMallStoreId
(
wmMallStoreId
));
}
@RequestMapping
(
"/list-wm-store"
)
public
RestResponse
listWmStore
()
{
return
ResultControllerUtils
.
commonResult
(
wmStoreApiService
.
listWmStore
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
()));
}
/**
* 授权
* @Title: authWmStore
* @Description:
* @author guojuxing
* @param wmMallStoreId
* @return com.gic.commons.webapi.reponse.RestResponse
*/
@RequestMapping
(
"/auth-wm-store"
)
public
RestResponse
authWmStore
(
Integer
wmMallStoreId
)
{
ServiceResponse
<
String
>
result
=
wmStoreApiService
.
authWmStore
(
wmMallStoreId
);
return
OperationResultUtils
.
operationResult
(
result
,
"授权微盟商城店铺"
,
OperationResultUtils
.
getOperationObject
(
result
));
}
@RequestMapping
(
"/list-mall-mode"
)
public
RestResponse
listMallMode
()
{
Map
<
String
,
String
>
result
=
new
HashMap
<>(
16
);
for
(
MallModeEnum
modeEnum
:
MallModeEnum
.
values
())
{
result
.
put
(
String
.
valueOf
(
modeEnum
.
getCode
()),
modeEnum
.
getMsg
());
}
return
RestResponse
.
success
(
result
);
}
}
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