whyclxw
2025-01-03 54067f3ea929df56d0a13f4f45dc2318187bf039
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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,"查询当前管理员下所有用户名(不分页除内置用户外用于下拉)");
    }
}