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
57f69c8f
Commit
57f69c8f
authored
Jul 19, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待转移状态的许可激活码不需要处理
parent
3c9408f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
+23
-12
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+3
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+16
-12
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+4
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
57f69c8f
...
...
@@ -187,5 +187,7 @@ public interface StaffMapper {
* @return
*/
List
<
String
>
queryStaffIdsWithEnterpriseId
(
@Param
(
"wxEnterpriseIds"
)
List
<
String
>
wxEnterpriseIds
);
Integer
getNumByActiveCode
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"activeCode"
)
String
activeCode
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
57f69c8f
...
...
@@ -1189,19 +1189,23 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
null
==
activeDataDTO
){
logger
.
info
(
"查询不到企业微信id->{}的许可账号统计信息!"
,
wxEnterprise
.
getWxEnterpriseId
());
}
else
{
//已使用的加1,已激活的加1,未激活的减1
Integer
used
=
activeDataDTO
.
getUsed
();
Integer
inactive
=
activeDataDTO
.
getInactive
();
Integer
activated
=
activeDataDTO
.
getActivated
();
used
++;
activated
++;
if
(
null
!=
inactive
&&
inactive
>
0
){
inactive
--;
//需要区分激活码,待转移状态的激活码不需要处理
Integer
num
=
staffMapper
.
getNumByActiveCode
(
wxEnterprise
.
getWxEnterpriseId
(),
activeCode
);
if
(
num
>
0
){
//已使用的加1,已激活的加1,未激活的减1
Integer
used
=
activeDataDTO
.
getUsed
();
Integer
inactive
=
activeDataDTO
.
getInactive
();
Integer
activated
=
activeDataDTO
.
getActivated
();
used
++;
activated
++;
if
(
null
!=
inactive
&&
inactive
>
0
){
inactive
--;
}
activeDataDTO
.
setUsed
(
used
);
activeDataDTO
.
setInactive
(
inactive
);
activeDataDTO
.
setActivated
(
activated
);
wxEnterpriseActiveDataService
.
updateByStaffActiveDataDTO
(
activeDataDTO
);
}
activeDataDTO
.
setUsed
(
used
);
activeDataDTO
.
setInactive
(
inactive
);
activeDataDTO
.
setActivated
(
activated
);
wxEnterpriseActiveDataService
.
updateByStaffActiveDataDTO
(
activeDataDTO
);
}
}
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
true
);
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
57f69c8f
...
...
@@ -646,5 +646,8 @@
#{wxEnterpriseId}
</foreach>
</select>
<select
id=
"getNumByActiveCode"
resultType=
"java.lang.Integer"
>
SELECT count(*) FROM tab_haoban_staff WHERE wx_enterprise_id = #{wxEnterpriseId} and active_code = #{activeCode}
</select>
</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