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
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
haoban3.0
haoban-manage3.0
Commits
c6312bba
Commit
c6312bba
authored
Mar 24, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
日志 See merge request
!3
parents
efec22cd
e3288b1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
ApplicationController.java
...c/haoban/manage/web/controller/ApplicationController.java
+11
-6
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ApplicationController.java
View file @
c6312bba
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.io.IOException
;
import
java.util.List
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -29,6 +30,8 @@ import com.gic.haoban.common.utils.HaobanResponse;
import
com.gic.haoban.manage.api.service.ApplicationApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
javax.servlet.http.HttpServletResponse
;
@RestController
public
class
ApplicationController
extends
WebBaseController
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
ApplicationController
.
class
);
...
...
@@ -65,7 +68,6 @@ public class ApplicationController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
@RequestMapping
(
"has-bind-contract"
)
@IgnoreLogin
public
HaobanResponse
hasBindContract
(){
LoginVO
login
=
AuthRequestUtil
.
getSessionUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
...
...
@@ -77,7 +79,6 @@ public class ApplicationController extends WebBaseController{
}
@RequestMapping
(
"get-auth-url"
)
@IgnoreLogin
public
HaobanResponse
getAuthUrl
(){
String
suiteId
=
config
.
getSuiteId
();
log
.
info
(
"应用ID:{}"
,
suiteId
);
...
...
@@ -87,8 +88,7 @@ public class ApplicationController extends WebBaseController{
}
@RequestMapping
(
"callback"
)
@IgnoreLogin
public
HaobanResponse
callback
(
String
auth_code
){
public
void
callback
(
String
auth_code
,
HttpServletResponse
response
){
String
suiteId
=
config
.
getSuiteId
();
String
result
=
this
.
qywxSuiteApiService
.
corpAuth
(
suiteId
,
auth_code
);
log
.
info
(
"企业微信回调结果:{}. {}"
,
auth_code
,
result
);
...
...
@@ -106,9 +106,14 @@ public class ApplicationController extends WebBaseController{
this
.
departmentApiService
.
initwxDepartment
(
dto
.
getCorpid
(),
suiteId
,
enterpriseDTO
.
getWxEnterpriseId
());
enterpriseDTO
.
setContactFlag
(
1
);
wxEnterpriseApiService
.
update
(
enterpriseDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
dto
);
String
redirectUri
=
config
.
getHost
()
+
"index"
;
redirectUri
=
redirectUri
.
replace
(
"haoban-manage3-web"
,
"haoban-3/#"
);
try
{
response
.
sendRedirect
(
redirectUri
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
@RequestMapping
(
"cancal-suite"
)
...
...
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