From c71f1036b47f756266b6ea9dc762f30f296663fd Mon Sep 17 00:00:00 2001 From: liujiang <569804566@qq.com> Date: Thu, 6 Nov 2025 12:37:47 +0800 Subject: [PATCH] =?UTF-8?q?master=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=89=80=E6=9C=89=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/xkt/StoreCustomerController.java | 7 +++++++ sql/ry_20240629.sql | 4 +++- .../ruoyi/xkt/service/IStoreCustomerService.java | 13 ++++++++++++- .../service/impl/StoreCustomerServiceImpl.java | 15 +++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java index cf9ba2f4d..7a81d055b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java @@ -44,6 +44,13 @@ public class StoreCustomerController extends XktBaseController { return R.ok(BeanUtil.copyToList(storeCusService.fuzzyQueryList(storeId, cusName), StoreCusFuzzyResVO.class)); } + @ApiOperation(value = "获取所有客户", httpMethod = "GET", response = R.class) + @GetMapping(value = "/all/{storeId}") + public R> selectAll(@PathVariable Long storeId) { + return R.ok(BeanUtil.copyToList(storeCusService.selectAll(storeId), StoreCusFuzzyResVO.class)); + } + + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口客户列表", httpMethod = "POST", response = R.class) @PostMapping("/page") diff --git a/sql/ry_20240629.sql b/sql/ry_20240629.sql index 9e7094f28..84d5ecb57 100644 --- a/sql/ry_20240629.sql +++ b/sql/ry_20240629.sql @@ -3210,11 +3210,13 @@ CREATE TABLE `store` `prod_scale` tinyint UNSIGNED NULL DEFAULT NULL COMMENT '生产规模', `integrity_gold` decimal(10, 2) NULL DEFAULT NULL COMMENT '保证金', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `service_end_time` date NULL DEFAULT NULL COMMENT '服务截止时间', + `service_end_time` date NULL DEFAULT NULL COMMENT '服务截止时间', `storage_usage` decimal(10, 3) NULL DEFAULT NULL COMMENT '已使用文件大小', `template_num` int UNSIGNED NULL DEFAULT NULL COMMENT '档口模板ID', `store_status` tinyint UNSIGNED NULL DEFAULT NULL COMMENT '档口状态', `stock_sys` int UNSIGNED NULL DEFAULT NULL COMMENT '库存系统', + `service_amount` decimal(10, 2) NULL DEFAULT NULL, + `member_amount` decimal(10, 2) NULL DEFAULT NULL, `view_count` bigint UNSIGNED NULL DEFAULT NULL COMMENT '浏览量', `reject_reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拒绝理由', `version` bigint UNSIGNED NOT NULL COMMENT '版本号', diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/IStoreCustomerService.java b/xkt/src/main/java/com/ruoyi/xkt/service/IStoreCustomerService.java index a55cf9945..c0c622e3c 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/IStoreCustomerService.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/IStoreCustomerService.java @@ -1,7 +1,10 @@ package com.ruoyi.xkt.service; import com.ruoyi.common.core.page.Page; -import com.ruoyi.xkt.dto.storeCustomer.*; +import com.ruoyi.xkt.dto.storeCustomer.StoreCusDTO; +import com.ruoyi.xkt.dto.storeCustomer.StoreCusFuzzyResDTO; +import com.ruoyi.xkt.dto.storeCustomer.StoreCusPageDTO; +import com.ruoyi.xkt.dto.storeCustomer.StoreCusPageResDTO; import java.util.List; @@ -60,4 +63,12 @@ public interface IStoreCustomerService { */ List fuzzyQueryList(Long storeId, String cusName); + /** + * 获取所有客户名称列表 + * + * @param storeId 档口ID + * @return List + */ + List selectAll(Long storeId); + } diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java index 24ef14277..e5a865a02 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java @@ -65,6 +65,21 @@ public class StoreCustomerServiceImpl implements IStoreCustomerService { .map(x -> BeanUtil.toBean(x, StoreCusFuzzyResDTO.class).setStoreCusId(x.getId())).collect(Collectors.toList()); } + /** + * 获取所有客户名称列表 + * + * @param storeId 档口ID + * @return List + */ + @Override + @Transactional(readOnly = true) + public List selectAll(Long storeId) { + List storeCusList = this.storeCusMapper.selectList(new LambdaQueryWrapper() + .eq(StoreCustomer::getStoreId, storeId).eq(StoreCustomer::getDelFlag, Constants.UNDELETED)); + return storeCusList.stream().map(x -> BeanUtil.toBean(x, StoreCusFuzzyResDTO.class).setStoreCusId(x.getId())) + .collect(Collectors.toList()); + } + @Override @Transactional public int create(StoreCusDTO storeCusDTO) {