| | |
| | | import com.zy.crm.manager.entity.Cstmr; |
| | | import com.zy.crm.manager.entity.CstmrFoll; |
| | | import com.zy.crm.manager.entity.CstmrType; |
| | | import com.zy.crm.manager.entity.result.KeyValueVo; |
| | | import com.zy.crm.manager.service.CstmrFollService; |
| | | import com.zy.crm.manager.service.CstmrService; |
| | | import com.zy.crm.manager.service.CstmrTypeService; |
| | |
| | | return R.ok("删除成功"); |
| | | } |
| | | |
| | | // xm-select |
| | | @RequestMapping("/cstmr/all/get/kv") |
| | | @ManagerAuth |
| | | public R getCstmrDataKV(@RequestParam(required = false) String condition) { |
| | | Wrapper<Cstmr> wrapper = new EntityWrapper<Cstmr>() |
| | | .andNew().like("name", condition).or().like("uuid", condition) |
| | | .orderBy("create_time", false); |
| | | List<Cstmr> cstmrs = cstmrService.selectPage(new Page<>(1, 30), wrapper).getRecords(); |
| | | List<KeyValueVo> valueVos = new ArrayList<>(); |
| | | for (Cstmr cstmr : cstmrs) { |
| | | KeyValueVo vo = new KeyValueVo(); |
| | | vo.setName(cstmr.getName() + "(" + cstmr.getUuid() + ")"); |
| | | vo.setValue(cstmr.getId()); |
| | | valueVos.add(vo); |
| | | } |
| | | return R.ok().add(valueVos); |
| | | } |
| | | |
| | | } |