Helius
2020-12-23 c554c7ad5405bafa149dbb6429e8245f78b33ffc
zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java
@@ -6,6 +6,8 @@
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.app.dto.ShoppingGoodsListDto;
import com.matrix.system.app.vo.ShoppingGoodsListVo;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.dao.UtilDao;
import com.matrix.system.common.tools.ServiceUtil;
@@ -467,4 +469,24 @@
        }
        return target;
    }
    @Override
    public List<ShoppingGoodsListVo> findShoppingGoodsListForApi(ShoppingGoodsListDto shoppingGoodsListDto) {
        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        shoppingGoodsListDto.setShopId(user.getShopId());
        PaginationVO pageVo = new PaginationVO();
        int offset = (shoppingGoodsListDto.getPageNum() - 1) + shoppingGoodsListDto.getPageSize();
        int limit = shoppingGoodsListDto.getPageSize();
        pageVo.setOffset(offset);
        pageVo.setLimit(limit);
        return shoppingGoodsDao.selectShoppingGoodsApiInPage(shoppingGoodsListDto, pageVo);
    }
    @Override
    public int findShoppingGoodsListTotalForApi(ShoppingGoodsListDto shoppingGoodsListDto) {
        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        shoppingGoodsListDto.setShopId(user.getShopId());
        return shoppingGoodsDao.selectShopppingGoodsAipTotal(shoppingGoodsListDto);
    }
}