Parcourir la source

去掉注释的代码

seyason il y a 2 ans
Parent
commit
4e6ee87585

+ 0 - 31
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CompanyController.java

@@ -53,8 +53,6 @@ public class CompanyController {
     @Resource
     private ExpenseMainTypeService expenseMainTypeService;
 
-    public static final HashMap<String, Long> syncLog = new HashMap();
-
     @RequestMapping("/getStaffCountMax")
     public HttpRespMsg getStaffCountMax(Integer companyId){
         HttpRespMsg msg = new HttpRespMsg();
@@ -84,35 +82,6 @@ public class CompanyController {
             HttpRespMsg msg = new HttpRespMsg();
             String token = request.getHeader("TOKEN");
             User user = userMapper.selectById(token);
-            /*//判断时间
-            long now = System.currentTimeMillis();
-            if (syncLog.get(token) == null) {
-                syncLog.put(token, now);
-                syncLog.put(user.getCompanyId()+"_status", 1L);
-            } else {
-                if (now - syncLog.get(token) < 30*1000) {
-                    //msg.setError("调用过于频繁,请稍后再试");
-                    msg.setError(MessageUtils.message("Company.callError"));
-                    return msg;
-                } else {
-                    //检查是否当前公司有同步的正在进行
-                    if (syncLog.get(user.getCompanyId()+"_status") == null) {
-                        //没有进行中的任务,更新最近同步的时间
-                        syncLog.put(token, now);
-                        syncLog.put(user.getCompanyId()+"_status", 1L);
-                    } else {
-                        if (now - syncLog.get(token) > 0.5*3600*1000) {
-                            //更新最近同步的时间
-                            syncLog.put(token, now);
-                        } else {
-                            //msg.setError("同步正在进行中,请稍后再试");
-                            msg.setError(MessageUtils.message("Company.synError"));
-                            return msg;
-                        }
-                    }
-                }
-            }*/
-
             Company company = companyMapper.selectOne(new QueryWrapper<Company>().eq("id", user.getCompanyId()));
             Integer employeeCnt = userMapper.selectCount(new QueryWrapper<User>().eq("company_id", company.getId()).eq("is_active",1));
             if (employeeCnt > company.getStaffCountMax()){