修改了商品的实体类信息,修改了添加商品的功能模块,将不必要的判断去掉

This commit is contained in:
XinYi Song 2021-12-23 14:36:59 +08:00
parent 04d62fa38e
commit 9fd7a64d8e
2 changed files with 4 additions and 2 deletions

View File

@ -82,11 +82,13 @@ public class ProductEntity {
/** /**
* 商品封面 * 商品封面
*/ */
@Column(length = 5000, columnDefinition = "varchar(5000)")
private String productCover; private String productCover;
/** /**
* 商品内容图片 * 商品内容图片
*/ */
@Column(length = 5000, columnDefinition = "varchar(5000)")
private String productContent; private String productContent;
/** /**

View File

@ -60,10 +60,10 @@ public class ProductServiceImpl implements ProductService {
List<String> productCover = productQo.getProductCover(); List<String> productCover = productQo.getProductCover();
// 商品内容图片 // 商品内容图片
List<String> productContent = productQo.getProductContent(); List<String> productContent = productQo.getProductContent();
BusinessEntity byBusinessId = businessDao.findByBusinessIdAndBusinessType(business,"1"); /*BusinessEntity byBusinessId = businessDao.findByBusinessIdAndBusinessType(business,"1");
if(byBusinessId == null){ if(byBusinessId == null){
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"您还未入驻,请先入驻!",locale); return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"您还未入驻,请先入驻!",locale);
} }*/
ProductEntity byProductName = productDao.findByProductName(productQo.getProductName()); ProductEntity byProductName = productDao.findByProductName(productQo.getProductName());
if(byProductName != null){ if(byProductName != null){
return outputEncapsulationObject(PromptMessageEnum.FILE_EXISTS,"您已添加该商品,请勿重复添加!",locale); return outputEncapsulationObject(PromptMessageEnum.FILE_EXISTS,"您已添加该商品,请勿重复添加!",locale);