调整商品图片的缩略图路径接口
This commit is contained in:
@@ -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