diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductAttrMapper.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductAttrMapper.java index 5ababd66..24478d09 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductAttrMapper.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/ProductAttrMapper.java @@ -16,5 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface ProductAttrMapper extends BaseMapper { - IPage getList(ProductAttrSearchRequest request); + IPage getList(ProductAttrSearchRequest request, IPage page); } diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java index 5bfc4cf4..3d6c5ddf 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductAttrServiceImpl.java @@ -2,12 +2,14 @@ package com.nflg.mobilebroken.repository.service.impl; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.nflg.mobilebroken.common.constant.Constant; import com.nflg.mobilebroken.common.pojo.request.*; import com.nflg.mobilebroken.common.pojo.vo.ProductAttrInfoVO; import com.nflg.mobilebroken.common.pojo.vo.ProductAttrSearchVO; import com.nflg.mobilebroken.common.util.AdminUserUtil; +import com.nflg.mobilebroken.common.util.VUtils; import com.nflg.mobilebroken.repository.entity.ProductAttr; import com.nflg.mobilebroken.repository.mapper.ProductAttrMapper; import com.nflg.mobilebroken.repository.service.IProductAttrInfoService; @@ -17,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.time.LocalDateTime; +import java.util.Objects; /** *

@@ -80,12 +83,13 @@ public class ProductAttrServiceImpl extends ServiceImpl getList(ProductAttrSearchRequest request) { - return baseMapper.getList(request); + return baseMapper.getList(request,new Page<>(request.getPage(),request.getPageSize())); } @Override public ProductAttrInfoVO getInfo(Integer id) { ProductAttr info = getById(id); + VUtils.trueThrowBusinessError(Objects.isNull(info)).throwMessage("无效的数据"); return new ProductAttrInfoVO() .setId(info.getId()) .setItems(productAttrInfoService.getInfo(id)); diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductHonorServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductHonorServiceImpl.java index 63d9cee9..43dd2a81 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductHonorServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/ProductHonorServiceImpl.java @@ -162,6 +162,7 @@ public class ProductHonorServiceImpl extends ServiceImpl