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,"查询当前管理员下所有用户对象(不分页除内置用户外用于下拉)");
|
}
|
}
|