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
e51ae217
Commit
e51ae217
authored
Feb 24, 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
ddc59c77
289efcd9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
0 deletions
+42
-0
WxApplicationApiService.java
...ic/haoban/manage/api/service/WxApplicationApiService.java
+11
-0
WxApplicationMapper.java
...haoban/manage/service/dao/mapper/WxApplicationMapper.java
+3
-0
WxApplicationService.java
...c/haoban/manage/service/service/WxApplicationService.java
+1
-0
WxApplicationServiceImpl.java
...manage/service/service/impl/WxApplicationServiceImpl.java
+5
-0
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+1
-0
WxApplicationApiServiceImpl.java
...service/service/out/impl/WxApplicationApiServiceImpl.java
+14
-0
WxApplicationMapper.xml
...service/src/main/resources/mapper/WxApplicationMapper.xml
+7
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxApplicationApiService.java
View file @
e51ae217
...
...
@@ -6,5 +6,16 @@ import com.gic.haoban.manage.api.dto.WxApplicationDTO;
* Created by tgs on 2020/2/22.
*/
public
interface
WxApplicationApiService
{
/**
* 绑定通讯录应用
* @param dto
*/
void
addSuite
(
WxApplicationDTO
dto
);
/**
* 取消应用授权,暂时只是删除wxapplication应用绑定
* @param wxEnterpriseId
* @param suiteId
*/
void
cancelSuite
(
String
wxEnterpriseId
,
String
suiteId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/WxApplicationMapper.java
View file @
e51ae217
...
...
@@ -20,4 +20,6 @@ public interface WxApplicationMapper {
TabHaobanWxApplication
selectBySiteIdAndWxEnterpriseId
(
@Param
(
"siteId"
)
String
siteId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanWxApplication
selectByWxEnterpriseIdAndApplicationType
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"applicationType"
)
int
applicationType
);
int
cancelWxApplication
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"suiteId"
)
String
suiteId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxApplicationService.java
View file @
e51ae217
...
...
@@ -12,4 +12,5 @@ public interface WxApplicationService {
TabHaobanWxApplication
selectByWxEnterpriseIdAndApplicationType
(
String
wxEnterpriseId
,
int
applicationType
);
int
cancalWxApplication
(
String
wxEnterpriseId
,
String
suiteId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxApplicationServiceImpl.java
View file @
e51ae217
...
...
@@ -45,5 +45,10 @@ public class WxApplicationServiceImpl implements WxApplicationService {
return
mapper
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
applicationType
);
}
@Override
public
int
cancalWxApplication
(
String
wxEnterpriseId
,
String
suiteId
)
{
return
this
.
mapper
.
cancelWxApplication
(
wxEnterpriseId
,
suiteId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DepartmentApiServiceImpl.java
View file @
e51ae217
...
...
@@ -341,6 +341,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
for
(
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
departmentDTO
:
list
){
if
(
parentId
==
departmentDTO
.
getParentid
()){
TabHaobanDepartment
exist
=
this
.
departmentService
.
getByWxId
(
departmentDTO
.
getId
()
+
""
,
wxEnterpriseId
);
logger
.
info
(
"分组是否存在:{}"
,
JSON
.
toJSONString
(
exist
));
if
(
exist
==
null
){
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
dto
=
new
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
();
dto
.
setDepartmentName
(
departmentDTO
.
getName
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxApplicationApiServiceImpl.java
View file @
e51ae217
...
...
@@ -2,7 +2,9 @@ package com.gic.haoban.manage.service.service.out.impl;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.manage.api.dto.WxApplicationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.WxApplicationApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxApplication
;
import
com.gic.haoban.manage.service.service.WxApplicationService
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -19,10 +21,22 @@ public class WxApplicationApiServiceImpl implements WxApplicationApiService{
@Autowired
private
WxApplicationService
wxApplicationService
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
@Override
public
void
addSuite
(
WxApplicationDTO
dto
)
{
TabHaobanWxApplication
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanWxApplication
.
class
,
dto
);
this
.
wxApplicationService
.
insert
(
tab
);
}
@Override
public
void
cancelSuite
(
String
corpId
,
String
suiteId
)
{
WxEnterpriseDTO
enterprise
=
this
.
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
corpId
);
if
(
enterprise
!=
null
){
int
i
=
this
.
wxApplicationService
.
cancalWxApplication
(
enterprise
.
getWxEnterpriseId
(),
suiteId
);
log
.
info
(
"取消授权结果:{}"
,
i
);
}
log
.
info
(
"企业未绑定过,{}"
,
corpId
);
}
}
haoban-manage3-service/src/main/resources/mapper/WxApplicationMapper.xml
View file @
e51ae217
...
...
@@ -179,4 +179,10 @@
and status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
</select>
<update
id=
"cancelWxApplication"
>
update tab_haoban_wx_application
set status_flag = 0
where wx_enterprise_id = #{wxEnterpriseId} and suite_id = #{suiteId} and status_flag = 1
</update>
</mapper>
\ No newline at end of file
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