Browse Source

修改多语言

multiwx
xh-pan1 11 months ago
parent
commit
2424fc14e4
  1. 10
      cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java
  2. 8
      cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java
  3. 9
      cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java
  4. 8
      cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java
  5. 2
      cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java
  6. 24
      cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java
  7. 1
      cereshop-business/src/main/resources/application-security.yml
  8. 5
      cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml
  9. 9
      cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java

10
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);
}

8
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

9
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
*/

8
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
*/

2
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<CereProductClassifyLangInfo> cereProductClassifyLangInfoList = cereProductClassifyLangInfoService.list(Wrappers.<CereProductClassifyLangInfo>lambdaQuery().in(CereProductClassifyLangInfo::getClassifyId,classifyIdList));
if(!CollectionUtils.isNotEmpty(list)){
if(CollectionUtils.isNotEmpty(list)){
for (CereProductClassify classify : list) {
classify.initMap(cereProductClassifyLangInfoList);
classify.initData(ContextUtil.getLanguage());

24
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<CereShopProductLangInfo> cereProductClassifyLangInfoList = shopProductLangInfoService.list(Wrappers.<CereShopProductLangInfo>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());
}
}
}

1
cereshop-business/src/main/resources/application-security.yml

@ -40,3 +40,4 @@ security:
- /product/syncProductList
- /order/getOrderDetailForScrm
- /cerePlatformLangInfo/**
- /file/upload

5
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}

9
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;
/**

Loading…
Cancel
Save