master:打印条码查询商品颜色 分页调优;
parent
d6c5738640
commit
b93f8b24b9
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
/**
|
||||
* 获取商品颜色价格列表
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public interface IStoreProductColorService {
|
|||
* @param pageDTO 查询入参
|
||||
* @return 返回一个列表,包含匹配的产品颜色信息
|
||||
*/
|
||||
List<StoreProdColorResDTO> fuzzyQueryColorList(StoreProductColorFuzzyPageDTO pageDTO);
|
||||
Page<StoreProdColorResDTO> fuzzyQueryPage(StoreProductColorFuzzyPageDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 获取档口某个商品所有颜色对应的价格等
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue