Эх сурвалжийг харах

fix:登录逻辑用户未存在逻辑修改

侯茂昌 1 жил өмнө
parent
commit
a5f3872fec

+ 0 - 35
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/DragTableStatisticController.java

@@ -70,42 +70,7 @@ public class DragTableStatisticController extends BaseController
         return success(dragTableStatisticService.selectDragTableStatisticById(id));
     }
 
-    /**
-     * 新增动态表格统计
-     */
-    @PreAuthorize("@ss.hasPermi('system:statistic:add')")
-    @Log(title = "动态表格统计", businessType = BusinessType.INSERT)
-    @PostMapping
-    @ApiOperation(value = "新增动态表格统计")
-    public AjaxResult add(@RequestBody DragTableVo vo)
-    {
-        return toAjax(dragTableStatisticService.batchInsertDragTableStatistic(vo));
-    }
 
-    /**
-     * 修改动态表格统计
-     */
-    @PreAuthorize("@ss.hasPermi('system:statistic:edit')")
-    @Log(title = "动态表格统计", businessType = BusinessType.UPDATE)
-    @PutMapping
-    @ApiOperation(value = "修改动态表格统计")
-    public AjaxResult edit(@RequestBody DragTableVo vo)
-    {
-        dragTableStatisticService.updateDragTableStatistic(vo);
-        return AjaxResult.success();
-    }
-
-    /**
-     * 删除动态表格统计
-     */
-    @PreAuthorize("@ss.hasPermi('system:statistic:remove')")
-    @Log(title = "动态表格统计", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{tableKey}")
-    @ApiOperation(value = "删除动态表格统计")
-    public AjaxResult remove(@PathVariable String tableKey)
-    {
-        return toAjax(dragTableStatisticService.deleteDragTableStatisticByTableKey(tableKey));
-    }
 
     /**
      * 获取动态表格统计详细信息

+ 3 - 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java

@@ -82,22 +82,18 @@ public class SysLoginController {
     public AjaxResult login(@RequestBody LoginBody loginBody) {
         //校验租户状态?生成token
         AjaxResult ajax = AjaxResult.success();
-        //校验验证码
-        loginService.validateCaptcha(loginBody.getUsername(),loginBody.getCode(),loginBody.getUuid());
         //校验不能是admin
         if(loginBody.getUsername().equals("admin")){
           return AjaxResult.error("未有此用户信息");
         }
-        //登录前置校验
-        loginService.loginPreCheck(loginBody.getUsername(), loginBody.getPassword());
+        // 生成令牌
+        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
+                loginBody.getUuid());
         //检查租户过期时间
         String  checkTenantExpirationTimeMsg= loginService.checkTenantExpirationTime(loginBody.getUsername());
         if(!checkTenantExpirationTimeMsg.isEmpty()){
             return AjaxResult.error(checkTenantExpirationTimeMsg);
         }
-        // 生成令牌
-        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
-                loginBody.getUuid());
         ajax.put(Constants.TOKEN, token);
         return ajax;
     }

+ 3 - 3
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java

@@ -76,9 +76,9 @@ public class SysLoginService
     public String login(String username, String password, String code, String uuid)
     {
         //验证码校验
-        //validateCaptcha(username, code, uuid);
-        // 登录前置校验
-        //loginPreCheck(username, password);
+        validateCaptcha(username, code, uuid);
+        //登录前置校验
+        loginPreCheck(username, password);
 
         // 用户验证
         Authentication authentication = null;