From 564bf7ab6a639c2c4557d35b8fd9b51dca60a738 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期二, 22 八月 2023 13:32:34 +0800 Subject: [PATCH] #规则完善 --- src/main/java/com/zy/crm/manager/controller/CompanyController.java | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/crm/manager/controller/CompanyController.java b/src/main/java/com/zy/crm/manager/controller/CompanyController.java index b455a12..363728d 100644 --- a/src/main/java/com/zy/crm/manager/controller/CompanyController.java +++ b/src/main/java/com/zy/crm/manager/controller/CompanyController.java @@ -9,6 +9,7 @@ import com.core.common.Cools; import com.core.common.DateUtils; import com.core.common.R; +import com.core.domain.KeyValueVo; import com.zy.crm.common.web.BaseController; import com.zy.crm.manager.entity.Company; import com.zy.crm.manager.service.CompanyService; @@ -129,4 +130,19 @@ return R.ok(); } + // xm-select + @RequestMapping("/company/all/get/kv") + @ManagerAuth + public R getDataKV(@RequestParam(required = false) String condition) { + Wrapper<Company> wrapper = new EntityWrapper<Company>() + .andNew().like("name", condition).or().like("uuid", condition) + .orderBy("create_time", false); + List<Company> items = companyService.selectPage(new Page<>(1, 30), wrapper).getRecords(); + List<KeyValueVo> valueVos = new ArrayList<>(); + for (Company item : items) { + valueVos.add(new KeyValueVo(item.getName(), item.getId())); + } + return R.ok().add(valueVos); + } + } -- Gitblit v1.9.1