调整商品图片的缩略图路径接口
This commit is contained in:
@@ -23,6 +23,7 @@ import jxl.Sheet;
|
||||
import jxl.Workbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -70,6 +71,9 @@ public class DepotItemController {
|
||||
@Resource
|
||||
private SystemConfigService systemConfigService;
|
||||
|
||||
@Value(value="${file.uploadType}")
|
||||
private Long fileUploadType;
|
||||
|
||||
/**
|
||||
* 根据仓库和商品查询单据列表
|
||||
* @param mId
|
||||
@@ -255,6 +259,11 @@ public class DepotItemController {
|
||||
item.put("weight", allWeight);
|
||||
item.put("remark", diEx.getRemark());
|
||||
item.put("imgName", diEx.getImgName());
|
||||
if(fileUploadType == 2) {
|
||||
item.put("imgType", "small");
|
||||
} else {
|
||||
item.put("imgType", "");
|
||||
}
|
||||
item.put("linkId", diEx.getLinkId());
|
||||
item.put("depotId", diEx.getDepotId() == null ? "" : diEx.getDepotId());
|
||||
item.put("depotName", diEx.getDepotId() == null ? "" : diEx.getDepotName());
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -51,6 +52,9 @@ public class MaterialController {
|
||||
@Resource
|
||||
private DepotService depotService;
|
||||
|
||||
@Value(value="${file.uploadType}")
|
||||
private Long fileUploadType;
|
||||
|
||||
/**
|
||||
* 检查商品是否存在
|
||||
* @param id
|
||||
@@ -263,6 +267,11 @@ public class MaterialController {
|
||||
item.put("stock", stock);
|
||||
item.put("expand", materialService.getMaterialOtherByParam(mpArr, material));
|
||||
item.put("imgName", material.getImgName());
|
||||
if(fileUploadType == 2) {
|
||||
item.put("imgType", "small");
|
||||
} else {
|
||||
item.put("imgType", "");
|
||||
}
|
||||
dataArray.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user