Commit 2b59d57f authored by shiyu's avatar shiyu

会员列表下拉框查询

parent fba160e4
......@@ -8,6 +8,7 @@ import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.ResponseUtil;
import com.wwdz.ch.core.validator.Order;
import com.wwdz.ch.core.validator.Sort;
import com.wwdz.ch.db.domain.Admin;
import com.wwdz.ch.db.domain.User;
import com.wwdz.ch.db.dto.request.UserSearchRequestDto;
import org.apache.shiro.authz.annotation.RequiresPermissions;
......@@ -18,6 +19,8 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@RestController
@RequestMapping("/admin/user")
......@@ -54,7 +57,8 @@ public class AdminUserController {
public Result findList(@RequestBody UserSearchRequestDto dto) {
try {
List<User> list = adminUserService.findList(dto);
return Result.success(list);
Map<Long, String> map = list.stream().collect(Collectors.toMap(User::getId, User::getNickname, (k1, k2) -> k2));
return Result.success(map);
} catch (Exception e) {
logger.error("邀请码管理->下拉框会员列表->查询 error:{]",e);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment