whyclxw
2025-01-03 54067f3ea929df56d0a13f4f45dc2318187bf039
区域用户管理
1个文件已添加
37 ■■■■■ 已修改文件
src/main/java/com/whyc/controller/AreaUserController.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/AreaUserController.java
New file
@@ -0,0 +1,37 @@
package com.whyc.controller;
import com.whyc.dto.Response;
import com.whyc.pojo.db_user.UserInf;
import com.whyc.service.AreaInfService;
import com.whyc.service.AreaUserService;
import com.whyc.service.KeyInfService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@Api(tags = "区域用户管理")
@RequestMapping("areaUser")
public class AreaUserController {
    @Autowired
    private AreaUserService service;
    @Autowired(required = false)
    private AreaInfService areaInfService;
    @ApiOperation(value = "查询当前管理员下所有用户名(不分页除内置用户外用于下拉)")
    @GetMapping("getUserNameByAreaIds")
    public Response getUserNameByAreaIds(){
        UserInf uinf= ActionUtil.getUser();
        List areaList=areaInfService.getAllAreaUser(uinf.getUid(),uinf.getUrole());
        List<String> list=service.getUserNameByAreaIds(areaList);
        return new Response().setII(1,list!=null,list,"查询当前管理员下所有用户名(不分页除内置用户外用于下拉)");
    }
}