Commit 2b59d57f authored by shiyu's avatar shiyu

会员列表下拉框查询

parent fba160e4
...@@ -8,6 +8,7 @@ import com.wwdz.ch.core.type.Result; ...@@ -8,6 +8,7 @@ import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.ResponseUtil; import com.wwdz.ch.core.util.ResponseUtil;
import com.wwdz.ch.core.validator.Order; import com.wwdz.ch.core.validator.Order;
import com.wwdz.ch.core.validator.Sort; 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.domain.User;
import com.wwdz.ch.db.dto.request.UserSearchRequestDto; import com.wwdz.ch.db.dto.request.UserSearchRequestDto;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
...@@ -18,6 +19,8 @@ import org.springframework.validation.annotation.Validated; ...@@ -18,6 +19,8 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@RestController @RestController
@RequestMapping("/admin/user") @RequestMapping("/admin/user")
...@@ -54,7 +57,8 @@ public class AdminUserController { ...@@ -54,7 +57,8 @@ public class AdminUserController {
public Result findList(@RequestBody UserSearchRequestDto dto) { public Result findList(@RequestBody UserSearchRequestDto dto) {
try { try {
List<User> list = adminUserService.findList(dto); 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) { } catch (Exception e) {
logger.error("邀请码管理->下拉框会员列表->查询 error:{]",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