Browse Source

上传头图空校验

李亚非 3 months ago
parent
commit
89cb0fca94

+ 3 - 1
alien-store/src/main/java/shop/alien/store/controller/StoreImgController.java

@@ -77,7 +77,9 @@ public class StoreImgController {
         if (storeImgInfoVo.getStoreId()==null || storeImgInfoVo.getImgType()==null) {
             return R.fail("失败");
         }
-        
+        if(storeImgInfoVo.getStoreImgList().isEmpty()){
+            return R.fail("图片列表为空,请重新上传图片");
+        }
         // 判断是否是头图(20:单图模式, 21:多图模式)
         Integer imgType = storeImgInfoVo.getImgType();
         boolean isHeadImage = (imgType == 20 || imgType == 21);