|
@@ -83,6 +83,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
public static final int TEXT_CARD_MSG_EXPENSE_AGREE = 21;//费用报销审核通过
|
|
public static final int TEXT_CARD_MSG_EXPENSE_AGREE = 21;//费用报销审核通过
|
|
public static final int TEXT_CARD_MSG_EXPENSE_DENY = 22;//费用报销审核驳回
|
|
public static final int TEXT_CARD_MSG_EXPENSE_DENY = 22;//费用报销审核驳回
|
|
|
|
|
|
|
|
+ private static Object userLock = new Object();
|
|
|
|
+
|
|
@Value("${suitId}")
|
|
@Value("${suitId}")
|
|
private String suitId;
|
|
private String suitId;
|
|
@Value("${suitSecret}")
|
|
@Value("${suitSecret}")
|
|
@@ -952,14 +954,16 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
time = 0;
|
|
time = 0;
|
|
}
|
|
}
|
|
userCorpwxTime.setWorkHours(time);
|
|
userCorpwxTime.setWorkHours(time);
|
|
- UserCorpwxTime item = userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", (String) objects[i])
|
|
|
|
- .eq("create_date", date));
|
|
|
|
- if (item != null) {
|
|
|
|
- userCorpwxTime.setId(item.getId());
|
|
|
|
- //已存在记录,进行更新
|
|
|
|
- userCorpwxTimeMapper.updateById(userCorpwxTime);
|
|
|
|
- } else {
|
|
|
|
- userCorpwxTimeMapper.insert(userCorpwxTime);
|
|
|
|
|
|
+ synchronized (userLock){
|
|
|
|
+ UserCorpwxTime item = userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", (String) objects[i])
|
|
|
|
+ .eq("create_date", date));
|
|
|
|
+ if (item != null) {
|
|
|
|
+ userCorpwxTime.setId(item.getId());
|
|
|
|
+ //已存在记录,进行更新
|
|
|
|
+ userCorpwxTimeMapper.updateById(userCorpwxTime);
|
|
|
|
+ } else {
|
|
|
|
+ userCorpwxTimeMapper.insert(userCorpwxTime);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|