修改了添加商品的功能模块,限制了图片上传的数量
This commit is contained in:
parent
9fd7a64d8e
commit
3c5d7d2784
@ -71,6 +71,9 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
if(productCover == null || productCover.size() == 0 || productContent == null || productContent.size() == 0){
|
if(productCover == null || productCover.size() == 0 || productContent == null || productContent.size() == 0){
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"商品封面或商品内容图片不能未空!",locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"商品封面或商品内容图片不能未空!",locale);
|
||||||
}
|
}
|
||||||
|
if(productCover.size() > 6 || productContent.size() > 6){
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG,"上传的图片不能超过六张!",locale);
|
||||||
|
}
|
||||||
ProductEntity productEntity = new ProductEntity();
|
ProductEntity productEntity = new ProductEntity();
|
||||||
productEntity.setProductName(productQo.getProductName());
|
productEntity.setProductName(productQo.getProductName());
|
||||||
productEntity.setProductDescription(productQo.getProductDescription());
|
productEntity.setProductDescription(productQo.getProductDescription());
|
||||||
|
Loading…
Reference in New Issue
Block a user