调整商品图片的缩略图路径接口

This commit is contained in:
季圣华
2023-07-24 23:28:31 +08:00
parent 4f80f62126
commit 5f0cf49f76
5 changed files with 74 additions and 8 deletions

View File

@@ -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);
}
}