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
d22a7e87
Commit
d22a7e87
authored
Feb 23, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/haoban3.0/haoban-manage3.0.git
into developer
parents
e8bc46ce
27417c5d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
14 deletions
+20
-14
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+14
-11
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+1
-0
ApplicationController.java
...c/haoban/manage/web/controller/ApplicationController.java
+0
-1
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+5
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DepartmentApiServiceImpl.java
View file @
d22a7e87
...
...
@@ -321,7 +321,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
=
this
.
qywxDepartmentApiService
.
listDepartment
(
corpid
,
suiteid
,
null
);
logger
.
info
(
"企业所有部门数据:{}"
,
JSON
.
toJSONString
(
list
));
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
this
.
addAllDepartment
(
list
,
1
,
wxEnterpriseId
);
this
.
addAllDepartment
(
list
,
0
,
wxEnterpriseId
);
}
}
...
...
@@ -330,7 +330,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
int
level
=
1
;
String
chainId
=
"0"
;
String
chainName
=
"0"
;
if
(
parentId
!=
1
){
if
(
parentId
!=
0
){
TabHaobanDepartment
parent
=
this
.
departmentService
.
getByWxId
(
parentId
+
""
,
wxEnterpriseId
);
if
(
parent
!=
null
){
level
=
parent
.
getLevel
()
+
1
;
...
...
@@ -340,15 +340,18 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
}
for
(
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
departmentDTO
:
list
){
if
(
parentId
==
departmentDTO
.
getParentid
()){
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
dto
=
new
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
();
dto
.
setDepartmentName
(
departmentDTO
.
getName
());
dto
.
setLevel
(
level
);
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setWxDepartmentId
(
departmentDTO
.
getId
()+
""
);
dto
.
setParentDepartmentId
(
parentId
+
""
);
dto
.
setChainId
(
chainId
);
dto
.
setChainName
(
chainName
);
this
.
departmentService
.
add
(
dto
);
TabHaobanDepartment
exist
=
this
.
departmentService
.
getByWxId
(
departmentDTO
.
getId
()
+
""
,
wxEnterpriseId
);
if
(
exist
==
null
){
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
dto
=
new
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
();
dto
.
setDepartmentName
(
departmentDTO
.
getName
());
dto
.
setLevel
(
level
);
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setWxDepartmentId
(
departmentDTO
.
getId
()+
""
);
dto
.
setParentDepartmentId
(
parentId
+
""
);
dto
.
setChainId
(
chainId
);
dto
.
setChainName
(
chainName
);
this
.
departmentService
.
add
(
dto
);
}
this
.
addAllDepartment
(
list
,
departmentDTO
.
getId
(),
wxEnterpriseId
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
d22a7e87
...
...
@@ -212,6 +212,7 @@ public class MessageApiServiceImpl implements MessageApiService {
continue
;
}
StaffDepartmentRelatedDTO
related
=
new
StaffDepartmentRelatedDTO
();
related
.
setWxEnterpriseId
(
wxEnterpriseId
);
related
.
setWxUserId
(
qywxCallBackDTO
.
getUserid
());
related
.
setClerkCode
(
qywxCallBackDTO
.
getUserid
());
related
.
setDepartmentId
(
department
.
getDepartmentId
());
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ApplicationController.java
View file @
d22a7e87
...
...
@@ -49,7 +49,6 @@ public class ApplicationController extends WebBaseController{
@RequestMapping
(
"get-auth-url"
)
@IgnoreLogin
public
HaobanResponse
getAuthUrl
(){
//String suiteId = GlobalVar.ctxPropertiesMap.get("suiteId");
String
suiteId
=
config
.
getSuiteId
();
log
.
info
(
"应用ID:{}"
,
suiteId
);
String
redictUrl
=
config
.
getHost
()
+
"callback"
;
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
d22a7e87
...
...
@@ -18,6 +18,9 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import
com.gic.haoban.manage.web.vo.LoginVO
;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
@RestController
public
class
LoginController
extends
WebBaseController
{
...
...
@@ -50,10 +53,10 @@ public class LoginController extends WebBaseController{
}
@RequestMapping
(
"get-login-qrcode"
)
public
HaobanResponse
getLoginQrcode
(){
public
HaobanResponse
getLoginQrcode
()
throws
UnsupportedEncodingException
{
String
corpid
=
config
.
getCorpid
();
String
redirectUri
=
config
.
getHost
()
+
"login"
;
String
url
=
"https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid="
+
corpid
+
"&redirectUri="
+
redirectUri
+
"&state=web_login@gyoss9&usertype=admin"
;
String
url
=
"https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid="
+
corpid
+
"&redirectUri="
+
URLEncoder
.
encode
(
redirectUri
,
"UTF-8"
)
+
"&state=web_login@gyoss9&usertype=admin"
;
//String url = qywxCorpApiService.getGrantAuthorizationUrl(siteId, redirectUri);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
URL
.
decode
(
url
));
...
...
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