Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
1
Merge Requests
1
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
haoban3.0
haoban-manage3.0
Commits
25971837
Commit
25971837
authored
Feb 22, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加日志
parent
6aabb1fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
ApplicationController.java
...c/haoban/manage/web/controller/ApplicationController.java
+23
-2
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+4
-3
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ApplicationController.java
View file @
25971837
...
...
@@ -2,6 +2,10 @@ package com.gic.haoban.manage.web.controller;
import
java.util.List
;
import
com.gic.haoban.common.utils.GlobalVar
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
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.ResponseBody
;
...
...
@@ -14,16 +18,33 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
@RestController
public
class
ApplicationController
extends
WebBaseController
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
ApplicationController
.
class
);
@Autowired
private
ApplicationApiService
applicationApiService
;
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
@RequestMapping
(
"application-list"
)
public
HaobanResponse
applicationList
()
{
List
<
ApplicationDTO
>
list
=
applicationApiService
.
listApplication
();
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
@RequestMapping
(
"get-auth-url"
)
public
HaobanResponse
getAuthUrl
(){
String
suiteId
=
GlobalVar
.
ctxPropertiesMap
.
get
(
"suiteId"
);
log
.
info
(
"应用ID:{}"
,
suiteId
);
String
redictUrl
=
"http://gicdev.demogic.com/haoban-manage3-web/callback"
;
String
authorizationUrl
=
this
.
qywxSuiteApiService
.
getGrantAuthorizationUrl
(
suiteId
,
redictUrl
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
authorizationUrl
);
}
@RequestMapping
(
"callback"
)
public
HaobanResponse
callback
(
String
code
){
String
suiteId
=
GlobalVar
.
ctxPropertiesMap
.
get
(
"suiteId"
);
String
result
=
this
.
qywxSuiteApiService
.
corpAuth
(
suiteId
,
code
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
);
}
}
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
25971837
...
...
@@ -37,7 +37,8 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService"
id=
"staffDepartmentRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxCorpApiService"
id=
"qywxCorpApiService"
/>
<dubbo:reference
interface=
"com.gic.dict.api.service.ManagerDictService"
id=
"managerDictService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxSuiteApiService"
id=
"qywxSuiteApiService"
/>
</beans>
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