parent
5649bac1a6
commit
edfefa6271
@ -0,0 +1,72 @@
|
||||
|
||||
package com.luoo.user.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import constants.Constants;
|
||||
import com.luoo.user.dto.response.CreateImageCode;
|
||||
import com.luoo.user.pojo.Admin;
|
||||
import com.luoo.user.pojo.UserInfo;
|
||||
import com.luoo.user.service.UserInfoService;
|
||||
import com.luoo.user.util.NickNameUtil;
|
||||
|
||||
import annotation.GlobalInterceptor;
|
||||
import annotation.VerifyParam;
|
||||
import api.PageResult;
|
||||
import api.Result;
|
||||
import api.StatusCode;
|
||||
import client.vo.SimpleUser;
|
||||
import enums.RequestFrequencyTypeEnum;
|
||||
import enums.VerifyRegexEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import util.IdWorker;
|
||||
import util.JwtUtil;
|
||||
import util.StringTools;
|
||||
|
||||
/**
|
||||
* 控制器层
|
||||
*
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@RequestMapping("/simple_user")
|
||||
@Api(tags = "SimpleUserController")
|
||||
public class SimpleUserController {
|
||||
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 通过用户ids查询SimpleUser
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过用户ids查询SimpleUser")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "ids", value = "多个id以','分隔", required = true) })
|
||||
@GetMapping("/ids/{ids}")
|
||||
public Result<List<SimpleUser>> orderByField(@PathVariable @VerifyParam(required=true) String ids){
|
||||
List<String> idList=Arrays.stream(ids.split(",")).map(String::trim).collect(Collectors.toList());
|
||||
return Result.success(userInfoService.getSimpleUserOrderByField(idList));
|
||||
}
|
||||
}
|
Loading…
Reference in new issue