From 859af35a1dab1079cff82e521422ab24963f828b Mon Sep 17 00:00:00 2001 From: jyy <935090232@qq.com> Date: Fri, 19 Mar 2021 11:10:31 +0800 Subject: [PATCH] 积分商城5 --- zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java | 14 ++++++++++++++ zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html | 3 +++ zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java | 2 ++ 3 files changed, 19 insertions(+), 0 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java index aa403fd..98cfc12 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java @@ -1,11 +1,14 @@ package com.matrix.system.shopXcx.api.action; import com.matrix.core.pojo.AjaxResult; +import com.matrix.core.tools.StringUtils; import com.matrix.system.common.constance.AppConstance; import com.matrix.system.common.interceptor.HostInterceptor; import com.matrix.system.shopXcx.api.dto.SaleProductDto; import com.matrix.system.shopXcx.api.dto.ScoreProductDto; import com.matrix.system.shopXcx.bean.ShopProduct; +import com.matrix.system.shopXcx.bean.ShopProductAttribute; +import com.matrix.system.shopXcx.dao.ShopProductAttributeDao; import com.matrix.system.shopXcx.dao.ShopProductDao; import com.matrix.system.shopXcx.dao.ShopSkuDao; import io.swagger.annotations.Api; @@ -36,6 +39,9 @@ @Autowired private ShopSkuDao shopSkuDao; + @Autowired + ShopProductAttributeDao shopProductAttributeDao; + @ApiOperation(value = "查询积分商品", notes = "") @PostMapping(value = "/getScoreProductList") @ApiResponses({ @@ -50,6 +56,13 @@ shopProduct.setStatus(AppConstance.IS_PUTAWAY); shopProduct.setAbleScorePay(ShopProduct.PAYFOR_SCORE); shopProduct.setCompanyId(HostInterceptor.getCompanyId()); + //根据属性查询 + if(StringUtils.isNotBlank(scoreProductDto.getAttrCode())){ + ShopProductAttribute jfscrmtj = shopProductAttributeDao.selectByCode("jfscrmtj", HostInterceptor.getCompanyId()); + if(jfscrmtj!=null){ + shopProduct.setAttrs(jfscrmtj.getAttrId()+""); + } + } List<ShopProduct> shopProducts = shopProductDao.selectByModelWx(shopProduct); shopProducts.forEach(item->item.setSkus(shopSkuDao.selectByPid(item.getId()))); return AjaxResult.buildSuccessInstance(shopProducts); @@ -63,4 +76,5 @@ + } diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java index 7cbc20e..cbb8a51 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java @@ -13,6 +13,8 @@ private Integer scoreCategoryId; + @ApiModelProperty(value = "属性编码", example = "jfscrmtj") + private String attrCode; } diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html index 020f4fc..ef02fde 100644 --- a/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html @@ -518,7 +518,10 @@ //改变编辑页面,切换页面元素 changePage(index){ + this.currentPage=this.pageList[index]; + this.currentPageCode=this.pageList[index].code; + console.log(this.currentPageCode); this.loadPageAds(); }, loadPageAds() { -- Gitblit v1.9.1