From 94c48f85ee7956719cbc60d95fffa61f6bdcc81d Mon Sep 17 00:00:00 2001 From: 935090232@qq.com <ak473600000> Date: Tue, 13 Apr 2021 00:35:04 +0800 Subject: [PATCH] 解决快递物流查询问题 --- zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java | 1 + zq-erp/src/main/resources/config/application.properties | 10 +++++++--- zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java | 13 +++---------- zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml | 2 +- zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java index 9e1504a..636b4ba 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java @@ -12,20 +12,18 @@ import com.matrix.core.tools.ModelUtils; import com.matrix.core.tools.StringUtils; import com.matrix.core.tools.WebUtil; -import com.matrix.system.common.bean.CustomerDataDictionary; -import com.matrix.system.common.bean.SystemDictionary; -import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.system.common.bean.SysUsers; +import com.matrix.system.common.bean.SystemDictionary; import com.matrix.system.common.constance.AppConstance; +import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.system.common.dao.SystemDictionaryDao; -import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.action.BaseController; +import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; import com.matrix.system.shopXcx.bean.ShopDeliveryInfo; import com.matrix.system.shopXcx.bean.ShopOrder; import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao; import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao; import com.matrix.system.shopXcx.dao.ShopOrderDao; -import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; import com.matrix.system.shopXcx.mqTask.MQTaskRouting; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -86,11 +84,6 @@ pageVo.setSort("create_time"); pageVo.setOrder("desc"); shopDeliveryInfo.setCompanyId(sysUsers.getCompanyId()); - if (getMe().getShopRole().equals(Dictionary.FLAG_NO_N)) { - shopDeliveryInfo.setShopId(sysUsers.getShopId()); - } - - List<ShopDeliveryInfo> dataList = shopDeliveryInfoDao.selectInPage(shopDeliveryInfo, pageVo); AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shopDeliveryInfoDao.selectTotalRecord(shopDeliveryInfo)); diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java index f1694d6..1916ac4 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java @@ -225,6 +225,7 @@ shopDeliveryInfo.setUserId(shopOrder.getUserId()); shopDeliveryInfo.setDeliveryWay(shippingMethod); shopDeliveryInfo.setShopId(shopOrder.getStoreId().longValue()); + shopDeliveryInfo.setCompanyId(shopOrder.getCompanyId()); StringBuffer receiveAddrStr = new StringBuffer(); if (receiveAddress != null) { receiveAddrStr.append(receiveAddress.getAddrProvince()); diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties index 2a2ae62..9d8a8ef 100644 --- a/zq-erp/src/main/resources/config/application.properties +++ b/zq-erp/src/main/resources/config/application.properties @@ -4,9 +4,13 @@ #线上测试环境 -spring.datasource.username=ct_test -spring.datasource.password=123456 -spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 +#spring.datasource.username=ct_test +#spring.datasource.password=123456 +#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 + +spring.datasource.username=xc_shop +spring.datasource.password=xc_shop123!@# +spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml index c74aeca..493f7d5 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml @@ -619,7 +619,7 @@ </select> <select id="selectVipCardTotalMoney" resultType="java.lang.Double"> - SELECT TRUNCATE( SUM(gift_money)+SUM(real_money) ,2 ) from money_card_use where vip_id=#{vipId} and `status` ='有效' + SELECT IFNULL(sum(IFNULL(gift_money, 0)),0)+ IFNULL(sum(IFNULL(real_money, 0)),0) from money_card_use where vip_id=#{vipId} and `status` ='有效' </select> diff --git a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml index 5481b2b..bc19396 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml @@ -5,7 +5,7 @@ <mapper namespace="com.matrix.system.score.dao.ScoreVipDetailDao"> <select id="selectUserTotalScore" resultType="java.lang.Integer"> - select IFNULL(sum(IFNULL( remain_score, 0 )),0) from score_vip_detail + select IFNULL(sum(IFNULL(remain_score, 0 )),0) from score_vip_detail where state=1 and vip_id=#{vipId} -- Gitblit v1.9.1