| | |
| | | import com.zy.asrs.framework.annotations.ManagerAuth; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.framework.domain.KeyValueVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | /*************************************** xm-select ***********************************************/ |
| | | |
| | | // xm-select 搜索商品列表 |
| | | @RequestMapping("/user/all/get/kv") |
| | | @ManagerAuth |
| | | public R getUserDataKV(@RequestParam(required = false) String condition) { |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<User> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(User::getUsername, condition); |
| | | } |
| | | userService.page(new Page<>(1, 30), wrapper).getRecords().forEach(item -> vos.add(new KeyValueVo(String.valueOf(item.getUsername()), item.getId()))); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | } |