单位-分类导出
This commit is contained in:
@@ -277,7 +277,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
.setIsSale(getMainSkuIsSale(exportDTO))
|
||||
.setGroupTitleName(proGroupDTO.getTitle())
|
||||
.setGroupProductNumber(Optional.ofNullable(proGroupDTO.getNumber()).map(String::valueOf).orElse(""))
|
||||
.setGroupProductName(good.getProName() + " " + good.getSkuName());
|
||||
.setGroupProductName(good.getProName() + "-" + good.getSkuName());
|
||||
dataList.add(pkgDto);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.czg.service.product.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.excel.ExcelExportUtil;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.product.dto.ProductCategoryExportDTO;
|
||||
import com.czg.product.dto.ShopProdCategoryDTO;
|
||||
import com.czg.product.entity.ShopProdCategory;
|
||||
import com.czg.product.service.ProductService;
|
||||
@@ -16,6 +18,7 @@ import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.core.update.UpdateChain;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -62,6 +65,14 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
return super.listAs(queryWrapper, ShopProdCategoryDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportShopProdCategory(ShopProdCategoryDTO param, HttpServletResponse response) {
|
||||
QueryWrapper queryWrapper = buildQueryWrapper(param);
|
||||
queryWrapper.eq(ShopProdCategory::getStatus, SystemConstants.OneZero.ONE);
|
||||
List<ProductCategoryExportDTO> exportList = listAs(queryWrapper, ProductCategoryExportDTO.class);
|
||||
ExcelExportUtil.exportToResponse(exportList, ProductCategoryExportDTO.class, "商品分类列表", response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopProdCategoryDTO getShopProdCategoryById(Long id) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.czg.service.product.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.excel.ExcelExportUtil;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.product.dto.ProductUnitExportDTO;
|
||||
import com.czg.product.dto.ShopProdUnitDTO;
|
||||
import com.czg.product.entity.ShopProdUnit;
|
||||
import com.czg.product.enums.UnitTypeEnum;
|
||||
@@ -15,6 +17,7 @@ import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.core.update.UpdateChain;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -59,6 +62,14 @@ public class ShopProdUnitServiceImpl extends ServiceImpl<ShopProdUnitMapper, Sho
|
||||
return super.listAs(queryWrapper, ShopProdUnitDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportShopProdUnit(ShopProdUnitDTO param, HttpServletResponse response) {
|
||||
QueryWrapper queryWrapper = buildQueryWrapper(param);
|
||||
queryWrapper.eq(ShopProdUnit::getStatus,SystemConstants.OneZero.ONE);
|
||||
List<ProductUnitExportDTO> unitExportDTOList = listAs(queryWrapper, ProductUnitExportDTO.class);
|
||||
ExcelExportUtil.exportToResponse(unitExportDTOList, ProductUnitExportDTO.class, "单位列表", response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopProdUnitDTO getShopProdUnitById(Long id) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
||||
Reference in New Issue
Block a user