diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java index 8e03469..08c1818 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java @@ -175,6 +175,11 @@ public class CanvasController { CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); canvas.setBusinessId(ContextUtil.getBusinessId()); canvas.setProject(ContextUtil.getProject()); +// if(canvas.getShopId() == null){ +// canvas.setProject(ContextUtil.getBusinessId() + "");//ContextUtil.getProject()); +// }else { +// canvas.setProject("0"); +// } cerePlatformCanvasService.saveCanvas(canvas,user); return new Result(user.getUsername(),"保存画布", GsonUtil.objectToGson(canvas)); } @@ -188,6 +193,11 @@ public class CanvasController { public Result getCanvas(CerePlatformCanvas canvas) throws CoBusinessException{ canvas.setBusinessId(ContextUtil.getBusinessId()); canvas.setProject(ContextUtil.getProject()); +// if(canvas.getShopId() == null){ +// canvas.setProject(ContextUtil.getBusinessId() + "");//ContextUtil.getProject()); +// }else { +// canvas.setProject("0"); +// } canvas=cerePlatformCanvasService.getCanvas(canvas); return new Result(canvas); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java index bd7252e..0adc70f 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java @@ -225,6 +225,14 @@ public class ShopProduct { @ApiModelProperty("品牌id") private Long brandId; + @ApiModelProperty("是否新品") + private Integer ifNew; + + @ApiModelProperty("是否首发") + private Integer ifFirst; + + @ApiModelProperty("是否低价") + private Integer ifLowPrice; /** * 名称Map diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java index 7179100..5aabbbd 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java @@ -164,6 +164,15 @@ public class ProductSaveParam { @ApiModelProperty("品牌id") private Long brandId; + @ApiModelProperty("是否新品") + private Integer ifNew; + + @ApiModelProperty("是否首发") + private Integer ifFirst; + + @ApiModelProperty("是否低价") + private Integer ifLowPrice; + /** * 名称Map */ diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java index e69f0ef..0945016 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java @@ -147,6 +147,14 @@ public class ProductUpdateParam { @ApiModelProperty("品牌id") private Long brandId; + @ApiModelProperty("是否新品") + private Integer ifNew; + + @ApiModelProperty("是否首发") + private Integer ifFirst; + + @ApiModelProperty("是否低价") + private Integer ifLowPrice; /** * 名称Map */ diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java index 3c4099b..1d5cdb5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java @@ -389,7 +389,7 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic if(CollectionUtils.isNotEmpty(classifyIdList)){ List cereProductClassifyLangInfoList = cereProductClassifyLangInfoService.list(Wrappers.lambdaQuery().in(CereProductClassifyLangInfo::getClassifyId,classifyIdList)); - if(!CollectionUtils.isNotEmpty(list)){ + if(CollectionUtils.isNotEmpty(list)){ for (CereProductClassify classify : list) { classify.initMap(cereProductClassifyLangInfoList); classify.initData(ContextUtil.getLanguage()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java index e3f2af8..b80023b 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java @@ -146,6 +146,10 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setIfCredit(param.getIfCredit()); cereShopProduct.setCreditLimit(param.getCreditLimit()); cereShopProduct.setBrandId(param.getBrandId()); + cereShopProduct.setIfNew(param.getIfNew()); + cereShopProduct.setIfFirst(param.getIfFirst()); + cereShopProduct.setIfLowPrice(param.getIfLowPrice()); + if(IntegerEnum.PRODUCT_EXAMINE_YES.getCode().equals(Integer.parseInt(param.getShelveState()))){ //如果是已上架,修改状态为审核中 @@ -159,7 +163,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setShopId(param.getShopId()); cereShopProduct.setLangInfoMap(param.getLangInfoMap()); - cereShopProduct.initData(); + cereShopProduct.initData(ContextUtil.getLanguage()); cereShopProductDAO.insert(cereShopProduct); @@ -275,7 +279,9 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setIfCredit(param.getIfCredit()); cereShopProduct.setCreditLimit(param.getCreditLimit()); cereShopProduct.setBrandId(param.getBrandId()); - + cereShopProduct.setIfNew(param.getIfNew()); + cereShopProduct.setIfFirst(param.getIfFirst()); + cereShopProduct.setIfLowPrice(param.getIfLowPrice()); boolean isNeedReExam = false; if(!StringUtils.equals(cereShopProduct.getProductName(), dbCereShopProduct.getProductName())){ @@ -321,7 +327,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setShopId(param.getShopId()); cereShopProduct.setLangInfoMap(param.getLangInfoMap()); - cereShopProduct.initData(); + cereShopProduct.initData(ContextUtil.getLanguage()); cereShopProductDAO.updateByPrimaryKeySelective(cereShopProduct); @@ -527,7 +533,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { List cereProductClassifyLangInfoList = shopProductLangInfoService.list(Wrappers.lambdaQuery().in(CereShopProductLangInfo::getProductId,classifyIdList)); if(ObjectUtils.isNotNull(shopProduct)){ shopProduct.initMap(cereProductClassifyLangInfoList); - shopProduct.initData(); + shopProduct.initData(ContextUtil.getLanguage()); } } @@ -619,7 +625,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { if(CollectionUtils.isNotEmpty(list)){ for (ShopProduct classify : list) { classify.initMap(cereProductClassifyLangInfoList); - classify.initData(); + classify.initData(ContextUtil.getLanguage()); } } } @@ -691,7 +697,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { if(CollectionUtils.isNotEmpty(list)){ for (ShopProduct classify : list) { classify.initMap(cereProductClassifyLangInfoList); - classify.initData(); + classify.initData(ContextUtil.getLanguage()); } } } @@ -780,7 +786,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { if(CollectionUtils.isNotEmpty(list)){ for (CanvasProduct classify : list) { classify.initMap(cereProductClassifyLangInfoList); - classify.initData(); + classify.initData(ContextUtil.getLanguage()); } } } @@ -824,7 +830,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { if(CollectionUtils.isNotEmpty(list)){ for (CereShopProduct classify : list) { classify.initMap(cereProductClassifyLangInfoList); - classify.initData(); + classify.initData(ContextUtil.getLanguage()); } } } @@ -843,7 +849,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { if(CollectionUtils.isNotEmpty(list)){ for (CereShopProduct classify : list) { classify.initMap(cereProductClassifyLangInfoList); - classify.initData(); + classify.initData(ContextUtil.getLanguage()); } } } diff --git a/cereshop-business/src/main/resources/application-security.yml b/cereshop-business/src/main/resources/application-security.yml index 9029788..37928e8 100644 --- a/cereshop-business/src/main/resources/application-security.yml +++ b/cereshop-business/src/main/resources/application-security.yml @@ -40,3 +40,4 @@ security: - /product/syncProductList - /order/getOrderDetailForScrm - /cerePlatformLangInfo/** + - /file/upload diff --git a/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml index a490b61..f49df3a 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml @@ -143,7 +143,10 @@ csp.product_text, csp.if_credit, csp.credit_limit, - csp.brand_id + csp.brand_id, + csp.if_new, + csp.if_first, + csp.if_low_price FROM cere_shop_product csp INNER JOIN cere_platform_shop cps ON cps.shop_id = csp.shop_id where csp.product_id = #{productId} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java index 55e6b83..565efdc 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java @@ -132,6 +132,15 @@ public class CereShopProduct implements Serializable { @ApiModelProperty("品牌id") private Long brandId; + @ApiModelProperty("是否新品") + private Integer ifNew; + + @ApiModelProperty("是否首发") + private Integer ifFirst; + + @ApiModelProperty("是否低价") + private Integer ifLowPrice; + private static final long serialVersionUID = 1L; /**