yujian
2019-11-04 b800d0831438a2d354910a16325c1db6f2fb1231
高危标识
15个文件已修改
273 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/brand/BrandInfoMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderCountService.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -3,6 +3,7 @@
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -19,6 +20,7 @@
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.controller.admin.utils.AdminUtils;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
import com.yeshi.fanli.entity.money.UserMoneyDebt;
import com.yeshi.fanli.entity.money.UserMoneyDebt.UserMoneyDebtTypeEnum;
import com.yeshi.fanli.entity.money.UserMoneyDetail;
@@ -28,6 +30,7 @@
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanDrawBack;
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
import com.yeshi.fanli.exception.order.CommonOrderException;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.count.TaoBaoOrderCountService;
import com.yeshi.fanli.service.inter.money.UserMoneyDebtService;
@@ -92,6 +95,10 @@
    @Resource
    private UserSystemCouponRecordService userSystemCouponRecordService;
    @Resource
    private ConfigService configService;
    /**
     * 统计历史订单-淘宝订单
@@ -146,7 +153,7 @@
    @RequestMapping(value = "getUserOrderList")
    public void getUserOrderList(String callback, Integer pageIndex, Integer pageSize, Integer keyType, String key,
            Integer state, Integer type, Integer orderState, String startTime, String endTime, Integer sourceType,
            PrintWriter out) {
            Integer riskType, PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
@@ -168,13 +175,44 @@
        }
        try {
            Date minTime = null;
            BigDecimal money = null;
            List<Long> listShopId = null;
            List<Long> listGoodsId = null;
            // 风险
            if (riskType != null && !StringUtil.isNullOrEmpty(key) && keyType!= null && keyType == 2) {
                long uid = Long.parseLong(key);
                // 查询同店铺商品,同商品订单超过一定数量的
                List<Integer> typeList = new ArrayList<>();
                typeList.add(HongBaoV2.TYPE_ZIGOU);
                if (riskType == 1) {
                    listGoodsId = commonOrderCountService.getSameGoodsOrderByUidAndHongBaoType(typeList, uid,
                            Integer.parseInt(configService.get("admin_min_same_goods_order_count")));
                    if (listGoodsId == null || listGoodsId.isEmpty()) {
                        JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无同商品订单"));
                        return;
                    }
                } else if (riskType == 2) {
                    listShopId  = commonOrderCountService.getSameShopOrderByUidAndHongBaoType(typeList, uid,
                            Integer.parseInt(configService.get("admin_min_same_shop_order_count")));
                    if (listShopId == null || listShopId.isEmpty()) {
                        JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无同店铺订单"));
                        return;
                    }
                } else if (riskType == 3) {
                    money = new BigDecimal(100);
                    minTime = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 180L);
                }
            }
            // 查询列表
            List<CommonOrderVO> list = commonOrderService.listQuery((pageIndex - 1) * pageSize, pageSize, keyType, key,
                    state, type, orderState, startTime, endTime, sourceType);
                    state, type, orderState, startTime, endTime, sourceType, listShopId, listGoodsId, minTime, money);
            // 统计总数
            long count = commonOrderService.countQuery(keyType, key, state, type, orderState, startTime, endTime,
                    sourceType);
                    sourceType, listShopId, listGoodsId, minTime, money);
            // 查询是否维权
            for (CommonOrderVO order : list) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
@@ -254,7 +254,7 @@
            
            if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
                // 我的界面banner
                List<SwiperPicture> banner = swiperPictureService.getByBannerCard("index_top");
                List<SwiperPicture> banner = swiperPictureService.getByBannerCard("my_interface_banner");
                if (banner == null)
                    banner = new ArrayList<SwiperPicture>();
                data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
@@ -228,7 +228,7 @@
        long nextTime = nowTime + 1000 * 60 * 60L;// 默认为1小时
        if (nextPos < dtoList.size()) {
            nextTime = TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(nowTime, "yyyyMM") + dtoList.get(nextPos),
            nextTime = TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(nowTime, "yyyyMM") + dtoList.get(nextPos).getTime(),
                    "yyyyMMddHH");
        }
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java
@@ -86,4 +86,29 @@
     */
    long countSameGoodsOrderByUidAndHongBaoType(@Param("typeList") List<Integer> typeList, @Param("uid") Long uid,
            @Param("minSameGoodsOrderCount") int minSameGoodsOrderCount);
    /**
     * 查询用户在同一店铺购买超过一定数量商品的店铺id
     *
     * @param typeList
     *            -红包类型
     * @param uid
     *            -用户ID
     * @param minSameShopGoodsCount
     *            -同一店铺买的最小订单数
     * @return
     */
    List<Long> getSameShopOrderByUidAndHongBaoType(@Param("typeList") List<Integer> typeList, @Param("uid") Long uid,
            @Param("minSameShopGoodsCount") int minSameShopGoodsCount);
    /**
     * 查询用户购买相同商品超过一定的订单数量的商品id
     * @param typeList
     * @param uid
     * @param minSameGoodsOrderCount
     * @return
     */
    List<Long> getSameGoodsOrderByUidAndHongBaoType(@Param("typeList") List<Integer> typeList, @Param("uid") Long uid,
            @Param("minSameGoodsOrderCount") int minSameGoodsOrderCount);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java
@@ -174,7 +174,9 @@
    List<CommonOrderVO> listQuery(@Param("start") long start, @Param("count") int count,
            @Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
            @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
            @Param("endTime") String endTime, @Param("source") Integer source);
            @Param("endTime") String endTime, @Param("source") Integer source,
            @Param("listShopId")List<Long> listShopId, @Param("listGoodsId")List<Long> listGoodsId,
            @Param("minTime")Date minTime, @Param("money")BigDecimal money);
    /**
     * 订单列表查询(不包含子订单)
@@ -201,7 +203,9 @@
     */
    long countQuery(@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
            @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
            @Param("endTime") String endTime, @Param("source") Integer source);
            @Param("endTime") String endTime, @Param("source") Integer source,
            @Param("listShopId")List<Long> listShopId, @Param("listGoodsId")List<Long> listGoodsId,
            @Param("minTime")Date minTime, @Param("money")BigDecimal money);
    long countQueryWithNoChild(@Param("keyType") Integer keyType, @Param("key") String key,
            @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java
@@ -35,24 +35,9 @@
        if (count == 0)
            return;
        for (int page = 1; page < (count / 100) + 1; page++) {
            brandInfoService.addShopAndGoods((page - 1) * 100, 100);
        for (int page = 0; page < (count / 80) + 1; page++) {
            brandInfoService.addShopAndGoods(page * 80, 80);
        }
    }
    
    /**
     * 清理前一天的
     */
//    @Scheduled(cron = "0 30 0 * * ? ")
    public void removeAgoByDate() {
        if (!Constant.IS_TASK)
            return;
        try {
            brandInfoService.removeAgoByDate(DateUtil.reduceDay(1, new Date()));
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/mapping/brand/BrandInfoMapper.xml
@@ -114,7 +114,7 @@
          AND d.bf_goods_total <![CDATA[>=]]> 3
  </select>
  
   <select id="listValidAll" resultMap="BaseResultMap">
  <select id="listValidAll" resultMap="BaseResultMap">
      SELECT * FROM yeshi_ec_brand_info d
    WHERE d.`bf_state` = 1
    LIMIT ${start},${count}
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml
@@ -188,7 +188,11 @@
        (
            SELECT a.*,COUNT(*) AS num FROM 
            (
                SELECT co.*,COUNT(*) AS c,g.`cog_shop_id` AS shopId FROM yeshi_ec_common_order co LEFT JOIN yeshi_ec_hongbao_order ho ON co.`co_id`=ho.`ho_order_id` LEFT JOIN yeshi_ec_hongbao_v2 v ON v.`hb_id`=ho.`ho_hongbao_id` LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`  WHERE  co.`co_uid`=#{uid}
                SELECT co.*,COUNT(*) AS c,g.`cog_shop_id` AS shopId FROM yeshi_ec_common_order co
                LEFT JOIN yeshi_ec_hongbao_order ho ON co.`co_id`=ho.`ho_order_id`
                LEFT JOIN yeshi_ec_hongbao_v2 v ON v.`hb_id`=ho.`ho_hongbao_id`
                LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`
                WHERE  co.`co_uid`=#{uid}  AND g.`cog_shop_id` <![CDATA[<>]]> 725677994  <!-- 天猫超市 -->
                <if test="typeList!=null">
                    <foreach collection="typeList" item="type" open=" and (" separator=" or " close=")">
                        v.`hb_type`=#{type}
@@ -207,7 +211,58 @@
        (
            SELECT a.goodsId,COUNT(*) AS c FROM
            (
                SELECT co.`co_order_goods_id` AS goodsId,co.`co_order_no` FROM yeshi_ec_common_order co LEFT JOIN yeshi_ec_hongbao_order ho ON co.`co_id`=ho.`ho_order_id` LEFT JOIN yeshi_ec_hongbao_v2 v ON v.`hb_id`=ho.`ho_hongbao_id` LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`  WHERE co.`co_uid`=#{uid}
                SELECT co.`co_order_goods_id` AS goodsId,co.`co_order_no` FROM yeshi_ec_common_order co
                LEFT JOIN yeshi_ec_hongbao_order ho ON co.`co_id`=ho.`ho_order_id`
                LEFT JOIN yeshi_ec_hongbao_v2 v ON v.`hb_id`=ho.`ho_hongbao_id`
                LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`
                WHERE co.`co_uid`=#{uid} AND g.`cog_shop_id` <![CDATA[<>]]> 725677994  <!-- 天猫超市 -->
                <if test="typeList!=null">
                    <foreach collection="typeList" item="type" open=" and (" separator=" or " close=")">
                        v.`hb_type`=#{type}
                    </foreach>
                </if>
                AND v.`hb_id` IS NOT NULL
                AND (co.`co_state`=1 OR  co.`co_state`=2 OR co.`co_state`=3)
                GROUP BY co.`co_order_no`,co.`co_order_goods_id`
            ) a GROUP BY goodsId
        ) b WHERE b.c>=#{minSameGoodsOrderCount}
    </select>
    <select id="getSameShopOrderByUidAndHongBaoType" resultType="Long">
        SELECT b.shopId FROM
        (
            SELECT a.*,COUNT(*) AS num FROM
            (
                SELECT co.*,COUNT(*) AS c,g.`cog_shop_id` AS shopId FROM yeshi_ec_common_order co
                LEFT JOIN yeshi_ec_hongbao_order ho ON co.`co_id`=ho.`ho_order_id`
                LEFT JOIN yeshi_ec_hongbao_v2 v ON v.`hb_id`=ho.`ho_hongbao_id`
                LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`
                WHERE  co.`co_uid`=#{uid} AND g.`cog_shop_id` <![CDATA[<>]]> 725677994  <!-- 天猫超市 -->
                <if test="typeList!=null">
                    <foreach collection="typeList" item="type" open=" and (" separator=" or " close=")">
                        v.`hb_type`=#{type}
                    </foreach>
                </if>
                AND v.`hb_id` IS NOT NULL
                AND (co.`co_state`=1 OR  co.`co_state`=2 OR co.`co_state`=3)
                AND g.`cog_shop_id`>0 GROUP BY co.`co_order_no`,co.`co_source_type`
            ) a GROUP BY a.shopId
        ) b WHERE b.num>=#{minSameShopGoodsCount};
    </select>
    <select id="getSameGoodsOrderByUidAndHongBaoType" resultType="Long">
        SELECT b.goodsId FROM
        (
            SELECT a.goodsId,COUNT(*) AS c FROM
            (
                SELECT co.`co_order_goods_id` AS goodsId,co.`co_order_no` FROM yeshi_ec_common_order co
                LEFT JOIN yeshi_ec_hongbao_order ho ON co.`co_id`=ho.`ho_order_id`
                LEFT JOIN yeshi_ec_hongbao_v2 v ON v.`hb_id`=ho.`ho_hongbao_id`
                LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`
                WHERE co.`co_uid`=#{uid} AND g.`cog_shop_id` <![CDATA[<>]]> 725677994  <!-- 天猫超市 -->
                <if test="typeList!=null">
                    <foreach collection="typeList" item="type" open=" and (" separator=" or " close=")">
                        v.`hb_type`=#{type}
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
@@ -815,6 +815,11 @@
        <!-- 红包状态 -->
        )hb ON IF(hb.hb_pid IS NULL,hb.hb_id,hb.hb_pid)=ho.`ho_hongbao_id`
        LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id`
        <if test="listShopId != null">
            LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`
        </if>
        WHERE hb.hb_id IS NOT NULL
        <include refid="SELECT_PARAM_ORDER_STATE" />
        <!-- 订单状态 -->
@@ -828,6 +833,20 @@
        </if>
        <!-- 订单来源 -->
        <if test="source != null">AND co.co_source_type = #{source}</if>
        <if test="listGoodsId != null">
            <foreach collection="listGoodsId" item="goodsId" open=" and (" separator=" or " close=")">
                co.`co_order_goods_id` =#{goodsId}
            </foreach>
        </if>
        <if test="listShopId != null">
            <foreach collection="listShopId" item="shopId" open=" and (" separator=" or " close=")">
                g.`cog_shop_id` =#{shopId}
            </foreach>
        </if>
        <if test="minTime != null"> <!-- 高风险订单 -->
            AND co.`co_third_create_time`>#{minTime} AND <![CDATA[ (co.`co_estimate`>=  ${money} OR co.`co_eIncome`> ${money})]]>
        </if>
        ORDER BY co.co_third_create_time DESC LIMIT ${start},${count} ) A LEFT
        JOIN yeshi_ec_user u ON u.id = A.hb_uid
    </select>
@@ -846,8 +865,7 @@
        <include refid="SELECT_HONGBAO_STATE" />
        <!-- 红包状态 -->
        )hb ON hb.hb_id=ho.`ho_hongbao_id`
        LEFT JOIN yeshi_ec_common_order co
        ON co.`co_id`=ho.`ho_order_id`
        LEFT JOIN yeshi_ec_common_order co    ON co.`co_id`=ho.`ho_order_id`
        WHERE hb.hb_id IS NOT NULL
        <include refid="SELECT_PARAM_ORDER_STATE" />
        <!-- 订单状态 -->
@@ -875,6 +893,9 @@
        <!-- 红包状态 -->
        )hb ON IF(hb.hb_pid IS NULL,hb.hb_id,hb.hb_pid)=ho.`ho_hongbao_id`
        LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id`
        <if test="listShopId != null">
            LEFT JOIN yeshi_ec_common_order_goods g  ON co.`co_order_goods_id`=g.`cog_id`
        </if>
        WHERE hb.hb_id IS NOT NULL
        <include refid="SELECT_PARAM_ORDER_STATE" />
        <!-- 订单状态 -->
@@ -888,6 +909,20 @@
        </if>
        <!-- 订单来源 -->
        <if test="source != null">AND co.co_source_type = #{source}</if>
        <if test="listGoodsId != null">
            <foreach collection="listGoodsId" item="goodsId" open=" and (" separator=" or " close=")">
                co.`co_order_goods_id` =#{goodsId}
            </foreach>
        </if>
        <if test="listShopId != null">
            <foreach collection="listShopId" item="shopId" open=" and (" separator=" or " close=")">
                g.`cog_shop_id` =#{shopId}
            </foreach>
        </if>
        <if test="minTime != null"> <!-- 高风险订单 -->
            AND co.`co_third_create_time`>#{minTime} AND <![CDATA[ (co.`co_estimate`>=  ${money} OR co.`co_eIncome`> ${money})]]>
        </if>
    </select>
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
@@ -118,8 +118,11 @@
            } else {
                record.setIcon(resultObj.getIcon());
            }
            record.setGoodsTotal(resultObj.getGoodsTotal());
            if (state == 0){
                record.setGoodsTotal(0);
            } else {
                record.setGoodsTotal(resultObj.getGoodsTotal());
            }
            record.setCreateTime(resultObj.getCreateTime());
            record.setUpdateTime(new Date());
            brandInfoMapper.updateByPrimaryKey(record);
@@ -260,8 +263,8 @@
        if (count == 0)
            return;
        for (int page = 1; page < (count / 100) + 1; page++) {
            updateTotalGoods((page - 1) * 100, 100);
        for (int page = 0; page < (count / 100) + 1; page++) {
            updateTotalGoods(page * 100, 100);
        }
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java
@@ -251,4 +251,14 @@
        return commonOrderCountMapper.countSameGoodsOrderByUidAndHongBaoType(typeList, uid, minSameGoodsOrderCount);
    }
    @Override
    public List<Long> getSameShopOrderByUidAndHongBaoType(List<Integer> typeList, Long uid, int minSameShopGoodsCount) {
        return commonOrderCountMapper.getSameShopOrderByUidAndHongBaoType(typeList, uid, minSameShopGoodsCount);
    }
    @Override
    public List<Long> getSameGoodsOrderByUidAndHongBaoType(List<Integer> typeList, Long uid, int minSameGoodsOrderCount) {
        return commonOrderCountMapper.getSameGoodsOrderByUidAndHongBaoType(typeList, uid, minSameGoodsOrderCount);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -1177,7 +1177,8 @@
    @Override
    public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state,
            Integer type, Integer orderState, String startTime, String endTime, Integer source)
            Integer type, Integer orderState, String startTime, String endTime, Integer source,List<Long> listShopId,
            List<Long> listGoodsId, Date minTime, BigDecimal money)
            throws CommonOrderException {
        List<CommonOrderVO> list = null;
@@ -1185,10 +1186,11 @@
        if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
            list = commonOrderMapper.listQueryWithNoChild(start, count, keyType, key, state, type, orderState,
                    startTime, endTime, source);
        } else
        } else {
            list = commonOrderMapper.listQuery(start, count, keyType, key, state, type, orderState, startTime, endTime,
                    source);
                    source, listShopId, listGoodsId, minTime, money);
        }
        if (list == null) {
            list = new ArrayList<CommonOrderVO>();
        }
@@ -1372,12 +1374,15 @@
    @Override
    public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
            String startTime, String endTime, Integer source) throws CommonOrderException {
            String startTime, String endTime, Integer source, List<Long> listShopId, List<Long> listGoodsId,
            Date minTime, BigDecimal money) throws CommonOrderException {
        if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
            return commonOrderMapper.countQueryWithNoChild(keyType, key, state, type, orderState, startTime, endTime,
                    source);
        } else
            return commonOrderMapper.countQuery(keyType, key, state, type, orderState, startTime, endTime, source);
        } else {
            return commonOrderMapper.countQuery(keyType, key, state, type, orderState, startTime, endTime, source, listShopId,
                    listGoodsId, minTime,money);
        }
    }
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java
@@ -193,6 +193,7 @@
        userInfoExtra.setFirstLoginTime(new Date());
        userInfoExtra.setCreateTime(new Date());
        userInfoExtra.setUpdateTime(new Date());
        userInfoExtra.setActiveTime(new Date());
        userInfoExtraMapper.insertSelective(userInfoExtra);
    }
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderCountService.java
@@ -4,8 +4,6 @@
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
public interface CommonOrderCountService {
@@ -113,4 +111,28 @@
     */
    long countSameGoodsOrderByUidAndHongBaoType(List<Integer> typeList, Long uid, int minSameGoodsOrderCount);
    /**
     * 查询用户在同一店铺购买超过一定数量商品的店铺id
     *
     * @param typeList
     *            -红包类型
     * @param uid
     *            -用户ID
     * @param minSameShopGoodsCount
     *            -同一店铺买的最小订单数
     * @return
     */
    List<Long> getSameShopOrderByUidAndHongBaoType(List<Integer> typeList, Long uid, int minSameShopGoodsCount);
    /**
     * 查询用户购买相同商品超过一定的订单数量的商品id
     *
     * @param typeList
     * @param uid
     * @param minSameGoodsOrderCount
     * @return
     */
    List<Long> getSameGoodsOrderByUidAndHongBaoType(List<Integer> typeList, Long uid, int minSameGoodsOrderCount);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java
@@ -223,11 +223,13 @@
     */
    public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state,
            Integer type, Integer orderState, String startTime, String endTime, Integer source)
            Integer type, Integer orderState, String startTime, String endTime, Integer source,
            List<Long> listShopId, List<Long> listGoodsId, Date minTime, BigDecimal money)
            throws CommonOrderException;
    public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
            String startTime, String endTime, Integer source) throws CommonOrderException;
            String startTime, String endTime, Integer source,
            List<Long> listShopId, List<Long> listGoodsId,Date minTime, BigDecimal money) throws CommonOrderException;
    /**
     * 查询订单