|
|
@@ -41,10 +41,8 @@ import org.springblade.client.goods.excel.GoodsExcel;
|
|
|
import org.springblade.client.goods.excel.GoodsImport;
|
|
|
import org.springblade.client.goods.excel.GoodsInfoExcel;
|
|
|
import org.springblade.client.goods.excel.GoodsOutExcel;
|
|
|
-import org.springblade.client.goods.service.IGoodsFilesService;
|
|
|
-import org.springblade.client.goods.service.IGoodsPriceService;
|
|
|
+import org.springblade.client.goods.service.*;
|
|
|
import org.springblade.core.excel.util.ExcelUtil;
|
|
|
-import org.springblade.client.goods.service.IGoodsSpecificationService;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
@@ -56,7 +54,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import org.springblade.client.vo.GoodsDescVO;
|
|
|
-import org.springblade.client.goods.service.IGoodsDescService;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
@@ -83,6 +80,8 @@ public class GoodsDescController extends BladeController {
|
|
|
private IGoodsFilesService goodsFilesService;
|
|
|
@Autowired
|
|
|
private IGoodsSpecificationService goodsSpecificationService;
|
|
|
+
|
|
|
+ private final IGoodsTypeService goodsDescType;
|
|
|
/**
|
|
|
* 详情
|
|
|
*/
|
|
|
@@ -130,6 +129,17 @@ public class GoodsDescController extends BladeController {
|
|
|
.orderByDesc(GoodsDesc::getCreateTime);
|
|
|
Page<GoodsDesc> page=new Page<>(current,size);
|
|
|
IPage<GoodsDesc> iPage=goodsDescService.page(page,goodsDescLambdaQueryWrapper);
|
|
|
+ if(CollectionUtils.isNotEmpty(iPage.getRecords()))
|
|
|
+ {
|
|
|
+ iPage.getRecords().forEach(e->{
|
|
|
+ String TypeId = e.getGoodsTypeId();
|
|
|
+ GoodsType goodsType = goodsDescType.getById(Long.valueOf(TypeId));
|
|
|
+ if(goodsType!=null)
|
|
|
+ {
|
|
|
+ e.setGoodsTypeName(goodsType.getCname());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
return R.data(iPage);
|
|
|
}
|
|
|
|