doum
2025-12-11 c83278063eba3316d24553c88ae75c5f711e8d23
server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java
@@ -146,42 +146,15 @@
    }
    public void isCreateParamValid(Goods goods, LoginUserInfo user) {
/*        if (goods.getType() == null) {
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage());
        }*/
    /*    if (Constants.equalsInteger(goods.getType(), Constants.ZERO)) {*/
            //平台商城
            if (StringUtils.isBlank(goods.getName())
                    || goods.getParentCategoryId() == null
                    || goods.getCategoryId() == null
                    || StringUtils.isBlank(goods.getImgurl())
                    || org.apache.commons.collections.CollectionUtils.isEmpty(goods.getFileList())
            ) {
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage());
            }
     /*   }*/
     /*   if (Constants.equalsInteger(goods.getType(), Constants.ONE)) {
            //咖豆商城
            if (StringUtils.isBlank(goods.getName())
                    || goods.getCategoryId() == null
                    || goods.getBrandId() == null
                    || StringUtils.isBlank(goods.getImgurl())
                    || Objects.isNull(goods.getFileList())
            ) {
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage());
            }
        }
        if (Constants.equalsInteger(goods.getType(), Constants.TWO)) {
            //咖啡计划商品
            if (StringUtils.isBlank(goods.getName())
                    || StringUtils.isBlank(goods.getImgurl())
                    || StringUtils.isBlank(goods.getLabels())
            ) {
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage());
            }
        }*/
    }