yq 3 rokov pred
rodič
commit
4025558829

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

@@ -13,12 +13,11 @@ public interface ISysAsyncTaskService extends IService<SysAsyncTask> {
     /**
      * 返回执行ID
      *
-     * @param userId
      * @param userName
      * @param funcType
      * @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;
 
     @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"));
         Calendar c = Calendar.getInstance();
         c.setTime(new Date());
         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) {
             throw new CustomException("暂时无法开启异步任务");
         }