whyclxw
2025-01-21 e202f9e54e7ec0c983cad49825a1bda6ee314d8b
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
38
39
40
41
42
43
44
45
46
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,"查询当前管理员下所有用户名(不分页除内置用户外用于下拉)");
    }
 
    @ApiOperation(value = "查询当前管理员下所有用户对象(不分页除内置用户外用于下拉)")
    @GetMapping("getUinfByAreaIds")
    public Response getUinfByAreaIds(){
        UserInf uinf= ActionUtil.getUser();
        List areaList=areaInfService.getAllAreaUser(uinf.getUid(),uinf.getUrole());
        List list=service.getUinfByAreaIds(areaList);
        return new Response().setII(1,list!=null,list,"查询当前管理员下所有用户对象(不分页除内置用户外用于下拉)");
    }
}