|
|
|
@ -1,15 +1,22 @@
|
|
|
|
|
package com.luoo.user.controller;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import com.luoo.user.annotation.GlobalInterceptor;
|
|
|
|
|
import com.luoo.user.annotation.VerifyParam;
|
|
|
|
|
import com.luoo.user.pojo.Admin;
|
|
|
|
|
import com.luoo.user.service.AdminService;
|
|
|
|
|
|
|
|
|
|
import api.PageResult;
|
|
|
|
|
import api.Result;
|
|
|
|
|
import api.StatusCode;
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import util.JwtUtil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -82,6 +89,21 @@ public class AdminController {
|
|
|
|
|
return Result.success(adminService.findById(id));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 通过Admin用户ids批量查询Admin用户名称
|
|
|
|
|
* @param ids
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation(value = "通过Admin用户ids批量查询Admin用户名称")
|
|
|
|
|
@ApiImplicitParams({
|
|
|
|
|
@ApiImplicitParam(name = "ids", value = "多个id以','分隔", required = true) })
|
|
|
|
|
@GetMapping("/ids/{id}")
|
|
|
|
|
@GlobalInterceptor
|
|
|
|
|
public Result<List<Admin>> findAllById(@PathVariable @VerifyParam(required=true) String ids){
|
|
|
|
|
List<String> idList=Arrays.stream(ids.split(",")).map(String::trim).collect(Collectors.toList());
|
|
|
|
|
return Result.success(adminService.findAllById(idList));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分页+多条件查询
|
|
|
|
|