master:增加获取所有客户列表接口;

pull/1121/head
liujiang 2025-11-06 12:37:47 +08:00
parent 7b1d0b6cca
commit c71f1036b4
4 changed files with 37 additions and 2 deletions

View File

@ -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<List<StoreCusFuzzyResVO>> 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")

View File

@ -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 '版本号',

View File

@ -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<StoreCusFuzzyResDTO> fuzzyQueryList(Long storeId, String cusName);
/**
*
*
* @param storeId ID
* @return List<StoreCusFuzzyResDTO>
*/
List<StoreCusFuzzyResDTO> selectAll(Long storeId);
}

View File

@ -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<StoreCusFuzzyResDTO>
*/
@Override
@Transactional(readOnly = true)
public List<StoreCusFuzzyResDTO> selectAll(Long storeId) {
List<StoreCustomer> storeCusList = this.storeCusMapper.selectList(new LambdaQueryWrapper<StoreCustomer>()
.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) {