| | |
| | | } |
| | | |
| | | 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()); |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | |