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
b3f706ca
Commit
b3f706ca
authored
Apr 08, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5f203fe8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
49 deletions
+23
-49
DepartmentApiService.java
...m/gic/haoban/manage/api/service/DepartmentApiService.java
+1
-1
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+1
-1
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+0
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+9
-36
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+0
-4
AdminController.java
...com/gic/haoban/manage/web/controller/AdminController.java
+1
-1
ApplicationController.java
...c/haoban/manage/web/controller/ApplicationController.java
+11
-6
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DepartmentApiService.java
View file @
b3f706ca
...
@@ -120,7 +120,7 @@ public interface DepartmentApiService {
...
@@ -120,7 +120,7 @@ public interface DepartmentApiService {
List
<
DepartmentDTO
>
listByChainId
(
String
chainId
,
String
wxEnterpriseId
);
List
<
DepartmentDTO
>
listByChainId
(
String
chainId
,
String
wxEnterpriseId
);
void
initwxDepartment
(
String
corpid
,
String
suiteid
,
String
wxEnterpriseId
);
void
initwxDepartment
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
);
/**
/**
* 回收站的数量
* 回收站的数量
* @param wxEnterpriseId
* @param wxEnterpriseId
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
b3f706ca
...
@@ -47,7 +47,7 @@ public interface StaffApiService {
...
@@ -47,7 +47,7 @@ public interface StaffApiService {
StaffDepartmentRelatedDTO
getDepartmentIdAndCode
(
String
departmentId
,
String
code
);
StaffDepartmentRelatedDTO
getDepartmentIdAndCode
(
String
departmentId
,
String
code
);
void
initWxUser
(
String
corpid
,
String
suiteid
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
);
void
initWxUser
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
);
public
List
<
String
>
listUnBindClerk
(
String
storeId
);
public
List
<
String
>
listUnBindClerk
(
String
storeId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DepartmentApiServiceImpl.java
View file @
b3f706ca
This diff is collapsed.
Click to expand it.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
b3f706ca
...
@@ -47,17 +47,14 @@ import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
...
@@ -47,17 +47,14 @@ import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxApplication
;
import
com.gic.haoban.manage.service.service.DepartmentService
;
import
com.gic.haoban.manage.service.service.DepartmentService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.UserLoginLogService
;
import
com.gic.haoban.manage.service.service.UserLoginLogService
;
import
com.gic.haoban.manage.service.service.WxApplicationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.google.i18n.phonenumbers.PhoneNumberUtil
;
@Service
@Service
public
class
StaffApiServiceImpl
implements
StaffApiService
{
public
class
StaffApiServiceImpl
implements
StaffApiService
{
...
@@ -77,8 +74,6 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -77,8 +74,6 @@ public class StaffApiServiceImpl implements StaffApiService {
@Autowired
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
private
WxEnterpriseService
wxEnterpriseService
;
@Autowired
@Autowired
private
WxApplicationService
wxApplicationService
;
@Autowired
private
DepartmentService
departmentService
;
private
DepartmentService
departmentService
;
@Autowired
@Autowired
private
ClerkService
clerkService
;
private
ClerkService
clerkService
;
...
@@ -126,9 +121,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -126,9 +121,7 @@ public class StaffApiServiceImpl implements StaffApiService {
//调接口获取
//调接口获取
String
wxUserId
=
""
;
String
wxUserId
=
""
;
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
staff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
userDTO
=
new
UserDTO
();
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
...
@@ -151,7 +144,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -151,7 +144,7 @@ public class StaffApiServiceImpl implements StaffApiService {
userDTO
.
setTo_invite
(
true
);
userDTO
.
setTo_invite
(
true
);
}
}
logger
.
info
(
"【店员新增】userDTO = {}"
,
JSON
.
toJSONString
(
userDTO
));
logger
.
info
(
"【店员新增】userDTO = {}"
,
JSON
.
toJSONString
(
userDTO
));
JSONResponse
jp
=
qywxUserApiService
.
createWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
());
JSONResponse
jp
=
qywxUserApiService
.
createSelfWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
());
logger
.
info
(
"【店员新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
logger
.
info
(
"【店员新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setCode
(
0
);
...
@@ -161,7 +154,6 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -161,7 +154,6 @@ public class StaffApiServiceImpl implements StaffApiService {
staffService
.
add
(
tab
);
staffService
.
add
(
tab
);
wxUserId
=
staffId
;
wxUserId
=
staffId
;
}
}
}
if
(
StringUtils
.
isNotBlank
(
wxUserId
)){
if
(
StringUtils
.
isNotBlank
(
wxUserId
)){
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
for
(
String
string
:
departmentIdArr
)
{
for
(
String
string
:
departmentIdArr
)
{
...
@@ -229,13 +221,10 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -229,13 +221,10 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
relatedList
.
size
()
==
1
)
{
if
(
relatedList
.
size
()
==
1
)
{
TabHaobanStaff
staff
=
staffService
.
selectById
(
relatedList
.
get
(
0
).
getStaffId
());
TabHaobanStaff
staff
=
staffService
.
selectById
(
relatedList
.
get
(
0
).
getStaffId
());
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
staff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
JSONResponse
jp
=
qywxUserApiService
.
deleteSelfWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
staff
.
getWxUserId
());
JSONResponse
jp
=
qywxUserApiService
.
deleteWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
staff
.
getWxUserId
());
logger
.
info
(
"【删除成员】jp={}"
,
JSON
.
toJSONString
(
jp
));
logger
.
info
(
"【删除成员】jp={}"
,
JSON
.
toJSONString
(
jp
));
}
}
}
staffDepartmentRelatedService
.
del
(
related
);
staffDepartmentRelatedService
.
del
(
related
);
staffService
.
delByuserid
(
relatedList
.
get
(
0
).
getStaffId
());
staffService
.
delByuserid
(
relatedList
.
get
(
0
).
getStaffId
());
...
@@ -297,14 +286,9 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -297,14 +286,9 @@ public class StaffApiServiceImpl implements StaffApiService {
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
if
(
staff
==
null
)
{
if
(
staff
==
null
)
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
application
==
null
){
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
}
if
(
enterpriseDTO
!=
null
)
{
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
Date
now
=
new
Date
();
Date
now
=
new
Date
();
UserDTO
user
=
qywxUserApiService
.
getWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
userId
);
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
userId
);
logger
.
info
(
"【新增用户】user={}"
,
JSON
.
toJSONString
(
user
));
logger
.
info
(
"【新增用户】user={}"
,
JSON
.
toJSONString
(
user
));
TabHaobanStaff
tab
=
new
TabHaobanStaff
();
TabHaobanStaff
tab
=
new
TabHaobanStaff
();
tab
.
setWxUserId
(
userId
);
tab
.
setWxUserId
(
userId
);
...
@@ -353,16 +337,10 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -353,16 +337,10 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
}
}
}
}
}
}
else
{
}
else
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
application
==
null
){
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
}
if
(
enterpriseDTO
!=
null
)
{
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
userId
);
UserDTO
user
=
qywxUserApiService
.
getWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
userId
);
logger
.
info
(
"【修改用户】user={}"
,
JSON
.
toJSONString
(
user
));
logger
.
info
(
"【修改用户】user={}"
,
JSON
.
toJSONString
(
user
));
Integer
[]
departmentId
=
user
.
getDepartment
();
Integer
[]
departmentId
=
user
.
getDepartment
();
String
departmentIds
=
""
;
String
departmentIds
=
""
;
...
@@ -382,7 +360,6 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -382,7 +360,6 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
}
}
}
}
}
@Override
@Override
public
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
)
{
public
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
)
{
...
@@ -492,9 +469,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -492,9 +469,7 @@ public class StaffApiServiceImpl implements StaffApiService {
Boolean
weixinPush
=
staffDTO
.
getWeixinPush
();
Boolean
weixinPush
=
staffDTO
.
getWeixinPush
();
if
(
weixinPush
==
null
||
!
weixinPush
){
if
(
weixinPush
==
null
||
!
weixinPush
){
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
oldStaff
.
getWxEnterpriseId
());
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
oldStaff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
oldStaff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
userDTO
=
new
UserDTO
();
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
userDTO
.
setAlias
(
staffDTO
.
getNickName
());
userDTO
.
setAlias
(
staffDTO
.
getNickName
());
...
@@ -514,12 +489,11 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -514,12 +489,11 @@ public class StaffApiServiceImpl implements StaffApiService {
userDTO
.
setUserid
(
oldStaff
.
getWxUserId
());
userDTO
.
setUserid
(
oldStaff
.
getWxUserId
());
userDTO
.
setPosition
(
staffDTO
.
getPostion
());
userDTO
.
setPosition
(
staffDTO
.
getPostion
());
userDTO
.
setExternal_position
(
staffDTO
.
getExtendPostion
());
userDTO
.
setExternal_position
(
staffDTO
.
getExtendPostion
());
JSONResponse
jp
=
qywxUserApiService
.
updateWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
());
JSONResponse
jp
=
qywxUserApiService
.
updateSelfWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
());
}
}
}
}
}
}
}
@Override
@Override
public
void
syscGicClerk
(
String
fieldListString
)
{
public
void
syscGicClerk
(
String
fieldListString
)
{
...
@@ -773,12 +747,11 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -773,12 +747,11 @@ public class StaffApiServiceImpl implements StaffApiService {
return
staff
;
return
staff
;
}
}
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
null
==
enterpriseDTO
||
application
==
null
)
{
if
(
null
==
enterpriseDTO
)
{
return
null
;
return
null
;
}
}
String
userId
=
qywxUserApiService
.
get
WxUserIdByPhonenumber
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
phoneNumber
);
String
userId
=
qywxUserApiService
.
get
SelfWxUserIdByPhonenumber
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
phoneNumber
);
logger
.
info
(
"获取userId:{},{}"
,
phoneNumber
,
userId
);
logger
.
info
(
"获取userId:{},{}"
,
phoneNumber
,
userId
);
if
(
userId
==
null
)
{
if
(
userId
==
null
)
{
return
null
;
return
null
;
...
@@ -793,8 +766,8 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -793,8 +766,8 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
@Override
public
void
initWxUser
(
String
corpid
,
String
suiteid
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
)
{
public
void
initWxUser
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
)
{
List
<
UserDTO
>
list
=
this
.
qywxUserApiService
.
list
DepartmentUser
(
corpid
,
suiteid
,
wxDepartmentId
.
toString
(),
0
);
List
<
UserDTO
>
list
=
this
.
qywxUserApiService
.
list
SelfDepartmentUser
(
corpid
,
contactSecret
,
wxDepartmentId
.
toString
(),
0
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
for
(
UserDTO
dto
:
list
){
for
(
UserDTO
dto
:
list
){
this
.
wxGetAdd
(
dto
.
getUserid
(),
wxEnterpriseId
);
this
.
wxGetAdd
(
dto
.
getUserid
(),
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
b3f706ca
...
@@ -47,10 +47,6 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -47,10 +47,6 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
private
WxEnterpriseMapper
wxEnterpriseMapper
;
private
WxEnterpriseMapper
wxEnterpriseMapper
;
@Autowired
@Autowired
private
WxApplicationService
wxApplicationService
;
private
WxApplicationService
wxApplicationService
;
@Autowired
private
QywxDepartmentApiService
qywxDepartmentApiService
;
@Autowired
private
DepartmentService
departmentService
;
@Override
@Override
public
void
callbackReviceEnterprise
(
QywxCorpInfoSimpleDTO
dto
)
{
public
void
callbackReviceEnterprise
(
QywxCorpInfoSimpleDTO
dto
)
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AdminController.java
View file @
b3f706ca
...
@@ -48,7 +48,7 @@ public class AdminController extends WebBaseController{
...
@@ -48,7 +48,7 @@ public class AdminController extends WebBaseController{
public
HaobanResponse
adminList
()
{
public
HaobanResponse
adminList
()
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
WxEnterpriseDTO
enterprise
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
WxEnterpriseDTO
enterprise
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
logger
.
info
(
"【管理员查询】corpid={},siteId={},agentId={}"
,
enterprise
.
getCorpid
(),
application
.
getSiteId
(),
application
.
getAgentId
());
logger
.
info
(
"【管理员查询】corpid={},siteId={},agentId={}"
,
enterprise
.
getCorpid
(),
application
.
getSiteId
(),
application
.
getAgentId
());
String
adminList
=
qywxSuiteApiService
.
getAdminList
(
enterprise
.
getCorpid
(),
application
.
getSiteId
(),
Integer
.
parseInt
(
application
.
getAgentId
()));
String
adminList
=
qywxSuiteApiService
.
getAdminList
(
enterprise
.
getCorpid
(),
application
.
getSiteId
(),
Integer
.
parseInt
(
application
.
getAgentId
()));
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ApplicationController.java
View file @
b3f706ca
...
@@ -102,13 +102,18 @@ public class ApplicationController extends WebBaseController{
...
@@ -102,13 +102,18 @@ public class ApplicationController extends WebBaseController{
}
}
@RequestMapping
(
"has-bind-contract"
)
@RequestMapping
(
"has-bind-contract"
)
public
HaobanResponse
hasBindContract
(){
public
HaobanResponse
hasBindContract
(){
LoginVO
login
=
AuthRequestUtil
.
getSessio
nUser
();
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLogi
nUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
WxApplicationDTO
wxApplicationDTO
=
this
.
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
WxEnterpriseDTO
enterpriseDTO
=
this
.
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
wxApplicationDTO
!=
null
){
if
(
enterpriseDTO
!=
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
true
);
if
(
StringUtils
.
isNotBlank
(
enterpriseDTO
.
getContactSecret
())
&&
enterpriseDTO
.
getContactFlag
()
!=
null
&&
enterpriseDTO
.
getContactFlag
()
==
1
){
this
.
departmentApiService
.
initwxDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
enterpriseDTO
.
getWxEnterpriseId
());
enterpriseDTO
.
setContactFlag
(
1
);
wxEnterpriseApiService
.
update
(
enterpriseDTO
);
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
false
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
true
);
}
}
@RequestMapping
(
"get-auth-url"
)
@RequestMapping
(
"get-auth-url"
)
...
@@ -136,7 +141,7 @@ public class ApplicationController extends WebBaseController{
...
@@ -136,7 +141,7 @@ public class ApplicationController extends WebBaseController{
applicationDTO
.
setAgentName
(
dto
.
getAgentName
());
applicationDTO
.
setAgentName
(
dto
.
getAgentName
());
applicationDTO
.
setSiteId
(
dto
.
getSuiteId
());
applicationDTO
.
setSiteId
(
dto
.
getSuiteId
());
wxApplicationApiService
.
addSuite
(
applicationDTO
);
wxApplicationApiService
.
addSuite
(
applicationDTO
);
this
.
departmentApiService
.
initwxDepartment
(
dto
.
getCorpid
(),
suiteId
,
enterpriseDTO
.
getWxEnterpriseId
());
this
.
departmentApiService
.
initwxDepartment
(
dto
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
()
,
enterpriseDTO
.
getWxEnterpriseId
());
enterpriseDTO
.
setContactFlag
(
1
);
enterpriseDTO
.
setContactFlag
(
1
);
wxEnterpriseApiService
.
update
(
enterpriseDTO
);
wxEnterpriseApiService
.
update
(
enterpriseDTO
);
}
}
...
...
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