master:打印条码查询商品颜色 分页调优;

pull/1121/head
liujiang 2025-11-11 19:47:59 +08:00
parent d6c5738640
commit b93f8b24b9
5 changed files with 11 additions and 8 deletions

View File

@ -3,9 +3,10 @@ package com.ruoyi.web.controller.xkt;
import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.common.core.controller.XktBaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.web.controller.xkt.vo.storePordColor.StoreProdColorResVO;
import com.ruoyi.common.core.page.Page;
import com.ruoyi.web.controller.xkt.vo.storePordColor.StoreProdColorSnResVO;
import com.ruoyi.web.controller.xkt.vo.storePordColor.StoreProductColorFuzzyPageVO;
import com.ruoyi.xkt.dto.storeProdColor.StoreProdColorResDTO;
import com.ruoyi.xkt.dto.storeProdColor.StoreProductColorFuzzyPageDTO;
import com.ruoyi.xkt.service.IStoreProductColorService;
import io.swagger.annotations.Api;
@ -31,8 +32,8 @@ public class StoreProductColorController extends XktBaseController {
@ApiOperation(value = "模糊查询档口所有的商品颜色分类", httpMethod = "POST", response = R.class)
@PostMapping(value = "/fuzzy")
public R<List<StoreProdColorResVO>> fuzzyQueryColorList(@RequestBody StoreProductColorFuzzyPageVO pageVO) {
return success(BeanUtil.copyToList(storeProdColorService.fuzzyQueryColorList(BeanUtil.toBean(pageVO, StoreProductColorFuzzyPageDTO.class)), StoreProdColorResVO.class));
public R<Page<StoreProdColorResDTO>> fuzzyQueryPage(@RequestBody StoreProductColorFuzzyPageVO pageVO) {
return R.ok(storeProdColorService.fuzzyQueryPage(BeanUtil.toBean(pageVO, StoreProductColorFuzzyPageDTO.class)));
}
@ApiOperation(value = "根据商品ID查询颜色及已设置颜色条码", httpMethod = "GET", response = R.class)

View File

@ -53,7 +53,7 @@ public interface StoreProductColorMapper extends BaseMapper<StoreProductColor> {
* @param pageDTO
* @return List<StoreProdColorResDTO>
*/
List<StoreProdColorResDTO> fuzzyQueryColorList(StoreProductColorFuzzyPageDTO pageDTO);
List<StoreProdColorResDTO> fuzzyQueryPage(StoreProductColorFuzzyPageDTO pageDTO);
/**
*

View File

@ -22,7 +22,7 @@ public interface IStoreProductColorService {
* @param pageDTO
* @return
*/
List<StoreProdColorResDTO> fuzzyQueryColorList(StoreProductColorFuzzyPageDTO pageDTO);
Page<StoreProdColorResDTO> fuzzyQueryPage(StoreProductColorFuzzyPageDTO pageDTO);
/**
*

View File

@ -51,8 +51,10 @@ public class StoreProductColorServiceImpl implements IStoreProductColorService {
*/
@Override
@Transactional(readOnly = true)
public List<StoreProdColorResDTO> fuzzyQueryColorList(StoreProductColorFuzzyPageDTO pageDTO) {
return storeProdColorMapper.fuzzyQueryColorList(pageDTO);
public Page<StoreProdColorResDTO> fuzzyQueryPage(StoreProductColorFuzzyPageDTO pageDTO) {
PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize());
List<StoreProdColorResDTO> fuzzyQueryList = storeProdColorMapper.fuzzyQueryPage(pageDTO);
return CollectionUtils.isEmpty(fuzzyQueryList) ? Page.empty(pageDTO.getPageSize(), pageDTO.getPageNum()) : Page.convert(new PageInfo<>(fuzzyQueryList));
}
/**

View File

@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
spc.create_time DESC
</select>
<select id="fuzzyQueryColorList" resultType="com.ruoyi.xkt.dto.storeProdColor.StoreProdColorResDTO">
<select id="fuzzyQueryPage" resultType="com.ruoyi.xkt.dto.storeProdColor.StoreProdColorResDTO">
SELECT DISTINCT
spc.id AS storeProdColorId,
sp.store_id AS storeId,