From 830b2eb4e8b7eef6e73fe65cde5331d914c28786 Mon Sep 17 00:00:00 2001
From: 姜友瑶 <935090232@qq.com>
Date: Tue, 17 May 2022 11:08:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/score_shop' into developer
---
zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java | 65 ++++++++++++
zq-erp/src/main/resources/mybatis/mapper/hive/ServicesFlowDao.xml | 14 +-
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml | 4
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml | 17 +-
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml | 67 +++++++-----
zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml | 2
zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java | 7 +
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java | 7 +
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java | 9 +
zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml | 2
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml | 12 +-
zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml | 2
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml | 4
zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java | 12 +
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysGoodsServiceImpl.java | 7 -
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java | 2
zq-erp/src/main/resources/mybatis/mapper/hive/MyBeauticianCountDao.xml | 2
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml | 2
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml | 5
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml | 8
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml | 4
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml | 32 +++--
22 files changed, 196 insertions(+), 90 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
index d71a0a0..1bc056e 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
@@ -7,13 +7,13 @@
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.core.tools.excl.ExcelSheetPO;
import com.matrix.core.tools.excl.ExcelUtil;
import com.matrix.core.tools.excl.ExcelVersion;
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.service.SysUsersService;
import com.matrix.system.common.service.SystemDictionaryService;
@@ -334,8 +334,14 @@
@RequestMapping(value = "/del")
public @ResponseBody
AjaxResult del(String keys) {
-
- return remove(vipInfoService, keys);
+ List<Long> ids = StringUtils.strToCollToLong(keys, ",");
+ int i = vipInfoService.removeLogic(ids);
+ if (i > 0) {
+ return new AjaxResult(AjaxResult.STATUS_SUCCESS, "成功删除" + i + "条数据");
+ } else {
+ return new AjaxResult(AjaxResult.STATUS_FAIL, "删除失败");
+ }
+// return remove(vipInfoService, keys);
}
/**
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
index fd8fba7..9358069 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
@@ -25,6 +25,8 @@
public int deleteByIds(@Param("list") List<Long> list);
+ public int deleteLogicByIds(@Param("list") List<Long> list);
+
public int deleteById(Long id);
public List<SysVipInfo> selectInPage(@Param("record") SysVipInfo sysVipInfo, @Param("pageVo") PaginationVO pageVo);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
index cd93e2d..98eb791 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
@@ -42,6 +42,13 @@
*/
public int remove(List<Long> list);
+
+ /**
+ * 批量删除SysVipInfo
+ *
+ */
+ public int removeLogic(List<Long> list);
+
/**
* 根据id删除SysVipInfo
*
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysGoodsServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysGoodsServiceImpl.java
index dd985aa..04e4ce3 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysGoodsServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysGoodsServiceImpl.java
@@ -1,8 +1,5 @@
package com.matrix.system.hive.service.imp;
-import java.util.ArrayList;
-import java.util.List;
-
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.PaginationVO;
@@ -10,8 +7,8 @@
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.dao.UtilDao;
import com.matrix.system.common.tools.ServiceUtil;
+import com.matrix.system.constance.Dictionary;
import com.matrix.system.constance.TableMapping;
-
import com.matrix.system.hive.bean.SysGoods;
import com.matrix.system.hive.dao.SysGoodsDao;
import com.matrix.system.hive.service.SysGoodsService;
@@ -19,7 +16,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import com.matrix.system.constance.Dictionary;
+import java.util.List;
/**
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
index 0515e39..9933f81 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -181,6 +181,13 @@
}
@Override
+ public int removeLogic(List<Long> list) {
+
+ return sysVipInfoDao.deleteLogicByIds(list);
+
+ }
+
+ @Override
public int removeById(Long id) {
return sysVipInfoDao.deleteById(id);
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
index 20c9780..b2b2653 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
@@ -185,8 +185,15 @@
@RequestMapping(value = "/del")
public @ResponseBody
AjaxResult del(String keys) {
+ List<Long> ids = StringUtils.strToCollToLong(keys, ",");
+ int i = vipInfoService.removeLogic(ids);
+ if (i > 0) {
+ return new AjaxResult(AjaxResult.STATUS_SUCCESS, "成功删除" + i + "条数据");
+ } else {
+ return new AjaxResult(AjaxResult.STATUS_FAIL, "删除失败");
+ }
- return remove(vipInfoService, keys);
+// return remove(vipInfoService, keys);
}
/**
diff --git a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
index d15125a..0d96af4 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
@@ -25,7 +25,7 @@
LEFT JOIN shop_activities d ON a.award_id = d.id
<where>
a.company_id = #{record.companyId}
- and a.activity_id = #{record.actId}
+ and a.activity_id = #{record.actId} and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record.yhmc != null and record.yhmc != ''">
and b.nick_name like concat('%',#{record.yhmc},'%')
</if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml
index 748d06f..69f5751 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml
@@ -69,7 +69,7 @@
left join activity_sign_receive_record e on a.receive_id= e.id
left join shop_delivery_info f on a.logistics_id= f.id
<where>
- a.company_id = #{record.companyId}
+ a.company_id = #{record.companyId} and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record.zjzxm != null and record.zjzxm != ''">
and b.nick_name like concat('%',#{record.zjzxm},'%')
</if>
@@ -90,7 +90,7 @@
FROM
activity_sign_receive_record a
left join sys_vip_info b on a.user_id= b.id
- where a.user_id = #{userId} and a.award_id = #{receiveId}
+ where a.user_id = #{userId} and a.award_id = #{receiveId} and (b.IS_DELETE is null or b.IS_DELETE = '')
</select>
<select id="selectShopDeliveryInfoByLogisticsId" resultType="com.matrix.system.shopXcx.bean.ShopDeliveryInfo">
diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml
index 3fe7b82..d1018b6 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml
@@ -24,7 +24,7 @@
LEFT JOIN sys_vip_info c ON a.vip_id = c.id
LEFT JOIN sys_shop_info d ON a.shop_id = d.id
<where>
- a.company_id=#{param.companyId}
+ a.company_id=#{param.companyId} and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="param.shopId != null and param.shopId != 0 ">
and a.shop_id=#{param.shopId}
</if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
index 1d001af..65dc27b 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
@@ -55,7 +55,7 @@
sys_vip_info a
WHERE
a.recommend_id = #{userId}
- AND a.is_sales = #{isSales}
+ AND a.is_sales = #{isSales} and (a.IS_DELETE is null or a.IS_DELETE = '')
</select>
<select id="findShopSalesmanApplyList" resultType="com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo">
@@ -68,9 +68,9 @@
WHERE s.id = a.parent_user_id ) parentUser,
c.nick_name parentUserNow,
( SELECT COUNT(*) FROM sys_vip_info
- WHERE recommend_id = a.user_id AND is_sales != 1 ) lowerLevelNum,
+ WHERE recommend_id = a.user_id AND is_sales != 1 and (IS_DELETE is null or IS_DELETE = '')) lowerLevelNum,
( SELECT COUNT(*) FROM sys_vip_info
- WHERE recommend_id = a.user_id AND is_sales = 1 ) invitedNum,
+ WHERE recommend_id = a.user_id AND is_sales = 1 and (IS_DELETE is null or IS_DELETE = '')) invitedNum,
( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
WHERE order_status = 2 AND sales_user_id = a.user_id ) totalRevenue,
( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
@@ -85,7 +85,7 @@
LEFT JOIN shop_salesman_grade g ON a.grade_id = g.id
LEFT JOIN sys_vip_info c ON c.id = b.recommend_id
<where>
- a.company_id=#{record.companyId}
+ a.company_id=#{record.companyId} and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record.shenheState != null and record.shenheState != ''">
and a.apply_status=#{record.shenheState}
</if>
@@ -110,7 +110,7 @@
LEFT JOIN sys_vip_info b ON a.user_id = b.id
<where>
a.company_id = #{record.companyId}
- and a.apply_status = #{record.applyStatus}
+ and a.apply_status = #{record.applyStatus} and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record.nickName != null and record.nickName != ''">
and b.nick_name like concat('%',#{record.nickName},'%')
</if>
@@ -132,6 +132,7 @@
<where>
a.company_id = #{record.companyId}
and a.is_sales != 1
+ and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.nickName != null and record.nickName != ''">
and a.nick_name like concat('%',#{record.nickName},'%')
</if>
@@ -185,10 +186,12 @@
( SELECT count( * ) FROM shop_salesman_order c WHERE c.sales_user_id = #{openId} and revenue_type =1 ) AS salesorderCount,
( SELECT count( * ) FROM shop_salesman_order c WHERE c.sales_user_id = #{openId} and revenue_type =2 ) AS invitationOrderCount,
- (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=1) as invitationCount,
- (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=2) as customerCount
+ (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=1
+ and (IS_DELETE is null or IS_DELETE = '')) as invitationCount,
+ (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=2
+ and (IS_DELETE is null or IS_DELETE = '')) as customerCount
from sys_vip_info a where
- a.id=#{id}
+ a.id=#{id} and (a.IS_DELETE is null or a.IS_DELETE = '')
</select>
@@ -202,9 +205,11 @@
(SELECT s.nick_name FROM sys_vip_info s
WHERE s.id = a.parent_user_id ) parentUser,
( SELECT COUNT(*) FROM sys_vip_info
- WHERE recommend_id = a.user_id AND is_sales != 1 ) lowerLevelNum,
+ WHERE recommend_id = a.user_id AND is_sales != 1
+ and (IS_DELETE is null or IS_DELETE = '')) lowerLevelNum,
( SELECT COUNT(*) FROM sys_vip_info
- WHERE recommend_id = a.user_id AND is_sales = 1 ) invitedNum,
+ WHERE recommend_id = a.user_id AND is_sales = 1
+ and (IS_DELETE is null or IS_DELETE = '')) invitedNum,
( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
WHERE order_status = 2 AND sales_user_id = a.user_id ) totalRevenue,
( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
@@ -216,7 +221,7 @@
shop_salesman_apply a
LEFT JOIN sys_vip_info b ON a.user_id = b.id
LEFT JOIN shop_salesman_grade g ON a.grade_id = g.id
- where a.id = #{applyId}
+ where a.id = #{applyId} and (b.IS_DELETE is null or b.IS_DELETE = '')
</select>
<select id="findCustomDetail" resultType="com.matrix.system.fenxiao.vo.ShopCustomDetailVo">
@@ -230,7 +235,7 @@
<where>
b.company_id = #{record.companyId}
AND b.is_sales != 1
- and b.recommend_id = #{record.userId}
+ and b.recommend_id = #{record.userId} and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record.userName != null and record.userName != ''">
and b.nick_name like concat('%',#{record.userName},'%')
</if>
@@ -254,6 +259,7 @@
a.company_id = #{record.companyId}
AND b.is_sales = 1
and b.recommend_id = #{record.userId}
+ and (b.IS_DELETE is null or b.IS_DELETE = '')
and a.apply_status = 2
<if test="record.userName != null and record.userName != ''">
and b.nick_name like concat('%',#{record.userName},'%')
@@ -283,7 +289,7 @@
left join shop_order c on a.order_id=c.id
LEFT JOIN sys_shop_info f on f.id = c.store_id
<where>
- a.sales_user_id = #{record.userId}
+ a.sales_user_id = #{record.userId} and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record.orderType != null and record.orderType != ''">
and a.order_status = #{record.orderType}
</if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
index 0e05a28..2ced513 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -165,6 +165,7 @@
LEFT JOIN shopping_goods_category i ON e.cate_id = i.id
left join sys_proj_services l on a.service_order_id=l.id
<where>
+ and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record!=null">
<if
test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) ">
@@ -266,6 +267,7 @@
LEFT JOIN shopping_goods_category j ON i.parent_id = j.id
left join sys_proj_services l on a.service_order_id=l.id
<where>
+ and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record!=null">
<if
test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) ">
@@ -889,7 +891,7 @@
left join sys_users b on a.BEATUY_ID=b.su_id
inner join sys_shop_info c on c.id=a.SHOP_ID
<where>
-
+ and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.vipName != null and record.vipName !=''">
and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName})
</if>
@@ -921,7 +923,7 @@
left join sys_users b on a.BEATUY_ID=b.su_id
inner join sys_shop_info c on c.id=a.SHOP_ID
<where>
-
+ and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.vipName != null and record.vipName !=''">
and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName})
</if>
@@ -1156,7 +1158,7 @@
left join sys_order_item j on a.order_item_id=j.ID
left join achieve_rule u on u.id=e.achieve_rule_id
<where>
- and a.company_id = #{record.companyId}
+ and a.company_id = #{record.companyId} and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record.shopId != null">
and a.shop_id = #{record.shopId}
</if>
@@ -1292,7 +1294,7 @@
from sys_users a
left join achieve_new b on a.su_id=b.beault_id
left join sys_vip_info c on b.vip_id=c.ID
- where 1=1
+ where 1=1 and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record.companyId != null">
and a.company_id=#{record.companyId}
</if>
@@ -1338,7 +1340,7 @@
from sys_users a
left join achieve_new b on a.su_id=b.beault_id
left join sys_vip_info c on b.vip_id=c.ID
- where 1=1
+ where 1=1 and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record.companyId != null">
and a.company_id=#{record.companyId}
</if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MyBeauticianCountDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MyBeauticianCountDao.xml
index b55a131..6819621 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/MyBeauticianCountDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MyBeauticianCountDao.xml
@@ -32,7 +32,7 @@
LEFT JOIN sys_proj_services b ON a.SERVICES_ID = b.ID
LEFT JOIN sys_vip_info c ON b.VIP_ID = c.ID
LEFT JOIN sys_users d on d.su_id=a.STAFF_ID
- WHERE b.state='服务单结束'
+ WHERE b.state='服务单结束' and (c.IS_DELETE is null or c.IS_DELETE = '')
) t
GROUP BY
t.VIP_ID,
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ServicesFlowDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ServicesFlowDao.xml
index 4782953..0403365 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/ServicesFlowDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ServicesFlowDao.xml
@@ -108,7 +108,7 @@
LEFT JOIN sys_proj_services b on a.service_id=b.ID
LEFT JOIN sys_vip_info c on b.VIP_ID=c.ID
LEFT JOIN sys_users e on e.su_id=a.operation_id
- where 1=1
+ where 1=1 and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record!=null">
<if test="record.beginTime != null ">
@@ -158,7 +158,7 @@
LEFT JOIN sys_proj_services b on a.service_id=b.ID
LEFT JOIN sys_vip_info c on b.VIP_ID=c.ID
LEFT JOIN sys_users e on e.su_id=a.operation_id
- where 1=1
+ where 1=1 and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record!=null">
<if test="record.beginTime != null ">
@@ -171,7 +171,7 @@
and a.operation_id = #{record.operationId}
</if>
<if test="record.shopId != null and record.shopId !='' ">
- AND b.VIP_ID IN (SELECT t.ID FROM sys_vip_info t WHERE t.shop_id = #{record.shopId})
+ AND b.VIP_ID IN (SELECT t.ID FROM sys_vip_info t WHERE t.shop_id = #{record.shopId} and (t.IS_DELETE is null or t.IS_DELETE = ''))
</if>
<if test="record.shopId != null and record.shopId !='' ">
AND b.shop_id = #{record.shopId}
@@ -202,7 +202,7 @@
LEFT JOIN sys_proj_services b on a.service_id=b.ID
LEFT JOIN sys_vip_info c on b.VIP_ID=c.ID
LEFT JOIN sys_users e on e.su_id=a.operation_id
- where 1=1
+ where 1=1 and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record!=null">
<if test="record.beginTime != null ">
@@ -244,7 +244,7 @@
LEFT JOIN sys_proj_services b on a.service_id=b.ID
LEFT JOIN sys_vip_info c on b.VIP_ID=c.ID
LEFT JOIN sys_users e on e.su_id=a.operation_id
- where 1=1
+ where 1=1 and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record!=null">
<if test="record.beginTime != null ">
@@ -257,7 +257,7 @@
and a.operation_id = #{record.operationId}
</if>
<if test="record.shopId != null and record.shopId !='' ">
- AND b.VIP_ID IN (SELECT t.ID FROM sys_vip_info t WHERE t.shop_id = #{record.shopId})
+ AND b.VIP_ID IN (SELECT t.ID FROM sys_vip_info t WHERE t.shop_id = #{record.shopId} and (t.IS_DELETE is null or t.IS_DELETE = ''))
</if>
<if test="record.searchShop != null and record.searchShop !=''">
AND b.shop_id = #{record.searchShop}
@@ -302,7 +302,7 @@
LEFT JOIN sys_proj_services b on a.service_id=b.ID
LEFT JOIN sys_vip_info c on b.VIP_ID=c.ID
LEFT JOIN sys_users e on e.su_id=a.operation_id
- where 1=1
+ where 1=1 and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="record!=null">
<if test="record.beginTime != null ">
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
index dd72e3c..977ec03 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
@@ -333,8 +333,8 @@
and a.STAFF_ID = #{suId} ]]>
and a.STATE !='预约取消'
and a.STATE !='待确认'
- and a.STATE !='待预约'
and a.STATE !='服务单结束'
+ and a.STATE !='待预约' and (c.IS_DELETE is null or c.IS_DELETE = '')
order by a.BEGIN_TIME asc
</select>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
index 51b8e0d..986be92 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
@@ -354,7 +354,7 @@
left join sys_vip_info c on a.vip_id=c.id
<where>
and a.company_id=#{companyId}
-
+ and (c.IS_DELETE is null or c.IS_DELETE = '')
<if test="shopId != null ">
and a.shop_id=#{shopId}
</if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
index eb2c3aa..d58c6c5 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -187,7 +187,7 @@
left JOIN sys_users c on c.su_id=a.STAFF_ID
left JOIN sys_users e on e.su_id=a.cashier_id
left JOIN sys_shop_info d on d.ID=a.SHOP_ID
- where 1=1
+ where 1=1 and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record!=null">
<if test="record.keyWordVo != null and record.keyWordVo!='' ">
and (b.PHONE like concat('%',#{record.keyWordVo},'%')
@@ -275,7 +275,7 @@
LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
left JOIN sys_users c on c.su_id=a.STAFF_ID
left JOIN sys_shop_info d on d.ID=a.SHOP_ID
- where 1=1
+ where 1=1 and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record!=null">
<if test="record.keyWordVo != null and record.keyWordVo!='' ">
and (b.PHONE like concat('%',#{record.keyWordVo},'%')
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
index 902cbc7..a85356b 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -307,7 +307,7 @@
FROM sys_proj_services a
LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
left join sys_beautician_state c on a.id=c.SERVICES_ID
- WHERE 1 = 1
+ WHERE 1 = 1 and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record!=null">
<if test="record.queryStaffId != null and record.queryStaffId !='' ">
and (a.CREATE_STAFF_ID = #{record.queryStaffId} or c.STAFF_ID=#{record.queryStaffId} )
@@ -374,7 +374,7 @@
FROM sys_proj_services a
LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
left join sys_beautician_state c on a.id=c.SERVICES_ID
- WHERE 1 = 1
+ WHERE 1 = 1 and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record!=null">
<if test="record.queryStaffId != null and record.queryStaffId !='' ">
and (a.CREATE_STAFF_ID = #{record.queryStaffId} or c.STAFF_ID=#{record.queryStaffId} )
@@ -443,7 +443,7 @@
FROM sys_proj_services a
LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
left join sys_beautician_state c on a.id=c.SERVICES_ID
- where a.ID=#{id}
+ where a.ID=#{id} and (b.IS_DELETE is null or b.IS_DELETE = '')
</select>
<select id="selectNeedNoticeService" resultMap="SysProjServicesMap">
@@ -455,7 +455,7 @@
LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
where a.YY_TIME > now()
and DATE_ADD(now(),INTERVAL 1 HOUR) > a.YY_TIME
- and overtime_notice is null
+ and overtime_notice is null and (b.IS_DELETE is null or b.IS_DELETE = '')
</select>
@@ -476,7 +476,7 @@
FROM sys_proj_services a
LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
left join sys_beautician_state c on a.id=c.SERVICES_ID
- WHERE 1 = 1
+ WHERE 1 = 1 and (b.IS_DELETE is null or b.IS_DELETE = '')
<if test="record!=null">
<if test="record.queryStaffId != null and record.queryStaffId !='' ">
and (a.CREATE_STAFF_ID = #{record.queryStaffId} or c.STAFF_ID=#{record.queryStaffId} )
@@ -570,7 +570,7 @@
left join sys_proj_use g on b.puse_id=g.ID
left join sys_shop_info h on a.SHOP_ID=h.ID
<where>
- and a.company_id=#{record.companyId}
+ and a.company_id=#{record.companyId} and (e.IS_DELETE is null or e.IS_DELETE = '')
<if test="record.queryKey != null and record.queryKey != ''">
and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) )
</if>
@@ -607,7 +607,7 @@
left join sys_users f on f.su_id=b.STAFF_ID
left join sys_proj_use g on b.puse_id=g.ID
<where>
- and a.company_id=#{record.companyId}
+ and a.company_id=#{record.companyId} and (e.IS_DELETE is null or e.IS_DELETE = '')
<if test="record.queryKey != null and record.queryKey != ''">
and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) )
</if>
@@ -666,6 +666,7 @@
left join sys_shop_info h on a.SHOP_ID=h.ID
left join shopping_goods m on g.proj_id=m.id
<where>
+ and (e.IS_DELETE is null or e.IS_DELETE = '')
<if test="queryKey != null and queryKey != ''">
and instr(a.SERVICE_NO, #{queryKey})
</if>
@@ -717,7 +718,7 @@
left join sys_proj_use g on b.puse_id=g.ID
left join sys_shop_info h on a.SHOP_ID=h.ID
left join shopping_goods m on g.proj_id=m.id
- where a.id=#{id}
+ where a.id=#{id} and (e.IS_DELETE is null or e.IS_DELETE = '')
</select>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
index b23d511..bbf480c 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
@@ -144,7 +144,7 @@
COMMISSION_ALL,IN_DATE,STAFF_ID,SHOP_ID,IS_DELETE,REMARK,PASSWORD,
EMAIL,CREATE_TIME,UUID,BALANCE,blood,sfCard,link,marry,vocation,handleTime from
sys_vip_info
- WHERE company_id=#{companyId}
+ WHERE company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
and (STAFF_ID = #{staffId} or BEATUY_ID = #{staffId})
AND datediff(date_add(concat(
date_format(BIRTHDAY1, "%Y"),
@@ -170,7 +170,7 @@
select count(*) from
sys_vip_info
WHERE
- company_id=#{companyId}
+ company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
AND (STAFF_ID = #{staffId} or BEATUY_ID = #{staffId})
AND datediff(date_add(concat(
date_format(BIRTHDAY1, "%Y"),
@@ -189,7 +189,7 @@
sys_vip_info a
LEFT JOIN service_record b ON a.ID
= b.vip_id
- WHERE company_id=#{companyId}
+ WHERE company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
and (a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.follow_time BETWEEN curdate()
AND
@@ -212,7 +212,7 @@
LEFT JOIN service_record b ON a.ID
= b.vip_id
WHERE
- company_id=#{companyId}
+ company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
and
(a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.follow_time BETWEEN curdate()
@@ -226,7 +226,7 @@
sys_vip_info a
LEFT JOIN sys_proj_services b ON a.ID = b.VIP_ID
WHERE
- company_id=#{companyId}
+ company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
and
(a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.YY_TIME BETWEEN curdate()
@@ -250,7 +250,7 @@
LEFT JOIN sys_proj_services b ON a.ID = b.VIP_ID
WHERE
- company_id=#{companyId}
+ company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
and
(a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.YY_TIME BETWEEN curdate()
@@ -568,6 +568,14 @@
</foreach>
</delete>
+ <update id="deleteLogicByIds" parameterType="java.util.List">
+ UPDATE sys_vip_info set IS_DELETE = '已删除' where ID in
+ <foreach collection="list" index="index" item="item" open="("
+ separator="," close=")">
+ #{item}
+ </foreach>
+ </update>
+
<!-- 根据id删除 -->
<delete id="deleteById">
DELETE FROM sys_vip_info
@@ -616,7 +624,7 @@
<select id="findByOpenId" resultMap="SysVipInfoMap">
select *
- from sys_vip_info where openid=#{openId}
+ from sys_vip_info where openid=#{openId} and (IS_DELETE is null or IS_DELETE = '')
</select>
<!-- 根据手机和密码查询 -->
@@ -628,7 +636,7 @@
<!-- 判断是否为唯一 -->
<select id="selectTotalByField" resultType="java.lang.Integer">
select count(*) from
- sys_vip_info where ${field} = #{value}
+ sys_vip_info where ${field} = #{value} and (IS_DELETE is null or IS_DELETE = '')
</select>
<!-- 根据对象查询 -->
@@ -708,7 +716,7 @@
COMMISSION_ALL,IN_DATE,STAFF_ID,SHOP_ID,IS_DELETE,REMARK,PASSWORD,
EMAIL,CREATE_TIME,UUID,BALANCE
from sys_vip_info where
- company_id=#{companyId}
+ company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
and PHONE like concat('%',#{keyWord},'%') limit 0,10
</select>
@@ -721,7 +729,7 @@
COMMISSION_ALL,IN_DATE,STAFF_ID,SHOP_ID,IS_DELETE,REMARK,PASSWORD,
EMAIL,CREATE_TIME,UUID,BALANCE,blood,sfCard,link,marry,vocation
from sys_vip_info
- where company_id=#{companyId}
+ where company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
and (instr(PHONE,#{keyWord})
or instr(VIP_NAME ,#{keyWord})
or instr(zjm ,#{keyWord})
@@ -762,6 +770,7 @@
<sql id="whereVo">
<where>
+ and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record!=null">
<if test="record.keyWord != null and record.keyWord !='' ">
and (a.VIP_NO like CONCAT('%',#{record.keyWord},'%') or
@@ -792,7 +801,7 @@
</sql>
<sql id="where">
- where 1=1
+ where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record!=null">
<if test="record.id != null and record.id !='' ">
and a.ID = #{record.id}
@@ -1072,7 +1081,7 @@
(select a.id from sys_vip_info a
- where 1=1
+ where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1085,7 +1094,7 @@
f.vip_name as name
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1
+ where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>
@@ -1113,7 +1122,7 @@
(select a.id from sys_vip_info a
- where 1=1
+ where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1126,7 +1135,7 @@
f.vip_name as name
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1
+ where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>)k
@@ -1139,7 +1148,7 @@
f.vip_name as name
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1
+ where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>
@@ -1161,7 +1170,7 @@
count(*)
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1
+ where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>
@@ -1177,7 +1186,7 @@
(select a.id from sys_vip_info a
- where 1=1
+ where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1203,7 +1212,7 @@
(select a.id from sys_vip_info a
- where 1=1
+ where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1213,13 +1222,13 @@
<select id="selectByPhone" resultMap="SysVipInfoMapSimple">
- select * from sys_vip_info where PHONE = #{phone} and company_id=#{companyId}
+ select * from sys_vip_info where PHONE = #{phone} and company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
</select>
<select id="selectVipTelphoneByIds" resultType="java.lang.String">
select phone from sys_vip_info
- where phone is not null and id in
+ where phone is not null and (IS_DELETE is null or IS_DELETE = '') and id in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
@@ -1229,18 +1238,18 @@
<select id="selectAllVipPhone" resultType="java.lang.String">
select phone from sys_vip_info
where
- company_id=#{companyId}
+ company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
and phone is not null
</select>
<select id="selectVipPhoneWithShop" resultType="java.lang.String">
select phone from sys_vip_info
- where phone is not null and shop_id=#{shopId}
+ where phone is not null and shop_id=#{shopId} and (IS_DELETE is null or IS_DELETE = '')
</select>
<select id="selectOldUserByTelphone" resultMap="SysVipInfoMap">
- select * from sys_vip_info where phone=#{telphone} and is_deal=1
+ select * from sys_vip_info where phone=#{telphone} and is_deal=1 and (IS_DELETE is null or IS_DELETE = '')
</select>
@@ -1359,7 +1368,7 @@
</insert>
<select id="selectVipInfoByVipNo" resultMap="SysVipInfoMapSimple">
- select * from sys_vip_info where company_id=#{companyId} and vip_no=#{vipNo}
+ select * from sys_vip_info where company_id=#{companyId} and vip_no=#{vipNo} and (IS_DELETE is null or IS_DELETE = '')
</select>
<select id="selectVipAddressBookByList" resultType="com.matrix.system.app.vo.VipInfoListVo">
@@ -1377,7 +1386,7 @@
select x.vip_id, count(1) arriveCnt from (
select vip_id, date_format(datatime, '%Y-%m-%d')
from achieve_new
- where 1=1
+ where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
<!-- 本月到店次数 -->
<if test="record.sort == 'monthArrived'">
and date_format(curdate(), '%Y-%m') = date_format(datatime, '%Y-%m')
@@ -1473,7 +1482,7 @@
left join money_card_use b on a.ID = b.vip_id and b.status='有效'
left join sys_vip_level c on a.LEVEL_ID = c.ID
left join sys_shop_info e on a.SHOP_ID=e.ID
- where a.ID=#{id}
+ where a.ID=#{id} and (a.IS_DELETE is null or a.IS_DELETE = '')
</select>
@@ -1490,7 +1499,7 @@
inner join sys_order b on a.ID=b.VIP_ID
inner join sys_shop_info c on a.SHOP_ID=c.ID
left join sys_users d on a.STAFF_ID=d.su_id
- where b.STATU='欠款' and b.arrears!=0
+ where b.STATU='欠款' and b.arrears!=0 and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.companyId!=null">
and a.company_id=#{record.companyId}
</if>
@@ -1527,7 +1536,7 @@
inner join sys_order b on a.ID=b.VIP_ID
inner join sys_shop_info c on a.SHOP_ID=c.ID
left join sys_users d on a.STAFF_ID=d.su_id
- where b.STATU='欠款' and b.arrears!=0
+ where b.STATU='欠款' and b.arrears!=0 and (a.IS_DELETE is null or a.IS_DELETE = '')
<if test="record.companyId!=null">
and a.company_id=#{record.companyId}
</if>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
index 2e74316..cb7b22f 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
@@ -248,7 +248,7 @@
from shop_activities_group_join t1
inner join shop_activities_group_price t2 on t1.gp_id=t2.id
inner join sys_vip_info t3 on t1.gj_head_id=t3.id
- where t1.act_id = #{record.actId}
+ where t1.act_id = #{record.actId} and (t3.IS_DELETE is null or t3.IS_DELETE = '')
<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
<if test="pageVo.sort !=null and pageVo.order !=null">
order by
@@ -311,7 +311,7 @@
from shop_activities_group_join t1
inner join shop_activities_group_join_user t2 on t1.id=t2.gj_id and t2.is_has_cancel=2 and t2.is_has_pay=1
left join sys_vip_info t3 on t2.user_id=t3.id
- where t1.id=#{gjId}
+ where t1.id=#{gjId} and (t3.IS_DELETE is null or t3.IS_DELETE = '')
</select>
<select id="selectOwnerGroupJoinInfoWithNoPay" resultMap="ShopActivitiesGroupJoinMap">
@@ -328,7 +328,7 @@
from shop_activities_group_join t1
inner join shop_activities_group_join_user t2 on t1.id=t2.gj_id and t2.is_has_cancel=2
left join sys_vip_info t3 on t2.user_id=t3.id
- where t1.id=#{gjId}
+ where t1.id=#{gjId} and (t3.IS_DELETE is null or t3.IS_DELETE = '')
</select>
<select id="selectIsExistGroupInfoByUserId" resultMap="ShopActivitiesGroupJoinMap">
@@ -351,7 +351,7 @@
from shop_activities_group_join t1
inner join shop_activities_group_price t2 on t1.gp_id=t2.id
left join sys_vip_info t3 on t1.gj_head_id=t3.id
- where t1.act_id=#{actId} and t1.gj_status=3
+ where t1.act_id=#{actId} and t1.gj_status=3 and (t3.IS_DELETE is null or t3.IS_DELETE = '')
</select>
<select id="selectGroupAndPriceById" resultMap="ShopActivitiesGroupJoinMap">
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
index 0a420e7..aa69d97 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
@@ -188,7 +188,7 @@
left join sys_shop_info t4 on t3.store_id=t4.id
left join sys_vip_info t5 on t1.user_id=t5.id
left join shop_product t6 on t2.goods_id=t6.id
- where t2.act_id=#{record.actId}
+ where t2.act_id=#{record.actId} and (t5.IS_DELETE is null or t5.IS_DELETE = '')
<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
<if test="pageVo.sort !=null and pageVo.order !=null">
order by
@@ -210,7 +210,7 @@
left join sys_shop_info t4 on t3.store_id=t4.id
left join sys_vip_info t5 on t1.user_id=t5.id
left join shop_product t6 on t2.goods_id=t6.id
- where t2.act_id=#{record.actId}
+ where t2.act_id=#{record.actId} and (t5.IS_DELETE is null or t5.IS_DELETE = '')
</select>
<!-- 根据id查询-->
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
index 3c85b34..6977ef4 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
@@ -88,7 +88,6 @@
<!-- where sql -->
<sql id="where_sql">
-
<if test="record!=null">
<if test="(record.comId!=null and record.comId!='') or (record.comId!='' and record.comId==0) ">
and com_id = #{record.comId}
@@ -381,6 +380,8 @@
LEFT JOIN shop_order o ON c.order_id = o.id
LEFT JOIN sys_vip_info b ON c.user_id = b.id
<where>
+ and (b.IS_DELETE is null or b.IS_DELETE = '')
+
<if test="record!=null">
<if test="(record.userId!=null and record.userId!='') or (record.userId!='' and record.userId==0) ">
and c.user_id = #{record.userId}
@@ -431,7 +432,7 @@
AND p.del_flag = 2
AND o.del_flag = 2
AND c.del_flag = 2
- AND c.com_audit_status = 1
+ AND c.com_audit_status = 1 and (b.IS_DELETE is null or b.IS_DELETE = '')
</where>
order by c.create_time desc
<if test="record.offset >=0 and record.limit >0">
diff --git a/zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java b/zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java
index 81bed05..06aea9e 100644
--- a/zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java
+++ b/zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java
@@ -1,13 +1,21 @@
package com.matrix;
import com.matrix.core.tools.StringUtils;
+import com.matrix.system.common.authority.DefaultAuthorityManager;
+import com.matrix.system.common.dao.BusParameterSettingsDao;
+import com.matrix.system.common.dao.SysCompanyDao;
+import com.matrix.system.common.dao.SysUsersDao;
+import com.matrix.system.common.service.SysUsersService;
import com.matrix.system.constance.Dictionary;
import com.matrix.system.fenxiao.dao.BizUserDao;
import com.matrix.system.fenxiao.entity.BizUser;
+import com.matrix.system.hive.bean.MoneyCardUse;
import com.matrix.system.hive.bean.SysVipInfo;
+import com.matrix.system.hive.dao.SysBedInfoDao;
+import com.matrix.system.hive.dao.SysOrderItemDao;
+import com.matrix.system.hive.dao.SysShopInfoDao;
import com.matrix.system.hive.dao.SysVipInfoDao;
-import com.matrix.system.hive.service.CodeService;
-import com.matrix.system.hive.service.SysVipInfoService;
+import com.matrix.system.hive.service.*;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +23,7 @@
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
@@ -41,6 +50,58 @@
@Autowired
SysVipInfoService sysVipInfoService;
+ @Autowired
+ private SysUsersService sysUsersService;
+
+ @Autowired
+ private DefaultAuthorityManager authorityManager;
+
+ @Autowired
+ SysShopInfoDao sysShopInfoDao;
+
+ @Autowired
+ SysCompanyDao sysCompanyDao;
+
+ @Autowired
+ private SysShopInfoService sysShopInfoService;
+
+ @Resource
+ private SysOrderService sysOrderService;
+
+ @Resource
+ private SysBedInfoService bedInfoService;
+
+ @Resource
+ private SysWorktimeService sysWorkTimeService;
+
+
+ @Resource
+ private SysUsersService usersService;
+
+ @Autowired
+ private SysUsersDao sysUsersDao;
+
+
+ @Autowired
+ private SysBedInfoDao sysBedInfoDao;
+ @Resource
+ private SysOrderService orderService;
+ @Autowired
+ private BusParameterSettingsDao busParameterSettingsDao;
+ @Autowired
+ private SysOrderItemDao orderItemDao;
+
+ @Resource
+ private MoneyCardUseService cardUseService;
+ @Test
+ public void findOrderById() {
+ Long vipId = 111L;
+ MoneyCardUse moneyCardUse = new MoneyCardUse();
+ moneyCardUse.setVipId(vipId);
+ moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX);
+ List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse);
+ }
+
@Test
@Transactional
public void addSettings(){
--
Gitblit v1.9.1