Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
16e091b0
Commit
16e091b0
authored
Mar 08, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.5.2-锁
parent
7db9d4c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+3
-1
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+3
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
16e091b0
...
@@ -25,6 +25,7 @@ import com.alibaba.excel.read.listener.ReadListener;
...
@@ -25,6 +25,7 @@ import com.alibaba.excel.read.listener.ReadListener;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.lock.annotation.Lock4j
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -321,7 +322,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -321,7 +322,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
* @return: java.lang.String
* @return: java.lang.String
**/
**/
@Override
@Override
public
synchronized
String
getCode
(
boolean
isNew
)
{
@Lock4j
(
expire
=
60000
,
acquireTimeout
=
1000
)
public
String
getCode
(
boolean
isNew
)
{
String
nowDay
=
DateUtil
.
getThisDay
();
String
nowDay
=
DateUtil
.
getThisDay
();
int
nowNums
;
int
nowNums
;
String
empCode
=
null
;
String
empCode
=
null
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
16e091b0
...
@@ -25,6 +25,7 @@ import com.alibaba.excel.read.listener.ReadListener;
...
@@ -25,6 +25,7 @@ import com.alibaba.excel.read.listener.ReadListener;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.lock.annotation.Lock4j
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -1438,7 +1439,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -1438,7 +1439,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
* @Date: 2022/6/22 17:52
* @Date: 2022/6/22 17:52
* @return: java.lang.String
* @return: java.lang.String
**/
**/
private
synchronized
String
getCode
()
{
@Lock4j
(
expire
=
60000
,
acquireTimeout
=
1000
)
private
String
getCode
()
{
String
nowDay
=
DateUtil
.
getThisDay
();
String
nowDay
=
DateUtil
.
getThisDay
();
Cache
cache
=
cacheManager
.
getCache
(
CacheConstants
.
EVERYDAY_EMP_CODE
);
Cache
cache
=
cacheManager
.
getCache
(
CacheConstants
.
EVERYDAY_EMP_CODE
);
Object
nowNumObj
=
cache
.
get
(
nowDay
);
Object
nowNumObj
=
cache
.
get
(
nowDay
);
...
...
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