Commit 1a7ca75b authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.5.2' into MVP1.5.2

parents eb102d78 a1947598
...@@ -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;
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment