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
863de7b4
Commit
863de7b4
authored
Oct 19, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品前置资源改成应用
parent
207d2fa4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
EnterpriseController.java
...m/gic/enterprise/web/controller/EnterpriseController.java
+31
-2
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/EnterpriseController.java
View file @
863de7b4
...
...
@@ -2,13 +2,17 @@ package com.gic.enterprise.web.controller;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.constant.AppMenuCodeConstants
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.MenuApiService
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.dto.BillingAccountDTO
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.EnterpriseResourceRelDTO
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.service.BillingAccountApiService
;
import
com.gic.enterprise.service.EnterpriseApiService
;
...
...
@@ -25,6 +29,10 @@ import org.apache.commons.lang.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.List
;
/**
*
* @ClassName: EnterpriseController
...
...
@@ -42,6 +50,8 @@ public class EnterpriseController {
private
SmsOuterApiService
smsOuterApiService
;
@Autowired
private
BillingAccountApiService
billingAccountApiService
;
@Autowired
private
MenuApiService
menuApiService
;
@RequestMapping
(
"get-enterprise-by-name"
)
public
RestResponse
getEnterpriseByName
(
String
enterpriseName
)
{
...
...
@@ -73,8 +83,27 @@ public class EnterpriseController {
@RequestMapping
(
"/get-enterprise-info"
)
public
RestResponse
getEnterpriseInfo
()
{
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
return
ResultControllerUtils
.
commonResult
(
this
.
enterpriseApiService
.
getBusinessFrontRes
(
enterpriseId
),
EnterpriseResourceRelVO
.
class
);
//商品资源获取接口调整
ServiceResponse
<
MenuDTO
>
goods
=
menuApiService
.
getMenuByMenuCode
(
AppMenuCodeConstants
.
GOODS
);
boolean
hasGoodsAuth
=
false
;
if
(
goods
.
isSuccess
())
{
hasGoodsAuth
=
true
;
}
List
<
EnterpriseResourceRelVO
>
result
=
new
ArrayList
<>();
EnterpriseResourceRelVO
vo
=
new
EnterpriseResourceRelVO
();
vo
.
setResourceCode
(
"901"
);
vo
.
setResourceName
(
"商品选择器"
);
if
(
hasGoodsAuth
)
{
vo
.
setResourceSwitch
(
1
);
}
else
{
vo
.
setResourceSwitch
(
0
);
}
result
.
add
(
vo
);
ServiceResponse
<
List
<
EnterpriseResourceRelDTO
>>
resourceResponse
=
this
.
enterpriseApiService
.
getBusinessFrontRes
(
enterpriseId
);
if
(
resourceResponse
.
isSuccess
())
{
result
.
addAll
(
EntityUtil
.
changeEntityListNew
(
EnterpriseResourceRelVO
.
class
,
resourceResponse
.
getResult
()));
}
return
RestResponse
.
success
(
result
);
}
@RequestMapping
(
"/update-enterprise"
)
...
...
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