yujian
2020-05-23 28cf328a098334b51a3e9d2d56f983fb8c862211
足迹、收藏订单兼容新需求
31个文件已修改
191 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/RecommendController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/ConsumerController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/OrderController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/CollectionGoodsV2Mapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/ScanHistoryV2Mapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/share/UserShareGoodsGroupMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/goods/CollectionGoodsV2Mapper.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/goods/ScanHistoryV2Mapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/share/UserShareGoodsGroupMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CollectionGoodsV2ServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ScanHistoryV2ServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/CommonShareInfoServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsGroupServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/CollectionGoodsV2Service.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/ScanHistoryV2Service.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserShareGoodsGroupService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/VersionUtil.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java
@@ -59,9 +59,7 @@
     */
    @RequestMapping(value = "getDetail")
    public void getDetail(String callback, Long shareId, String source, String fingerprint, PrintWriter out) {
        try {
            if (shareId == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递参数不正确"));
                return;
@@ -70,7 +68,6 @@
            // 获取商品信息
            JSONObject data = userShareGoodsRecordService.getGoodsGroupDetail(shareId);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("获取失败"));
            e.printStackTrace();
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/RecommendController.java
@@ -30,7 +30,6 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SuperSpecial;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.bus.lable.QualityFactory;
import com.yeshi.fanli.entity.bus.recommend.Honest;
import com.yeshi.fanli.entity.bus.recommend.RecommendBanner;
@@ -1208,10 +1207,10 @@
            List<ScanHistoryV2> list = scanHistoryV2Service.getScanHistoryByDeviceOrUid(
                    StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(), page, 20,
                    Constant.SOURCE_TYPE_TAOBAO);
                    Constant.SOURCE_TYPE_TAOBAO, true);
            long count = scanHistoryV2Service.getCountByDeviceOrUid(
                    StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(),
                    Constant.SOURCE_TYPE_TAOBAO);
                    Constant.SOURCE_TYPE_TAOBAO, true);
            JSONObject data = new JSONObject();
            data.put("count", count);
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -1515,11 +1515,11 @@
    public void collectionGoodsList(AcceptData acceptData, long uid, int page, PrintWriter out) {
        List<CollectionGoodsV2> collectionGoodsList = collectionGoodsV2Service.getCollectionGoodsList(uid, page + 1,
                Constant.PAGE_SIZE, Constant.SOURCE_TYPE_TAOBAO);
                Constant.PAGE_SIZE, Constant.SOURCE_TYPE_TAOBAO, true);
        List<TaoBaoGoodsBriefExtra> list = new ArrayList<TaoBaoGoodsBriefExtra>();
        long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, Constant.SOURCE_TYPE_TAOBAO);
        long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, Constant.SOURCE_TYPE_TAOBAO, true);
        JSONObject data = new JSONObject();
        List<TaoBaoGoodsBrief> listTaoKeGoods = new ArrayList<TaoBaoGoodsBrief>();
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java
@@ -38,6 +38,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
import com.yeshi.fanli.util.cache.TaoBaoGoodsCacheUtil;
@@ -203,10 +204,14 @@
            return;
        }
        boolean notBackSuVip = false;
        if (!VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion()))
            notBackSuVip = true;
        List<CollectionGoodsV2> collectionGoodsList = collectionGoodsV2Service.getCollectionGoodsList(uid, page,
                Constant.PAGE_SIZE, goodsType);
                Constant.PAGE_SIZE, goodsType, notBackSuVip);
        long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, goodsType);
        long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, goodsType, notBackSuVip);
        JSONObject data = new JSONObject();
        List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>();
@@ -329,8 +334,13 @@
            return;
        }
        boolean notBackSuVip = false;
        if (!VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion()))
            notBackSuVip = true;
        List<ScanHistoryV2> list = scanHistoryV2Service.getScanHistoryByDeviceOrUid(uid, acceptData.getDevice(), page,
                20, goodsType);
                20, goodsType, notBackSuVip);
        GsonBuilder gsonBuilder = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder());
        gsonBuilder.excludeFieldsWithoutExposeAnnotation();
@@ -345,7 +355,7 @@
            }
        });
        long count = scanHistoryV2Service.getCountByDeviceOrUid(uid, acceptData.getDevice(), goodsType);
        long count = scanHistoryV2Service.getCountByDeviceOrUid(uid, acceptData.getDevice(), goodsType, notBackSuVip);
        JSONArray array = new JSONArray();
        if (list != null && list.size() > 0) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -1406,8 +1406,12 @@
        JSONArray array = new JSONArray();
        JSONObject data = new JSONObject();
        boolean notBackSuVip = false;
        if (!VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion()))
            notBackSuVip = true;
        List<UserShareGoodsGroup> list = userShareGoodsGroupService.listByRecordId(recordId);
        List<UserShareGoodsGroup> list = userShareGoodsGroupService.listByRecordId(recordId, notBackSuVip);
        if (list == null || list.size() == 0) {
            data.put("title", "分享商品");
            data.put("count", 0);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java
@@ -5,7 +5,6 @@
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
@@ -36,7 +35,6 @@
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord;
import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
import com.yeshi.fanli.entity.dynamic.ImgInfo.ImgEnum;
import com.yeshi.fanli.entity.order.CommonOrder;
import com.yeshi.fanli.entity.order.CommonOrderGoods;
import com.yeshi.fanli.entity.order.ESOrder;
@@ -288,17 +286,22 @@
        }
        try {
            boolean notBackSuVip =  false;
            if (!VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
                notBackSuVip = true;
            }
            // 筛选结果顶部统计
            String validMoney = "0.00";
            String invalidMoney = "0.00";
            if (page == 1) {
                BigDecimal predictMoney = hongBaoV2CountService.getRewardMoneyByToSearch(uid, dateType, orderType, 1,
                        orderNo, state, startTime, endTime, listSource);
                        orderNo, state, startTime, endTime, listSource, notBackSuVip);
                if (predictMoney != null)
                    validMoney = predictMoney.setScale(2, BigDecimal.ROUND_DOWN).toString();
                BigDecimal postSaleMoney = hongBaoV2CountService.getRewardMoneyByToSearch(uid, dateType, orderType, 2,
                        orderNo, state, startTime, endTime, listSource);
                        orderNo, state, startTime, endTime, listSource, notBackSuVip);
                if (postSaleMoney != null)
                    invalidMoney = postSaleMoney.setScale(2, BigDecimal.ROUND_DOWN).toString();
@@ -316,9 +319,10 @@
            List<CommonOrderVO> list = null;
            if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                list = commonOrderService.getOrderList(acceptData, page, uid, state, orderType,
                        orderState, orderNo, startTime, endTime, dateType, listSource);
                        orderState, orderNo, startTime, endTime, dateType, listSource, notBackSuVip);
                count = commonOrderService.countOrderList(uid, state, orderType, orderState, orderNo,
                        startTime, endTime, dateType, listSource);
                        startTime, endTime, dateType, listSource, notBackSuVip);
            } else {
                list = commonOrderService.getOrderByUid(acceptData, page, uid, state, orderType,
                        orderState, orderNo, startTime, endTime, dateType, listSource);
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/ConsumerController.java
@@ -202,9 +202,9 @@
        }
        List<CollectionGoodsV2> collectionGoodsList = collectionGoodsV2Service.getCollectionGoodsList(uid, page,
                Constant.PAGE_SIZE, goodsType);
                Constant.PAGE_SIZE, goodsType, false);
        long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, goodsType);
        long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, goodsType, false);
        JSONObject data = new JSONObject();
        List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>();
@@ -329,7 +329,7 @@
        }
        List<ScanHistoryV2> list = scanHistoryV2Service.getScanHistoryByDeviceOrUid(uid, acceptData.getDevice(), page,
                20, goodsType);
                20, goodsType, false);
        GsonBuilder gsonBuilder = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder());
        gsonBuilder.excludeFieldsWithoutExposeAnnotation();
@@ -344,7 +344,7 @@
            }
        });
        long count = scanHistoryV2Service.getCountByDeviceOrUid(uid, acceptData.getDevice(), goodsType);
        long count = scanHistoryV2Service.getCountByDeviceOrUid(uid, acceptData.getDevice(), goodsType, false);
        JSONArray array = new JSONArray();
        if (list != null && list.size() > 0) {
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/OrderController.java
@@ -245,12 +245,12 @@
            String invalidMoney = "0.00";
            if (page == 1) {
                BigDecimal predictMoney = hongBaoV2CountService.getRewardMoneyByToSearch(uid, dateType, orderType, 1,
                        orderNo, state, startTime, endTime, listSource);
                        orderNo, state, startTime, endTime, listSource,false);
                if (predictMoney != null)
                    validMoney = predictMoney.setScale(2, BigDecimal.ROUND_DOWN).toString();
                BigDecimal postSaleMoney = hongBaoV2CountService.getRewardMoneyByToSearch(uid, dateType, orderType, 2,
                        orderNo, state, startTime, endTime, listSource);
                        orderNo, state, startTime, endTime, listSource,false);
                if (postSaleMoney != null)
                    invalidMoney = postSaleMoney.setScale(2, BigDecimal.ROUND_DOWN).toString();
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java
@@ -163,7 +163,8 @@
    BigDecimal getRewardMoneyByDate(@Param("uid") Long uid, @Param("day")Integer dateType, 
            @Param("type") Integer hbType, @Param("orderState") Integer orderState,
            @Param("orderNo") String orderNo, @Param("moneyState") Integer moneyState,  
            @Param("startTime") String startTime, @Param("endTime") String endTime,@Param("listSource") List<Integer> listSource);
            @Param("startTime") String startTime, @Param("endTime") String endTime,
            @Param("listSource") List<Integer> listSource, @Param("notBackSuVip") boolean notBackSuVip);
    /**
     * 统计各个订单类型 有效个数
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/CollectionGoodsV2Mapper.java
@@ -38,7 +38,7 @@
     * @return
     */
    List<CollectionGoodsV2> selectByUidOrderByCreateTimeDesc(@Param("uid") Long uid, @Param("start") long start,
            @Param("count") int count, @Param("source")Integer source);
            @Param("count") int count, @Param("source")Integer source, @Param("notBackSuVip") boolean notBackSuVip);
    /**
     * 获取收藏的数量
@@ -46,7 +46,7 @@
     * @param uid
     * @return
     */
    long selectCountByUid(@Param("uid") Long uid, @Param("source")Integer source);
    long selectCountByUid(@Param("uid") Long uid, @Param("source")Integer source, @Param("notBackSuVip") boolean notBackSuVip);
    
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/ScanHistoryV2Mapper.java
@@ -19,7 +19,8 @@
     * @return
     */
    List<ScanHistoryV2> selectByDeviceOrUid(@Param("uid") Long uid, @Param("device") String device,
            @Param("start") long start, @Param("count") int count, @Param("source")Integer source);
            @Param("start") long start, @Param("count") int count, @Param("source")Integer source,
            @Param("notBackSuVip")boolean notBackSuVip);
    /**
     * 根据UID或者设备号获取浏览记录条数
@@ -28,7 +29,8 @@
     * @param device
     * @return
     */
    Long selectCountByDeviceOrUid(@Param("uid") Long uid, @Param("device") String device, @Param("source")Integer source);
    Long selectCountByDeviceOrUid(@Param("uid") Long uid, @Param("device") String device,
            @Param("source")Integer source, @Param("notBackSuVip")boolean notBackSuVip);
    /**
     * 根据设备或用户ID删除
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java
@@ -393,7 +393,7 @@
    List<CommonOrderVO> getOrderList(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
            @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
            @Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime,
            @Param("day") Integer day, @Param("listSource") List<Integer> listSource);
            @Param("day") Integer day, @Param("listSource") List<Integer> listSource, @Param("notBackSuVip") boolean notBackSuVip);
    /**
     * 统计用户订单 并订单号分组
@@ -406,7 +406,7 @@
    long countOrderList(@Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type,
            @Param("orderState") Integer orderState, @Param("orderNo") String orderNo,
            @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day,
            @Param("listSource") List<Integer> listSource);
            @Param("listSource") List<Integer> listSource, @Param("notBackSuVip") boolean notBackSuVip);
    
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/share/UserShareGoodsGroupMapper.java
@@ -41,7 +41,7 @@
     * @param recordId
     * @return
     */
    List<UserShareGoodsGroup> listByRecordId(@Param("recordId") Long recordId);
    List<UserShareGoodsGroup> listByRecordId(@Param("recordId") Long recordId,@Param("notBackSuVip") boolean notBackSuVip);
    
    /**
     * 查询单个商品 判断是否单个商品分享
fanli/src/main/java/com/yeshi/fanli/mapping/goods/CollectionGoodsV2Mapper.xml
@@ -39,10 +39,10 @@
    <!-- 根据用户ID获取收藏记录,按照收藏时间倒叙 -->
    <select id="selectByUidOrderByCreateTimeDesc" resultMap="BaseResultMap">
        select t.* from yeshi_ec_collection_goods_v2 t
        <if test="source != null">
            LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
        </if>
        where t.cg_uid = #{uid} <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
        LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
        where t.cg_uid = #{uid}
        <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
        <if test="notBackSuVip == true"><![CDATA[AND  g.`cg_goods_type` <> 4 AND  g.`cg_goods_type` <> 5]]></if>
        order by t.cg_createtime desc
        limit #{start},#{count}
    </select>
@@ -51,10 +51,9 @@
    <!-- 获取收藏的数量 -->
    <select id="selectCountByUid" resultType="java.lang.Long"     parameterType="java.lang.Long">
        select     count(t.cg_id) from yeshi_ec_collection_goods_v2 t
        <if test="source != null">
                LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
        </if>
        LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
        where t.cg_uid = #{uid} <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
        <if test="notBackSuVip == true"><![CDATA[AND  g.`cg_goods_type` <> 4 AND  g.`cg_goods_type` <> 5]]></if>
    </select>
fanli/src/main/java/com/yeshi/fanli/mapping/goods/ScanHistoryV2Mapper.xml
@@ -32,15 +32,14 @@
        SELECT * FROM (
                SELECT SUBSTRING_INDEX(GROUP_CONCAT(s.s_id ORDER BY s.s_createtime DESC), ',', 1)AS hid 
                FROM yeshi_ec_scanhistory_v2 s
            <if test="source != null">
                LEFT JOIN `yeshi_ec_common_goods` g ON s.`s_common_goods_id` = g.`cg_id`
            </if>
                WHERE
                    <trim prefix="(" suffix=")" suffixOverrides="or">
                        <if test="uid != null"> s.`s_uid`=#{uid,jdbcType=BIGINT} or</if>
                        <if test="device != null">s.`s_device`=#{device,jdbcType=VARCHAR} or</if>
                    </trim>
                    <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
                    <if test="notBackSuVip == true"><![CDATA[AND g.`cg_goods_type` <> 4 AND g.`cg_goods_type` <> 5]]></if>
                 GROUP BY s.s_common_goods_id
                )A
        LEFT JOIN yeshi_ec_scanhistory_v2 B ON B.s_id = A.hid
@@ -51,15 +50,14 @@
    <!-- 根据UID或者设备号获取浏览记录条数 -->
    <select id="selectCountByDeviceOrUid" resultType="java.lang.Long">
        SELECT IFNULL(COUNT(DISTINCT s.`s_common_goods_id`),0) FROM yeshi_ec_scanhistory_v2 s
        <if test="source != null">
        LEFT JOIN `yeshi_ec_common_goods` g ON s.`s_common_goods_id` = g.`cg_id`
        </if>
        WHERE
        <trim prefix="(" suffix=")" suffixOverrides="or">
            <if test="uid != null"> s.`s_uid`=#{uid,jdbcType=BIGINT} or</if>
            <if test="device != null">s.`s_device`=#{device,jdbcType=VARCHAR} or</if>
        </trim>
        <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
        <if test="notBackSuVip == true"><![CDATA[AND g.`cg_goods_type` <> 4 AND g.`cg_goods_type` <> 5]]></if>
    </select>
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml
@@ -404,6 +404,9 @@
                co.co_source_type = #{item}
            </foreach>
        </if>
        <if test="notBackSuVip == true">
            <![CDATA[AND co.co_source_type <> 4 AND co.co_source_type <> 5]]>
        </if>
    </select>
    
    
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
@@ -464,6 +464,7 @@
            <foreach collection="listSource" item="item" open="AND ("
                close=")" separator="or">co.co_source_type = #{item}</foreach>
        </if>
        <![CDATA[AND co.co_source_type <> 4 AND co.co_source_type <> 5]]>
        GROUP BY co.`co_order_no`, co.`co_source_type` ORDER BY
        co.co_third_create_time DESC LIMIT ${start},${count}
    </select>
@@ -500,6 +501,7 @@
            <foreach collection="listSource" item="item" open="AND ("
                close=")" separator="or">co.co_source_type = #{item}</foreach>
        </if>
        <![CDATA[AND co.co_source_type <> 4 AND co.co_source_type <> 5]]>
        GROUP BY co.`co_order_no`, co.`co_source_type` )A
    </select>
    <select id="listOrderGoodsInfo" resultMap="ResultMap"
@@ -1163,6 +1165,9 @@
            <foreach collection="listSource" item="item" open="AND ("
                close=")" separator="or">co.co_source_type = #{item}</foreach>
        </if>
        <if test="notBackSuVip == true">
            <![CDATA[AND co.co_source_type <> 4 AND co.co_source_type <> 5]]>
        </if>
        GROUP BY co.`co_order_no`, co.`co_source_type` ORDER BY
        co.co_third_create_time DESC LIMIT ${start},${count}
    </select>
@@ -1198,6 +1203,9 @@
            <foreach collection="listSource" item="item" open="AND ("
                close=")" separator="or">co.co_source_type = #{item}</foreach>
        </if>
        <if test="notBackSuVip == true">
            <![CDATA[AND co.co_source_type <> 4 AND co.co_source_type <> 5]]>
        </if>
        GROUP BY co.`co_order_no`, co.`co_source_type` )A
    </select>
    <select id="countOrderByUidAndSettled" resultType="Long">SELECT
fanli/src/main/java/com/yeshi/fanli/mapping/share/UserShareGoodsGroupMapper.xml
@@ -138,7 +138,8 @@
   <select id="listByRecordId" resultMap="BaseResultMap">
     SELECT * FROM yeshi_ec_share_goods_group  tg
     LEFT JOIN  `yeshi_ec_common_goods` cg ON tg.`gu_common_goods_id` = cg.`cg_id`
     WHERE tg.`gu_record_id` = #{recordId}
     WHERE tg.`gu_record_id` = #{recordId}
     <if test="notBackSuVip == true"><![CDATA[AND cg.`cg_goods_type` <> 4 AND cg.`cg_goods_type` <> 5]]></if>
     ORDER BY tg.`gu_createtime`
   </select>
    
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java
@@ -168,7 +168,7 @@
    
    @Override
    public BigDecimal getRewardMoneyToCount(Long uid, Integer dateType, Integer hbType, List<Integer> listSource) {
        BigDecimal money = hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, null, null, null, listSource);
        BigDecimal money = hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, null, null, null, listSource,false);
        if (money == null)
            money = BigDecimal.ZERO;
         return money;
@@ -176,7 +176,7 @@
    
    @Override
    public BigDecimal geBonusByuid(Long uid, Integer dateType, Integer hbType, Integer moneyState) {
         BigDecimal money = hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, moneyState, null, null, null);
         BigDecimal money = hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, moneyState, null, null, null,false);
         if (money == null) {
             money = new BigDecimal(0);
         }
@@ -185,9 +185,9 @@
    
    @Override
    public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer orderType, Integer orderState,
            String orderNo,  Integer moneyState, String startTime,  String endTime, List<Integer> listSource) {
            String orderNo,  Integer moneyState, String startTime,  String endTime, List<Integer> listSource, boolean notBackSuVip) {
        return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, orderType, orderState, orderNo, moneyState, 
                startTime, endTime, listSource);
                startTime, endTime, listSource, notBackSuVip);
    }
    
    
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CollectionGoodsV2ServiceImpl.java
@@ -5,7 +5,6 @@
import javax.annotation.Resource;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -167,13 +166,13 @@
    }
    @Override
    public List<CollectionGoodsV2> getCollectionGoodsList(Long uid, int page, int pageSize, Integer source) {
        return collectionGoodsV2Mapper.selectByUidOrderByCreateTimeDesc(uid, (page - 1) * pageSize, pageSize, source);
    public List<CollectionGoodsV2> getCollectionGoodsList(Long uid, int page, int pageSize, Integer source, boolean notBackSuVip) {
        return collectionGoodsV2Mapper.selectByUidOrderByCreateTimeDesc(uid, (page - 1) * pageSize, pageSize, source, notBackSuVip);
    }
    @Override
    public long getCollectionGoodsCount(Long uid, Integer source) {
        return collectionGoodsV2Mapper.selectCountByUid(uid, source);
    public long getCollectionGoodsCount(Long uid, Integer source, boolean notBackSuVip) {
        return collectionGoodsV2Mapper.selectCountByUid(uid, source, notBackSuVip);
    }
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ScanHistoryV2ServiceImpl.java
@@ -117,17 +117,18 @@
    }
    @Override
    public List<ScanHistoryV2> getScanHistoryByDeviceOrUid(Long uid, String device, int page, int pageSize, Integer source) {
    public List<ScanHistoryV2> getScanHistoryByDeviceOrUid(Long uid, String device, int page, int pageSize,
            Integer source, boolean notBackSuVip) {
        if (uid == null && StringUtil.isNullOrEmpty(device))
            return null;
        return scanHistoryV2Mapper.selectByDeviceOrUid(uid, device, (page - 1) * pageSize, pageSize, source);
        return scanHistoryV2Mapper.selectByDeviceOrUid(uid, device, (page - 1) * pageSize, pageSize, source, notBackSuVip);
    }
    @Override
    public long getCountByDeviceOrUid(Long uid, String device, Integer source) {
    public long getCountByDeviceOrUid(Long uid, String device, Integer source, boolean notBackSuVip) {
        if (uid == null && StringUtil.isNullOrEmpty(device))
            return 0;
        Long count = scanHistoryV2Mapper.selectCountByDeviceOrUid(uid, device, source);
        Long count = scanHistoryV2Mapper.selectCountByDeviceOrUid(uid, device, source, notBackSuVip);
        return count == null ? 0 : count;
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/CommonShareInfoServiceImpl.java
@@ -6,7 +6,6 @@
import com.yeshi.fanli.dao.mybatis.homemodule.CommonShareInfoMapper;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo.CommonShareInfoEnum;
import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException;
import com.yeshi.fanli.exception.homemodule.SpecialException;
import com.yeshi.fanli.service.inter.homemodule.CommonShareInfoService;
@@ -45,6 +44,9 @@
            }
        }
        
        // 重置id
        record.setId(null);
        CommonShareInfo info = commonShareInfoMapper.getByPidAndType(record.getPid(), record.getType().name());
        if (info == null) {
            commonShareInfoMapper.insertSelective(record);
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -218,6 +218,7 @@
            List<Integer> listSource) throws CommonOrderException, Exception {
        int pageSize = Constant.PAGE_SIZE;
        List<CommonOrderVO> listOrder = commonOrderMapper.listUserOrder((page - 1) * pageSize, pageSize, uid, state,
                type, orderState, orderNo, startTime, endTime, dateType, listSource);
@@ -1816,11 +1817,12 @@
    @Override
    public List<CommonOrderVO> getOrderList(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type,
            Integer orderState, String orderNo, String startTime, String endTime, Integer dateType,
            List<Integer> listSource) throws CommonOrderException, Exception {
            List<Integer> listSource, boolean notBackSuVip) throws CommonOrderException, Exception {
        int pageSize = Constant.PAGE_SIZE;
        List<CommonOrderVO> listOrder = commonOrderMapper.getOrderList((page - 1) * pageSize, pageSize, uid, state,
                type, orderState, orderNo, startTime, endTime, dateType, listSource);
                type, orderState, orderNo, startTime, endTime, dateType, listSource,notBackSuVip);
        // 订单信息为空
        if (listOrder == null || listOrder.size() == 0) {
@@ -1842,9 +1844,9 @@
    @Override
    public long countOrderList(Long uid, Integer state, Integer type, Integer orderState, String orderNo,
            String startTime, String endTime, Integer dateType, List<Integer> listSource) throws CommonOrderException {
            String startTime, String endTime, Integer dateType, List<Integer> listSource, boolean notBackSuVip) throws CommonOrderException {
        return commonOrderMapper.countOrderList(uid, state, type, orderState, orderNo, startTime, endTime, dateType,
                listSource);
                listSource, notBackSuVip);
    }
    /**
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsGroupServiceImpl.java
@@ -58,8 +58,8 @@
    }
    @Override
    public List<UserShareGoodsGroup> listByRecordId(Long recordId) {
        return userShareGoodsGroupMapper.listByRecordId(recordId);
    public List<UserShareGoodsGroup> listByRecordId(Long recordId, boolean notBackSuVip) {
        return userShareGoodsGroupMapper.listByRecordId(recordId, notBackSuVip);
    }
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java
@@ -131,7 +131,7 @@
    @Override
    public List<UserShareGoodsGroup> listByRecordId(Long shareId) {
        return userShareGoodsGroupService.listByRecordId(shareId);
        return userShareGoodsGroupService.listByRecordId(shareId, true);
    }
    @Override
@@ -500,7 +500,7 @@
        JSONArray array = new JSONArray();
        List<UserShareGoodsGroup> list = userShareGoodsGroupService.listByRecordId(recordId);
        List<UserShareGoodsGroup> list = userShareGoodsGroupService.listByRecordId(recordId, true);
        List<Long> listGid = new ArrayList<Long>();
        for (UserShareGoodsGroup goodsGroup : list) {
@@ -584,7 +584,7 @@
        JSONArray array = new JSONArray();
        List<UserShareGoodsGroup> list = userShareGoodsGroupService.listByRecordId(recordId);
        List<UserShareGoodsGroup> list = userShareGoodsGroupService.listByRecordId(recordId, true);
        if (list != null && list.size() > 0) {
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java
@@ -183,7 +183,7 @@
     * @return
     */
    public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer hbType, Integer orderState, String orderNo,
             Integer moneyState, String startTime, String endTime, List<Integer> listSource);
             Integer moneyState, String startTime, String endTime, List<Integer> listSource, boolean notBackSuVip);
    
    public Long countOrderByTypeAndDate(Integer orderType, String preDay);
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/CollectionGoodsV2Service.java
@@ -67,7 +67,7 @@
     * @param pageSize
     * @return
     */
    public List<CollectionGoodsV2> getCollectionGoodsList(Long uid, int page, int pageSize, Integer source);
    public List<CollectionGoodsV2> getCollectionGoodsList(Long uid, int page, int pageSize, Integer source, boolean notBackSuVip);
    /**
     * 获取收藏数量
@@ -75,7 +75,7 @@
     * @param uid
     * @return
     */
    public long getCollectionGoodsCount(Long uid, Integer source);
    public long getCollectionGoodsCount(Long uid, Integer source, boolean notBackSuVip);
    /**
     * 根据用户ID和淘宝商品ID查询是否收藏
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/ScanHistoryV2Service.java
@@ -38,7 +38,8 @@
     * @param pageSize
     * @return
     */
    public List<ScanHistoryV2> getScanHistoryByDeviceOrUid(Long uid, String device, int page, int pageSize, Integer source);
    public List<ScanHistoryV2> getScanHistoryByDeviceOrUid(Long uid, String device, int page, int pageSize,
            Integer source, boolean notBackSuVip);
    /**
     * 根据设备或者用户ID获取浏览记录数量
@@ -47,7 +48,7 @@
     * @param device
     * @return
     */
    public long getCountByDeviceOrUid(Long uid, String device, Integer source);
    public long getCountByDeviceOrUid(Long uid, String device, Integer source, boolean notBackSuVip);
    /**
     * 根据用户或者设备删除浏览记录
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java
@@ -411,10 +411,10 @@
     */
    public List<CommonOrderVO> getOrderList(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type,
            Integer orderState, String orderNo, String startTime, String endTime, Integer dateType,
            List<Integer> listSource) throws CommonOrderException, Exception;
            List<Integer> listSource, boolean notBackSuVip) throws CommonOrderException, Exception;
    long countOrderList(Long uid, Integer state, Integer type, Integer orderState, String orderNo, String startTime,
            String endTime, Integer dateType, List<Integer> listSource) throws CommonOrderException;
            String endTime, Integer dateType, List<Integer> listSource, boolean notBackSuVip) throws CommonOrderException;
    /**
     * 维权金额计算
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserShareGoodsGroupService.java
@@ -23,7 +23,7 @@
     * @param recordId 分享记录id
     * @return
     */
    public List<UserShareGoodsGroup> listByRecordId(Long recordId);
    public List<UserShareGoodsGroup> listByRecordId(Long recordId, boolean notBackSuVip);
    
    /**
     * 查询单个商品 判断是否单个商品分享  goodsDetail
fanli/src/main/java/com/yeshi/fanli/util/VersionUtil.java
@@ -114,6 +114,14 @@
            return false;
    }
    
    public static boolean greaterThan_2_1_2(String platform, String versionCode) {
        if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 58))
                || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 82)))
            return true;
        else
            return false;
    }
    public static boolean smallerThan_1_5_1(String platform, String versionCode) {
        if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) < 36))
                || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) < 44)))