From 1cd8df7e8f42fb0d9292055ff97e4e5480087112 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Mon, 08 Mar 2021 16:44:16 +0800
Subject: [PATCH] Merge branch 'api' into hive2.0
---
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponDao.xml | 2
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java | 2
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopCouponAction.java | 12 +++---
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java | 2
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java | 4 +-
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java | 21 +++++++---
zq-erp/pom.xml | 4 +-
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java | 4 +-
zq-erp/src/main/resources/templates/views/admin/shop/shopCoupon-form.html | 11 ++++-
zq-erp/src/main/resources/templates/views/admin/shop/shopDeliveryInfo-list.html | 2
10 files changed, 38 insertions(+), 26 deletions(-)
diff --git a/zq-erp/pom.xml b/zq-erp/pom.xml
index a1baf69..10d3f71 100644
--- a/zq-erp/pom.xml
+++ b/zq-erp/pom.xml
@@ -390,11 +390,11 @@
<exclude>config/test/*</exclude>
<exclude>config/xcx/*</exclude>
- <!-- -->
+ <!--
<exclude>config/config.json</exclude>
<exclude>config/application.properties</exclude>
<exclude>config/system.properties</exclude>
-
+ -->
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
index dbf53bc..ba10a99 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
@@ -9,7 +9,9 @@
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.PropertiesUtil;
import com.matrix.core.tools.UUIDUtil;
+import com.matrix.system.common.bean.BusParameterSettings;
import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
import com.matrix.system.hive.dao.SysShopInfoDao;
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.system.shopXcx.api.pojo.QrcodeImgParam;
@@ -81,6 +83,9 @@
@Autowired
ShopActivitiesSeckillInfoDao shopActivitiesSeckillInfoDao;
+ @Autowired
+ BusParameterSettingsDao busParameterSettingsDao;
+
/**
* 生成二维码
*/
@@ -137,7 +142,7 @@
qrcodeImgParam = getQrcodeImgParam(loginUser, qrcodeVo);
shareQrcord.setProductId(qrcodeVo.getProductId());
}
-
+ qrcodeImgParam.logo="";
//绘制二维码
drawQrcode(qrcodeImgParam);
@@ -186,8 +191,8 @@
qrcodeImgParam.targetImg = baseSavePath + "/" + "wxacode" + "/" + targetImg;
qrcodeImgParam.title = "【秒杀】" + shopProduct.getTitle();
qrcodeImgParam.price = "¥" +seckillInfo.getSiPrice();
- qrcodeImgParam.logo = "深圳肽妍";
- qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验肽妍产品";
+
+ qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验";
return qrcodeImgParam;
}
@@ -224,8 +229,8 @@
qrcodeImgParam.targetImg = baseSavePath + "/" + "wxacode" + "/" + targetImg;
qrcodeImgParam.title = "【拼团】" + shopProduct.getTitle();
qrcodeImgParam.price = "¥" + price.getGpPrice();
- qrcodeImgParam.logo = "深圳肽妍";
- qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验肽妍产品";
+
+ qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验";
return qrcodeImgParam;
}
@@ -233,6 +238,8 @@
private QrcodeImgParam getQrcodeImgParam(BizUser loginUser, QrcodeVo qrcodeVo) throws Exception {
ShopProduct shopProduct = shopProductDao.selectById(qrcodeVo.getProductId());
+
+
String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID());
@@ -255,9 +262,9 @@
qrcodeImgParam.targetImg = baseSavePath + "/" + "wxacode" + "/" + targetImg;
qrcodeImgParam.title = shopProduct.getTitle();
qrcodeImgParam.price = "¥" + shopProduct.getPrice().toString();
- qrcodeImgParam.logo = "深圳肽妍";
+
ShopCoupon shopCoupon = shopProduct.getShopCoupon();
- qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验肽妍产品";
+ qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验";
if (shopCoupon != null) {
String beginTiem = DateUtil.dateFormatStr(shopCoupon.getBeginTime(), DateUtil.DATE_FORMAT_SPLITE_DD);
String endTiem = DateUtil.dateFormatStr(shopCoupon.getEndTime(), DateUtil.DATE_FORMAT_SPLITE_DD);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopCouponAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopCouponAction.java
index 25d3e4c..e0211b2 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopCouponAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopCouponAction.java
@@ -1,11 +1,11 @@
package com.matrix.system.shopXcx.api.action;
+import com.matrix.component.redis.RedisUserLoginUtils;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.pojo.PaginationVO;
-
-import com.matrix.component.redis.RedisUserLoginUtils;
-import com.matrix.system.shopXcx.dao.ShopCouponDao;
+import com.matrix.system.common.interceptor.HostInterceptor;
import com.matrix.system.shopXcx.api.service.WxShopCouponService;
+import com.matrix.system.shopXcx.dao.ShopCouponDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@@ -76,10 +76,10 @@
return new AjaxResult(AjaxResult.STATUS_SUCCESS, shopCouponService.getCouponListByProductId(productId));
}
- @GetMapping(value = "getCouponListByTag/{shopId}/{tag}")
+ @GetMapping(value = "getCouponListByTag/{tag}")
@ResponseBody
- public AjaxResult getCouponListByTag(@PathVariable("tag") String tag,@PathVariable("shopId") Long shopId) {
- return shopCouponService.getCouponListByTag(tag,shopId);
+ public AjaxResult getCouponListByTag(@PathVariable("tag") String tag) {
+ return shopCouponService.getCouponListByTag(tag, HostInterceptor.getCompanyId());
}
}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
index 4f9f35a..f790cc8 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
@@ -114,7 +114,7 @@
* //def.setMsg("2公里内满" + qsfy.getValue() + "元免配送费");
*/
- def.setMsg("肽研官方商城");
+ def.setMsg("商城");
def.setCartList(new ArrayList<>());
// 组合默认分组
cartList.add(def);
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
index b406cb6..e6cde48 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
@@ -62,10 +62,10 @@
* 根据标签获取优惠券列表
*
* @param tag
- * @param shopId
+ * @param companyId
* @return
*/
- AjaxResult getCouponListByTag(String tag, Long shopId);
+ AjaxResult getCouponListByTag(String tag, Long companyId);
/**
* 根据产品id查询该产品符合的优惠活动
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
index e9fd5af..bd88673 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
@@ -305,10 +305,10 @@
* @return
*/
@Override
- public AjaxResult getCouponListByTag(String tag, Long shopId) {
+ public AjaxResult getCouponListByTag(String tag, Long companyId) {
BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(bizUser.getOpenId());
- List<ShopCoupon> couponList = shopCouponDao.selectCouponListByTag(newPeople, bizUser.getOpenId(), tag,shopId);
+ List<ShopCoupon> couponList = shopCouponDao.selectCouponListByTag(newPeople, bizUser.getOpenId(), tag,companyId);
AjaxResult res = new AjaxResult(AjaxResult.STATUS_SUCCESS, couponList);
res.putInMap("isNewPeople", newPeople);
return res;
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
index 084115a..b5bb5d8 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
@@ -45,7 +45,7 @@
@Param("productId") Integer productId, @Param("attrIds") List<String> attrIds);
List<ShopCoupon> selectCouponListByTag(@Param("isNewPeople") boolean isNewPeople, @Param("userId") String userId,
- @Param("tag") String tag,@Param("shopId") Long shopId);
+ @Param("tag") String tag,@Param("companyId") Long companyId);
public int updateStateByStateAndIds(@Param("list") List<String> list, @Param("state") int state);
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponDao.xml
index 62b8923..b1f72eb 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponDao.xml
@@ -584,7 +584,7 @@
ifnull(scr.is_using, 0) is_using
from shop_coupon sc left join shop_coupon_record scr
on sc.id = scr.c_id and user_id = #{userId}
- where sc.shop_id=#{shopId} and sc.kind=1 and now() >= begin_time and end_time >= now() and is_open = 1
+ where sc.company_id=#{companyId} and sc.kind=1 and now() >= begin_time and end_time >= now() and is_open = 1
<!--<if test="!isNewPeople">-->
<!--and get_limit = 1-->
<!--</if>-->
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopCoupon-form.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopCoupon-form.html
index d410873..7c83e1e 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopCoupon-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopCoupon-form.html
@@ -143,9 +143,14 @@
<!--<span class="text-danger">*</span>-->
</label>
<div class="col-sm-4">
- <input autocomplete="off" type="text" class="form-control" name="tag"
- ignore="ignore"
- th:value="${obj.tag}"nullmsg="优惠券名称不能为空">
+ <select class="form-control" dataType="*" nullmsg="请选择" name="tag">
+ <!-- <option value=''>请选择</option>-->
+ <option value='zqyhq' th:if="${obj.tag == 'zqyhq'}" selected>专区券</option>
+ <option value='zqyhq' th:unless="${obj.tag == 'zqyhq'}">专区券</option>
+ <option value='gmyhq' th:if="${obj.tag == 'gmyhq'}" selected>全场券</option>
+ <option value='gmyhq' th:unless="${obj.tag == 'gmyhq'}">全场券</option>
+ </select>
+
</div>
</div>
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopDeliveryInfo-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopDeliveryInfo-list.html
index 6f8ee2c..6001df2 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopDeliveryInfo-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopDeliveryInfo-list.html
@@ -60,7 +60,7 @@
<div class="form-group mr-20 ml-20">
<span class="serch-title">物流公司:</span>
<select class="form-control autoFull" style="width: 190px"
- th:data-url="@{/wxapi/dataDictionary/getListByParentCode/kdgs}" data-value="typeCode"
+ th:data-url="@{/admin/customerDictionary/getListByParentCode/kdgs}" data-value="typeCode"
data-filed="typeName" name="logisticsCompanyCode">
<option value=''>--请选择物流公司--</option>
</select>
--
Gitblit v1.9.1