姜友瑶
2022-05-23 ea865027c9e115057644f59747f3bed2a8a963e6
Merge branch 'master' into feature/订单服务单代码改造
20 files modified
201 ■■■■ changed files
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java 9 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java 7 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java 3 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/application.properties 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml 30 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml 14 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/MyBeauticianCountDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/ServicesFlowDao.xml 14 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml 18 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml 66 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml 8 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -5,11 +5,13 @@
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.tools.*;
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.system.common.bean.SysUsers;
import com.matrix.system.common.constance.AppConstance;
import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.bean.*;
import com.matrix.system.hive.dao.MoneyCardUseDao;
@@ -20,7 +22,6 @@
import com.matrix.system.hive.service.MoneyCardUseService;
import com.matrix.system.hive.service.SysProjUseService;
import com.matrix.system.hive.service.SysProjuseFreezeService;
import jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
@@ -337,6 +338,7 @@
                vipInfo.setPhone(telStr);
                vipInfo.setPhoto(defaultWoman);
                vipInfo.setName(objects.get(0).toString());
                vipInfo.setIsDelete(Dictionary.DELETED_N);
                vipInfoDao.insert(vipInfo);
            }
@@ -394,6 +396,7 @@
                vipInfo.setPhone(telStr);
                vipInfo.setPhoto(defaultWoman);
                vipInfo.setName(objects.get(0).toString());
                vipInfo.setIsDelete(Dictionary.DELETED_N);
                vipInfoDao.insert(vipInfo);
            }
            String goodNo = String.valueOf(objects.get(3));
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
@@ -25,11 +25,7 @@
    public int update(SysVipInfo sysVipInfo);
    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);
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -144,6 +144,7 @@
        }else{
            sysVipInfo.setPhoto(defaultWoman);
        }
        sysVipInfo.setIsDelete(Dictionary.DELETED_N);
        int i=sysVipInfoDao.insert(sysVipInfo);
        //创建用户默认储值卡
        addVipDefaultCard(sysVipInfo.getId());
@@ -183,7 +184,7 @@
    @Override
    public int remove(List<Long> list) {
        return sysVipInfoDao.deleteByIds(list);
        return sysVipInfoDao.deleteLogicByIds(list);
    }
@@ -197,7 +198,7 @@
    @Override
    public int removeById(Long id) {
        return sysVipInfoDao.deleteById(id);
        return sysVipInfoDao.deleteLogicByIds(Arrays.asList(id));
    }
@@ -362,6 +363,7 @@
        }else{
            sysVipInfo.setPhoto(defaultWoman);
        }
        sysVipInfo.setIsDelete(Dictionary.DELETED_N);
        int i=sysVipInfoDao.insert(sysVipInfo);
        modifyVipWithOtherInfo(sysVipInfo);
        return i;
@@ -517,6 +519,7 @@
        }else{
            vipInfo.setPhoto(defaultWoman);
        }
        vipInfo.setIsDelete(Dictionary.DELETED_N);
        int i=sysVipInfoDao.insert(vipInfo);
        if (CollectionUtils.isNotEmpty(addVipDto.getLabels())) {
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java
@@ -19,6 +19,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
@@ -105,7 +106,7 @@
            oldeUser.setPhoto(loginUser.getAvatarUrl());
            oldeUser.setAvatarUrl(loginUser.getAvatarUrl());
            sysVipInfoDao.update(oldeUser);
            sysVipInfoDao.deleteById(loginUser.getId());
            sysVipInfoDao.deleteLogicByIds(Arrays.asList(loginUser.getId()));
            String token = userCacheManager.saveUserInfo(oldeUser);
            AjaxResult result =   AjaxResult.buildSuccessInstance("绑定成功");
            result.putInMap("token",token);
zq-erp/src/main/resources/config/application.properties
@@ -1,5 +1,5 @@
spring.profiles.active=alpha
spring.profiles.active=local
evn=dev
server.port=8080
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 (b.IS_DELETE is null or b.IS_DELETE = '')
            and a.activity_id = #{record.actId}
            <if test="record.yhmc != null and record.yhmc != ''">
                and b.nick_name like concat('%',#{record.yhmc},'%')
            </if>
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} and (b.IS_DELETE is null or b.IS_DELETE = '')
            a.company_id = #{record.companyId}
            <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} and  (b.IS_DELETE is null or b.IS_DELETE = '')
        where a.user_id = #{userId} and a.award_id = #{receiveId}
    </select>
    <select id="selectShopDeliveryInfoByLogisticsId" resultType="com.matrix.system.shopXcx.bean.ShopDeliveryInfo">
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} and  (c.IS_DELETE is null or c.IS_DELETE = '')
            a.company_id=#{param.companyId}
            <if test="param.shopId != null and param.shopId != 0  ">
                and  a.shop_id=#{param.shopId}
            </if>
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_DELETE is null or a.IS_DELETE = '')
          AND a.is_sales = #{isSales}
    </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 and  (IS_DELETE is null or IS_DELETE = '')) lowerLevelNum,
        WHERE recommend_id = a.user_id AND is_sales != 1 ) lowerLevelNum,
        ( SELECT COUNT(*) FROM sys_vip_info
        WHERE recommend_id = a.user_id AND is_sales = 1 and  (IS_DELETE is null or IS_DELETE = '')) invitedNum,
        WHERE recommend_id = a.user_id AND is_sales = 1 ) 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} and  (b.IS_DELETE is null or b.IS_DELETE = '')
             a.company_id=#{record.companyId}
            <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  (b.IS_DELETE is null or b.IS_DELETE = '')
            and a.apply_status = #{record.applyStatus}
            <if test="record.nickName != null and record.nickName != ''">
                and b.nick_name like concat('%',#{record.nickName},'%')
            </if>
@@ -132,7 +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>
@@ -187,11 +187,11 @@
    ( 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
                                         and   (IS_DELETE is null or IS_DELETE = '')) as invitationCount,
                                         ) 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
                                         ) as customerCount
    from sys_vip_info a where
    a.id=#{id}  and  (a.IS_DELETE is null or a.IS_DELETE = '')
    a.id=#{id}
    </select>
@@ -206,10 +206,10 @@
        WHERE s.id = a.parent_user_id ) parentUser,
        ( SELECT COUNT(*) FROM sys_vip_info
        WHERE recommend_id = a.user_id AND is_sales != 1
            and  (IS_DELETE is null or IS_DELETE = '')) lowerLevelNum,
            ) lowerLevelNum,
        ( SELECT COUNT(*) FROM sys_vip_info
        WHERE recommend_id = a.user_id AND is_sales = 1
          and   (IS_DELETE is null or IS_DELETE = '')) invitedNum,
          ) 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
@@ -221,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} and  (b.IS_DELETE is null or b.IS_DELETE = '')
            where a.id = #{applyId}
    </select>
    <select id="findCustomDetail" resultType="com.matrix.system.fenxiao.vo.ShopCustomDetailVo">
@@ -235,7 +235,7 @@
        <where>
            b.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 b.recommend_id = #{record.userId}
            <if test="record.userName != null and record.userName != ''">
                and b.nick_name like concat('%',#{record.userName},'%')
            </if>
@@ -259,7 +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},'%')
@@ -289,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} and  (b.IS_DELETE is null or b.IS_DELETE = '')
            a.sales_user_id = #{record.userId}
            <if test="record.orderType != null and record.orderType != ''">
                and a.order_status = #{record.orderType}
            </if>
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -165,7 +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)  ">
@@ -267,7 +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)  ">
@@ -891,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>
@@ -923,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>
@@ -1158,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  (c.IS_DELETE is null or c.IS_DELETE = '')
            and a.company_id = #{record.companyId}
            <if test="record.shopId != null">
                and a.shop_id = #{record.shopId}
            </if>
@@ -1294,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  and  (c.IS_DELETE is null or c.IS_DELETE = '')
        where 1=1
        <if test="record.companyId != null">
         and a.company_id=#{record.companyId}
        </if>
@@ -1340,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 and (c.IS_DELETE is null or c.IS_DELETE = '')
            where 1=1
            <if test="record.companyId != null">
                and a.company_id=#{record.companyId}
            </if>
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='服务单结束' and (c.IS_DELETE is null or c.IS_DELETE = '')
            WHERE b.state='服务单结束'
            ) t
        GROUP BY
            t.VIP_ID,
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 and (c.IS_DELETE is null or c.IS_DELETE = '')
        where 1=1
        <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 and (c.IS_DELETE is null or c.IS_DELETE = '')
        where 1=1
        <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 (t.IS_DELETE is null or t.IS_DELETE = ''))
                AND b.VIP_ID IN (SELECT t.ID FROM sys_vip_info t WHERE t.shop_id = #{record.shopId}  )
            </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 and (c.IS_DELETE is null or c.IS_DELETE = '')
        where 1=1
        <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  and (c.IS_DELETE is null or c.IS_DELETE = '')
        where 1=1
        <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 (t.IS_DELETE is null or t.IS_DELETE = ''))
                AND b.VIP_ID IN (SELECT t.ID FROM sys_vip_info t WHERE t.shop_id = #{record.shopId}  )
            </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  and (c.IS_DELETE is null or c.IS_DELETE = '')
        where 1=1
        <if test="record!=null">
            
            <if test="record.beginTime != null  ">
zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
@@ -334,7 +334,7 @@
        and  a.STATE !='预约取消'
        and  a.STATE !='待确认'
        and  a.STATE !='服务单结束'
        and  a.STATE !='待预约' and (c.IS_DELETE is null or c.IS_DELETE = '')
        and  a.STATE !='待预约'
        order by a.BEGIN_TIME asc
    </select>
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>
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 and (b.IS_DELETE is null or b.IS_DELETE = '')
        where 1=1
        <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 and (b.IS_DELETE is null or b.IS_DELETE = '')
        where 1=1
        <if test="record!=null">
            <if test="record.keyWordVo != null and record.keyWordVo!='' ">
                and (b.PHONE like concat('%',#{record.keyWordVo},'%')
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -311,7 +311,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 and (b.IS_DELETE is null or b.IS_DELETE = '')
        WHERE 1 = 1
        <if test="record!=null">
            <if test="record.queryKey != null and record.queryKey != ''">
                and (instr(c.vip_name, #{record.queryKey}) or instr(c.phone, #{record.queryKey}) or instr(a.order_no, #{record.queryKey}))
@@ -381,7 +381,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 and (b.IS_DELETE is null or b.IS_DELETE = '')
        WHERE 1 = 1
        <if test="record!=null">
            <if test="record.queryKey != null and record.queryKey != ''">
                and (instr(c.vip_name, #{record.queryKey}) or instr(c.phone, #{record.queryKey}) or instr(a.order_no, #{record.queryKey}))
@@ -453,7 +453,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} and (b.IS_DELETE is null or b.IS_DELETE = '')
        where  a.ID=#{id}
    </select>
    <select id="selectNeedNoticeService" resultMap="SysProjServicesMap">
@@ -465,7 +465,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 (b.IS_DELETE is null or b.IS_DELETE = '')
        and overtime_notice is null
    </select>
@@ -486,7 +486,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 and (b.IS_DELETE is null or b.IS_DELETE = '')
        WHERE 1 = 1
        <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}  )
@@ -580,7 +580,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 (e.IS_DELETE is null or e.IS_DELETE = '')
            and a.company_id=#{record.companyId}
            <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>
@@ -617,7 +617,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 (e.IS_DELETE is null or e.IS_DELETE = '')
            and a.company_id=#{record.companyId}
            <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>
@@ -676,7 +676,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>
@@ -728,7 +728,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} and (e.IS_DELETE is null or e.IS_DELETE = '')
        where a.id=#{id}
    </select>
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}  and (IS_DELETE is null or IS_DELETE = '')
        WHERE company_id=#{companyId}  and IS_DELETE = 'N'
        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} and (IS_DELETE is null or IS_DELETE = '')
        company_id=#{companyId} and IS_DELETE = 'N'
        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} and (a.IS_DELETE is null or a.IS_DELETE = '')
        WHERE company_id=#{companyId} and  a.IS_DELETE = 'N'
        and (a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
        AND b.follow_time BETWEEN curdate()
        AND
@@ -212,7 +212,8 @@
        LEFT JOIN service_record b ON a.ID
        = b.vip_id
        WHERE
        company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
        company_id=#{companyId}
        and a.IS_DELETE  = 'N'
        and
        (a.STAFF_ID = #{staffId}  or a.BEATUY_ID = #{staffId})
        AND b.follow_time BETWEEN curdate()
@@ -226,7 +227,8 @@
        sys_vip_info a
        LEFT JOIN sys_proj_services b ON a.ID = b.VIP_ID
        WHERE
        company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
        company_id=#{companyId}
        and a.IS_DELETE = 'N'
        and
        (a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
        AND b.YY_TIME BETWEEN curdate()
@@ -250,7 +252,8 @@
        LEFT JOIN sys_proj_services b ON a.ID = b.VIP_ID
        WHERE
        company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
        company_id=#{companyId}
          and a.IS_DELETE  = 'N'
        and
        (a.STAFF_ID = #{staffId}  or a.BEATUY_ID = #{staffId})
        AND b.YY_TIME BETWEEN curdate()
@@ -569,7 +572,7 @@
    </delete>
    <update id="deleteLogicByIds" parameterType="java.util.List">
        UPDATE sys_vip_info set IS_DELETE = '已删除' where ID in
        UPDATE sys_vip_info set IS_DELETE = 'Y' where ID in
        <foreach collection="list" index="index" item="item" open="("
                 separator="," close=")">
            #{item}
@@ -624,7 +627,7 @@
    <select id="findByOpenId" resultMap="SysVipInfoMap">
        select *
        from sys_vip_info where openid=#{openId} and (IS_DELETE is null or IS_DELETE = '')
        from sys_vip_info where openid=#{openId} and IS_DELETE  = 'N'
    </select>
    <!-- 根据手机和密码查询 -->
@@ -636,7 +639,7 @@
    <!-- 判断是否为唯一 -->
    <select id="selectTotalByField" resultType="java.lang.Integer">
        select count(*) from
        sys_vip_info where ${field} = #{value} and (IS_DELETE is null or IS_DELETE = '')
        sys_vip_info where ${field} = #{value} and IS_DELETE  = 'N'
    </select>
    <!-- 根据对象查询 -->
@@ -716,7 +719,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} and  (IS_DELETE is null or IS_DELETE = '')
         company_id=#{companyId} and IS_DELETE = 'N'
         and PHONE like concat('%',#{keyWord},'%') limit 0,10
    </select>
@@ -729,7 +732,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} and (IS_DELETE is null or IS_DELETE = '')
         where company_id=#{companyId} and IS_DELETE = 'N'
       and (instr(PHONE,#{keyWord})
          or instr(VIP_NAME ,#{keyWord})
          or instr(zjm ,#{keyWord})
@@ -755,6 +758,7 @@
        <include refid="select"></include>
        <include refid="from"></include>
        where 1=1
        and a.IS_DELETE = 'N'
        and
        (a.VIP_NO =#{key} or
        a.VIP_NAME =#{key} or
@@ -770,7 +774,7 @@
    <sql id="whereVo">
       <where>
           and (a.IS_DELETE is null or a.IS_DELETE = '')
           a.IS_DELETE  = 'N'
        <if test="record!=null">
            <if test="record.keyWord != null and record.keyWord !='' ">
                and (a.VIP_NO like CONCAT('%',#{record.keyWord},'%') or
@@ -801,7 +805,7 @@
    </sql>
    <sql id="where">
        where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
        where 1=1 and a.IS_DELETE  = 'N'
        <if test="record!=null">
            <if test="record.id != null and record.id !='' ">
                and a.ID = #{record.id}
@@ -1085,7 +1089,7 @@
        (select a.id from sys_vip_info a
        where 1=1  and (a.IS_DELETE is null or a.IS_DELETE = '')
        where 1=1  and   a.IS_DELETE = 'N'
        <if test="record.parentId != null and record.parentId !='' ">
            and a.parent_id = #{record.parentId}
        </if>
@@ -1098,7 +1102,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  and (d.IS_DELETE is null or d.IS_DELETE = '')
        where 1=1  and d.IS_DELETE = 'N'
        <if test="record.parentId != null and record.parentId !='' ">
            and d.parent_id = #{record.parentId}
        </if>
@@ -1126,7 +1130,7 @@
        (select a.id from sys_vip_info a
        where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
        where 1=1 and a.IS_DELETE  = 'N')
        <if test="record.parentId != null and record.parentId !='' ">
            and a.parent_id = #{record.parentId}
        </if>
@@ -1139,7 +1143,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 and (d.IS_DELETE is null or d.IS_DELETE = '')
        where 1=1 and d.IS_DELETE = 'N'
        <if test="record.parentId != null and record.parentId !='' ">
            and d.parent_id = #{record.parentId}
        </if>)k
@@ -1152,7 +1156,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 and (d.IS_DELETE is null or d.IS_DELETE = '')
        where 1=1 and d.IS_DELETE = 'N'
        <if test="record.parentId != null and record.parentId !='' ">
            and d.parent_id = #{record.parentId}
        </if>
@@ -1174,7 +1178,7 @@
        count(*)
        from sys_vip_info d
        LEFT JOIN sys_vip_info f on d.parent_id = f.id
        where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
        where 1=1 and d.IS_DELETE  = 'N'
        <if test="record.parentId != null and record.parentId !='' ">
            and d.parent_id = #{record.parentId}
        </if>
@@ -1190,7 +1194,7 @@
        (select a.id from sys_vip_info a
        where 1=1  and (a.IS_DELETE is null or a.IS_DELETE = '')
        where 1=1  and a.IS_DELETE  = 'N'
        <if test="record.parentId != null and record.parentId !='' ">
            and a.parent_id = #{record.parentId}
        </if>
@@ -1216,7 +1220,7 @@
        (select a.id from sys_vip_info a
        where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
        where a.IS_DELETE  = 'N')
        <if test="record.parentId != null and record.parentId !='' ">
            and a.parent_id = #{record.parentId}
        </if>
@@ -1226,13 +1230,13 @@
    <select id="selectByPhone" resultMap="SysVipInfoMapSimple">
        select * from sys_vip_info where  PHONE = #{phone} and company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
        select * from sys_vip_info where  PHONE = #{phone} and company_id=#{companyId} and  IS_DELETE = 'N'
    </select>
    <select id="selectVipTelphoneByIds" resultType="java.lang.String">
        select phone from sys_vip_info
        where phone is not null and (IS_DELETE is null or IS_DELETE = '') and id in
        where phone is not null and IS_DELETE = 'N' and id in
        <foreach collection="list" index="index" item="item" open="("
                 separator="," close=")">
            #{item}
@@ -1242,18 +1246,18 @@
    <select id="selectAllVipPhone" resultType="java.lang.String">
        select phone from sys_vip_info
        where
         company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
         company_id=#{companyId} and IS_DELETE = 'N'
         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} and (IS_DELETE is null or IS_DELETE = '')
        where phone is not null and shop_id=#{shopId} and IS_DELETE = 'N'
    </select>
    <select id="selectOldUserByTelphone" resultMap="SysVipInfoMap">
        select * from sys_vip_info where  phone=#{telphone} and is_deal=1 and (IS_DELETE is null or IS_DELETE = '')
        select * from sys_vip_info where  phone=#{telphone} and is_deal=1 and IS_DELETE = 'N'
    </select>
@@ -1372,7 +1376,7 @@
    </insert>
    <select id="selectVipInfoByVipNo" resultMap="SysVipInfoMapSimple">
        select * from sys_vip_info where company_id=#{companyId} and vip_no=#{vipNo} and (IS_DELETE is null or IS_DELETE = '')
        select * from sys_vip_info where company_id=#{companyId} and vip_no=#{vipNo} and IS_DELETE = 'N'
    </select>
    <select id="selectVipAddressBookByList" resultType="com.matrix.system.app.vo.VipInfoListVo">
@@ -1429,7 +1433,7 @@
        </if>
        left join sys_shop_info g on a.shop_id = g.id
        left join sys_vip_level h on a.level_id=h.id
        where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
        where 1=1 and   a.IS_DELETE = 'N'
        <if test="record.queryKey != null and record.queryKey != ''">
            and (instr(PHONE,#{record.queryKey})
                or instr(VIP_NAME ,#{record.queryKey})
@@ -1486,7 +1490,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} and (a.IS_DELETE is null or a.IS_DELETE = '')
        where a.ID=#{id}
    </select>
@@ -1503,7 +1507,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 and (a.IS_DELETE is null or a.IS_DELETE = '')
        where b.STATU='欠款' and b.arrears!=0 and a.IS_DELETE = 'N'
            <if test="record.companyId!=null">
                and a.company_id=#{record.companyId}
            </if>
@@ -1540,7 +1544,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 and (a.IS_DELETE is null or a.IS_DELETE = '')
            where b.STATU='欠款' and b.arrears!=0 and a.IS_DELETE = 'N'
                <if test="record.companyId!=null">
                    and a.company_id=#{record.companyId}
                </if>
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} and (t3.IS_DELETE is null or t3.IS_DELETE = '')
        where t1.act_id  = #{record.actId}
        <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} and (t3.IS_DELETE is null or t3.IS_DELETE = '')
        where t1.id=#{gjId}
    </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} and (t3.IS_DELETE is null or t3.IS_DELETE = '')
        where t1.id=#{gjId}
    </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 and (t3.IS_DELETE is null or t3.IS_DELETE = '')
        where t1.act_id=#{actId} and t1.gj_status=3
    </select>
    <select id="selectGroupAndPriceById" resultMap="ShopActivitiesGroupJoinMap">
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} and (t5.IS_DELETE is null or t5.IS_DELETE = '')
        where t2.act_id=#{record.actId}
        <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} and (t5.IS_DELETE is null or t5.IS_DELETE = '')
        where t2.act_id=#{record.actId}
    </select>
    <!-- 根据id查询-->
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
@@ -380,7 +380,7 @@
            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)  ">
@@ -432,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 (b.IS_DELETE is null or b.IS_DELETE = '')
            AND c.com_audit_status = 1
        </where>
        order by c.create_time desc
        <if test="record.offset >=0  and record.limit >0">