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
26d71992
Commit
26d71992
authored
Jan 17, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/获取用户敏感信息' into 'developer'
Feature/获取用户敏感信息 See merge request
!869
parents
826b3ef4
d437c666
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
120 additions
and
24 deletions
+120
-24
HaobanTimerApiService.java
.../gic/haoban/manage/api/service/HaobanTimerApiService.java
+11
-0
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+4
-2
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+21
-13
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+69
-3
HaobanTimerApiServiceImpl.java
...e/service/service/out/impl/HaobanTimerApiServiceImpl.java
+9
-0
HaobanQywxFeeApiServiceImpl.java
...ice/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
+0
-5
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-1
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+4
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/HaobanTimerApiService.java
View file @
26d71992
...
@@ -99,5 +99,16 @@ public interface HaobanTimerApiService {
...
@@ -99,5 +99,16 @@ public interface HaobanTimerApiService {
* @throws
* @throws
*/
*/
public
ServiceResponse
<
Void
>
ownerDimission
(
String
params
);
public
ServiceResponse
<
Void
>
ownerDimission
(
String
params
);
/**
*
* @Title: activedAccountTimer
* @Description: 获取激活账号
* @author xgh331
* @param params
* @return
* @throws
*/
public
ServiceResponse
<
Void
>
activedAccountTimer
(
String
params
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
26d71992
...
@@ -5,8 +5,8 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaff;
...
@@ -5,8 +5,8 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
public
interface
StaffMapper
{
public
interface
StaffMapper
{
...
@@ -132,7 +132,9 @@ public interface StaffMapper {
...
@@ -132,7 +132,9 @@ public interface StaffMapper {
* @author mozhu
* @author mozhu
* @date 2022-08-03 17:36:52
* @date 2022-08-03 17:36:52
*/
*/
int
updateActiveStatusById
(
@Param
(
"activeStatus"
)
Integer
activeStatus
,
@Param
(
"staffId"
)
String
staffId
);
int
updateActiveStatusById
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"activeCode"
)
String
activeCode
,
@Param
(
"activeTime"
)
Date
activeTime
,
@Param
(
"expireTime"
)
Date
expireTime
,
@Param
(
"activeDoTime"
)
Date
activeDoTime
,
@Param
(
"activeStatus"
)
Integer
activeStatus
);
/**
/**
* 重置添加num
* 重置添加num
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
26d71992
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
java.util.Date
;
import
java.util.List
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
import
java.util.Set
;
public
interface
StaffService
{
public
interface
StaffService
{
TabHaobanStaff
selectById
(
String
staffId
);
TabHaobanStaff
selectById
(
String
staffId
);
...
@@ -131,17 +131,25 @@ public interface StaffService {
...
@@ -131,17 +131,25 @@ public interface StaffService {
* @date 2022-07-25 16:36:53
* @date 2022-07-25 16:36:53
*/
*/
int
resetAddNum
();
int
resetAddNum
();
/**
/**
* 更新是否激活
*
*
* @Title: updateActiveStatusById
* @param activeStatus 活跃状态
* @Description: 更新激活账号
* @param staffId 员工id
* @return
* @return int
* @throws
* @author mozhu
* @date 2022-08-04 15:39:54
*/
*/
int
updateActiveStatusById
(
Integer
activeStatus
,
String
staffId
);
int
updateActiveStatusById
(
String
staffId
,
String
activeCode
,
Date
activeTime
,
Date
expireTime
,
Date
activeDoTime
,
Integer
activeStatus
);
void
updateOpenConcatFlag
(
List
<
String
>
wxUserIdList
,
int
mixFlag
);
void
updateOpenConcatFlag
(
List
<
String
>
wxUserIdList
,
int
mixFlag
);
/**
*
* @Title: activedAccountTimer
* @Description: 更新激活账号
* @author xgh331
* @throws
*/
void
activedAccountTimer
(
String
wxEid
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
26d71992
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -10,14 +10,22 @@ import org.apache.logging.log4j.Logger;
...
@@ -10,14 +10,22 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.wechat.api.dto.qywx.fee.AccountListDTO
;
import
com.gic.wechat.api.dto.qywx.fee.AccountListResponseDTO
;
import
com.gic.wechat.api.service.qywx.QywxOrderApiService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
...
@@ -28,6 +36,13 @@ public class StaffServiceImpl implements StaffService {
...
@@ -28,6 +36,13 @@ public class StaffServiceImpl implements StaffService {
@Autowired
@Autowired
private
StaffMapper
mapper
;
private
StaffMapper
mapper
;
@Autowired
private
QywxOrderApiService
qywxOrderApiService
;
@Autowired
private
WxEnterpriseMapper
wxEnterpriseMapper
;
@Autowired
private
Config
config
;
@Override
@Override
public
TabHaobanStaff
selectById
(
String
id
)
{
public
TabHaobanStaff
selectById
(
String
id
)
{
if
(
StringUtils
.
isBlank
(
id
))
{
if
(
StringUtils
.
isBlank
(
id
))
{
...
@@ -146,9 +161,11 @@ public class StaffServiceImpl implements StaffService {
...
@@ -146,9 +161,11 @@ public class StaffServiceImpl implements StaffService {
public
int
resetAddNum
()
{
public
int
resetAddNum
()
{
return
mapper
.
resetAddNum
();
return
mapper
.
resetAddNum
();
}
}
@Override
@Override
public
int
updateActiveStatusById
(
Integer
activeStatus
,
String
staffId
)
{
public
int
updateActiveStatusById
(
String
staffId
,
String
activeCode
,
Date
activeTime
,
Date
expireTime
,
Date
activeDoTime
,
Integer
activeStatus
)
{
return
mapper
.
updateActiveStatusById
(
activeStatus
,
staffId
);
return
mapper
.
updateActiveStatusById
(
activeStatus
,
staffId
);
}
}
...
@@ -159,4 +176,53 @@ public class StaffServiceImpl implements StaffService {
...
@@ -159,4 +176,53 @@ public class StaffServiceImpl implements StaffService {
}
}
this
.
mapper
.
updateOpenConcatFlag
(
wxUserIdList
,
mixFlag
);
this
.
mapper
.
updateOpenConcatFlag
(
wxUserIdList
,
mixFlag
);
}
}
@Override
public
void
activedAccountTimer
(
String
wxEid
)
{
List
<
TabHaobanWxEnterprise
>
list
=
new
ArrayList
<>()
;
if
(
"-1"
.
equals
(
wxEid
))
{
list
=
this
.
wxEnterpriseMapper
.
listAll
()
;
}
else
{
TabHaobanWxEnterprise
en
=
this
.
wxEnterpriseMapper
.
selectByPrimaryKey
(
wxEid
)
;
if
(
null
!=
en
)
{
list
.
add
(
en
)
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
TabHaobanWxEnterprise
item
:
list
)
{
if
(
item
.
getWxSecurityType
()>
0
&&
StringUtils
.
isNotEmpty
(
item
.
getOpenCorpid
())
&&
item
.
getStatusFlag
()==
1
)
{
this
.
listAccount
(
item
,
500
,
null
);
}
}
}
}
private
void
listAccount
(
TabHaobanWxEnterprise
wxEnterprise
,
int
limit
,
String
cursor
)
{
String
wxEnterpriseId
=
wxEnterprise
.
getWxEnterpriseId
()
;
String
openCorpid
=
wxEnterprise
.
getOpenCorpid
()
;
ServiceResponse
<
AccountListResponseDTO
>
resp
=
this
.
qywxOrderApiService
.
listActivedAccount
(
config
.
getCorpid
(),
openCorpid
,
limit
,
cursor
)
;
log
.
info
(
"查询激活账号,wxEid={},返回={}"
,
wxEnterpriseId
,
JSON
.
toJSONString
(
resp
));
if
(
resp
.
isSuccess
())
{
AccountListResponseDTO
dto
=
resp
.
getResult
()
;
List
<
AccountListDTO
>
list
=
dto
.
getAccountList
()
;
this
.
updateAccount
(
wxEnterpriseId
,
list
);
cursor
=
dto
.
getNextCursor
()
;
// 从企微拉取下一批数据
if
(
StringUtils
.
isNotBlank
(
cursor
))
{
this
.
listAccount
(
wxEnterprise
,
limit
,
cursor
);
}
}
}
private
void
updateAccount
(
String
wxEnterpriseId
,
List
<
AccountListDTO
>
list
)
{
for
(
AccountListDTO
item
:
list
)
{
String
userId
=
item
.
getUserid
()
;
String
activeCode
=
item
.
getActiveCode
()
;
Date
start
=
new
Date
(
item
.
getActiveTime
()*
1000L
)
;
Date
end
=
new
Date
(
item
.
getExpireTime
()*
1000L
)
;
TabHaobanStaff
staff
=
this
.
mapper
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
)
;
this
.
updateActiveStatusById
(
staff
.
getStaffId
(),
activeCode
,
start
,
end
,
new
Date
(),
1
)
;
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HaobanTimerApiServiceImpl.java
View file @
26d71992
...
@@ -7,6 +7,7 @@ import com.gic.api.base.commons.ServiceResponse;
...
@@ -7,6 +7,7 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.haoban.manage.api.service.HaobanTimerApiService
;
import
com.gic.haoban.manage.api.service.HaobanTimerApiService
;
import
com.gic.haoban.manage.service.service.ExternalClerkRelatedService
;
import
com.gic.haoban.manage.service.service.ExternalClerkRelatedService
;
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.chat.GroupChatService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
...
@@ -21,6 +22,8 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
...
@@ -21,6 +22,8 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
private
StaffDepartmentRelatedService
staffDepartmentRelatedService
;
private
StaffDepartmentRelatedService
staffDepartmentRelatedService
;
@Autowired
@Autowired
private
GroupChatService
groupChatService
;
private
GroupChatService
groupChatService
;
@Autowired
private
StaffService
staffService
;
@Override
@Override
public
ServiceResponse
<
Void
>
deleteTempWxHm
(
String
params
)
{
public
ServiceResponse
<
Void
>
deleteTempWxHm
(
String
params
)
{
...
@@ -69,4 +72,10 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
...
@@ -69,4 +72,10 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
this
.
groupChatService
.
ownerDimission
();
this
.
groupChatService
.
ownerDimission
();
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
@Override
public
ServiceResponse
<
Void
>
activedAccountTimer
(
String
params
)
{
this
.
staffService
.
activedAccountTimer
()
;
return
ServiceResponse
.
success
();
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
View file @
26d71992
...
@@ -323,7 +323,6 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
...
@@ -323,7 +323,6 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
return
;
return
;
}
}
List
<
AccountListDTO
>
activeInfoList
=
activeInfoUserResponseDTO
.
getActiveInfoList
();
List
<
AccountListDTO
>
activeInfoList
=
activeInfoUserResponseDTO
.
getActiveInfoList
();
Integer
activeStatus
=
activeInfoUserResponseDTO
.
getActiveStatus
();
TabHaobanStaff
tabHaobanStaff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userid
,
wxEnterpriseId
);
TabHaobanStaff
tabHaobanStaff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userid
,
wxEnterpriseId
);
for
(
AccountListDTO
accountListDTO
:
activeInfoList
)
{
for
(
AccountListDTO
accountListDTO
:
activeInfoList
)
{
TabHaobanQywxFeeAccountStaff
tabHaobanQywxFeeAccountStaff
=
new
TabHaobanQywxFeeAccountStaff
();
TabHaobanQywxFeeAccountStaff
tabHaobanQywxFeeAccountStaff
=
new
TabHaobanQywxFeeAccountStaff
();
...
@@ -340,10 +339,6 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
...
@@ -340,10 +339,6 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFeeAccountStaff
.
setActiveTime
(
DateUtil
.
date
(
accountListDTO
.
getActiveTime
()
*
1000
));
tabHaobanQywxFeeAccountStaff
.
setActiveTime
(
DateUtil
.
date
(
accountListDTO
.
getActiveTime
()
*
1000
));
haobanQywxFeeAccountStaffService
.
insert
(
tabHaobanQywxFeeAccountStaff
);
haobanQywxFeeAccountStaffService
.
insert
(
tabHaobanQywxFeeAccountStaff
);
}
}
if
(
tabHaobanStaff
!=
null
)
{
String
staffId
=
tabHaobanStaff
.
getStaffId
();
staffService
.
updateActiveStatusById
(
activeStatus
,
staffId
);
}
}
}
}
}
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
26d71992
...
@@ -201,6 +201,6 @@
...
@@ -201,6 +201,6 @@
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxChatApiService"
id=
"qywxChatApiService"
timeout=
"10000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxChatApiService"
id=
"qywxChatApiService"
timeout=
"10000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.member.tag.api.service.MemberTagGroupApiService"
id=
"memberTagGroupApiService"
timeout=
"10000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.member.tag.api.service.MemberTagGroupApiService"
id=
"memberTagGroupApiService"
timeout=
"10000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.ScreeningDetailService"
id=
"screeningDetailService"
timeout=
"10000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.ScreeningDetailService"
id=
"screeningDetailService"
timeout=
"10000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxOrderApiService"
id=
"qywxOrderApiService"
timeout=
"10000"
retries=
"0"
/>
</beans>
</beans>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
26d71992
...
@@ -483,6 +483,10 @@
...
@@ -483,6 +483,10 @@
<update
id=
"updateActiveStatusById"
>
<update
id=
"updateActiveStatusById"
>
update tab_haoban_staff
update tab_haoban_staff
set active_status = #{activeStatus},
set active_status = #{activeStatus},
`active_code` = #{activeCode},
`active_time` = #{activeTime},
`expire_time` = #{expireTime},
`active_do_time` = #{activeDoTime},
update_time = now()
update_time = now()
where staff_id = #{staffId}
where staff_id = #{staffId}
</update>
</update>
...
...
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