月球大数据地理空间分析展示平台-【后端】-月球后台服务
1
13693261870
2024-11-11 fee67ca8a0760315047a52fc4101a8f4f80b7a7f
src/main/java/com/moon/server/controller/sys/AuthController.java
@@ -18,13 +18,9 @@
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
 * 权限表
 * @author SWS
 * @date 2022-09.28
 */
@Api(tags = "运维管理\\权限管理")
@RestController
@SuppressWarnings("ALL")
@RequestMapping("/auth")
public class AuthController extends BaseController {
    @Autowired
@@ -129,7 +125,7 @@
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.AuthEntity", paramType = "body", example = "")
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "AuthEntity", paramType = "body", example = "")
    })
    @PostMapping(value = "/insertAuth", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> insertAuth(@RequestBody AuthEntity entity, HttpServletRequest req) {
@@ -139,10 +135,8 @@
                entity.setCreateUser(ue.getId());
            }
            permsService.clearPermsCache();
            int count = authService.insertAuth(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -165,10 +159,8 @@
                }
            }
            permsService.clearPermsCache();
            int count = authService.insertAuths(list);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -184,10 +176,8 @@
    @GetMapping(value = "/deleteAuth")
    public ResponseMsg<Integer> deleteAuth(int id) {
        try {
            permsService.clearPermsCache();
            int count = authService.deleteAuth(id);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -207,10 +197,8 @@
                return fail("id数组不能为空", -1);
            }
            permsService.clearPermsCache();
            int count = authService.deleteAuths(ids);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -232,10 +220,8 @@
                entity.setUpdateUser(ue.getId());
            }
            permsService.clearPermsCache();
            int count = authService.updateAuth(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {