Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
448a6f5a
Commit
448a6f5a
authored
Jul 20, 2023
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.代码优化
parent
8e68ea21
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+2
-2
RegUnitInfoServiceImpl.java
...dule/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+12
-7
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
448a6f5a
...
...
@@ -160,9 +160,9 @@
from
tz_base_enterprise_info
where
qr_code
<![CDATA[<>]]>
''
(qr_code is null or LENGTH(qr_code) = 0)
and use_code
<![CDATA[<>]]>
''
limit 100
limit 100
0
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
448a6f5a
...
...
@@ -236,21 +236,26 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
@Scheduled
(
cron
=
"${async.set.qr-code.cron:0 0/1 * * * ?}"
)
public
void
asyncSetQrCode
(){
//
给所有新注册的企业创建二维码,
每次处理100个,不排序
if
(
log
.
isDebugEnabled
())
{
public
void
asyncSetQrCode
()
{
//
给所有新注册的企业创建二维码,
每次处理100个,不排序
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"新注册企业二维码生成开始"
);
}
List
<
TzBaseEnterpriseInfo
>
noQrCodeList
=
tzBaseEnterpriseInfoMapper
.
listNoQrCode
();
if
(
noQrCodeList
.
isEmpty
())
{
if
(
log
.
isDebugEnabled
())
{
if
(
noQrCodeList
.
isEmpty
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"暂无待生成二维码的企业"
);
}
return
;
}
noQrCodeList
.
forEach
(
e
->
e
.
setQrCode
(
createQRCode
(
e
.
getUseCode
())));
noQrCodeList
.
parallelStream
().
forEach
(
enterpriseInfo
->
{
enterpriseInfo
.
setQrCode
(
createQRCode
(
enterpriseInfo
.
getUseCode
()));
});
tzBaseEnterpriseInfoService
.
saveOrUpdateBatch
(
noQrCodeList
);
if
(
log
.
isDebugEnabled
()){
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"新注册企业二维码生成结束"
);
}
}
...
...
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