yq преди 3 години
родител
ревизия
4025558829

+ 1 - 2
src/main/java/com/usky/dxtop/service/ISysAsyncTaskService.java

@@ -13,12 +13,11 @@ public interface ISysAsyncTaskService extends IService<SysAsyncTask> {
     /**
     /**
      * 返回执行ID
      * 返回执行ID
      *
      *
-     * @param userId
      * @param userName
      * @param userName
      * @param funcType
      * @param funcType
      * @return
      * @return
      */
      */
-    Long getId(String userId, String userName, String funcType);
+    Long getId(String userName, String funcType);
 
 
     /**
     /**
      * 分页查询
      * 分页查询

+ 2 - 2
src/main/java/com/usky/dxtop/service/impl/SysAsyncTaskServiceImpl.java

@@ -30,12 +30,12 @@ public class SysAsyncTaskServiceImpl extends ServiceImpl<SysAsyncTaskMapper, Sys
     private final ISysConfigService sysConfigService;
     private final ISysConfigService sysConfigService;
 
 
     @Override
     @Override
-    public Long getId(String userId, String userName, String funcType) {
+    public Long getId(String userName, String funcType) {
         int limit = Integer.parseInt(sysConfigService.selectConfigByKey("sys.async.operationLimit"));
         int limit = Integer.parseInt(sysConfigService.selectConfigByKey("sys.async.operationLimit"));
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
         c.setTime(new Date());
         c.setTime(new Date());
         c.add(Calendar.HOUR, -1);
         c.add(Calendar.HOUR, -1);
-        Integer count = baseMapper.getCountByUserIdAndFuncTypeAndCreateTime(userId, funcType, c.getTime());
+        Integer count = baseMapper.getCountByUserIdAndFuncTypeAndCreateTime(userName, funcType, c.getTime());
         if (count != null && count >= limit) {
         if (count != null && count >= limit) {
             throw new CustomException("暂时无法开启异步任务");
             throw new CustomException("暂时无法开启异步任务");
         }
         }