Administrator
2020-02-25 fb6eb1e6b9df772d243b5ade8b9e3dd08028e935
刷单标识
10个文件已修改
98 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderCountService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java
@@ -445,8 +445,15 @@
                        desc.append("维权订单退回金额:" + record.getExtraInfo().getWeiQuanOrderFanAmount() + "\n#");
                        desc.append("180天安全订单数:" + record.getExtraInfo().getSafeOrderCount());
                    }
                    Integer countOrder = commonOrderCountService.countOderByUidAndLess10(extract.getUserInfo().getId());
                    if (countOrder != null && countOrder > 10) {
                        desc.append("刷单嫌疑\n#");
                    }
                    record.setExtraInfoStr(desc.toString());
                }
                // if (warnLevel == 0) {
                // // 查询同店铺商品,同商品订单超过一定数量的
@@ -469,7 +476,6 @@
                // }
                record.setWarnLevel(warnLevel);
            }
            int count = extractAuditRecordService.getMyAuditedTimeSlotCount(key, state, null, days);
@@ -621,6 +627,14 @@
                    mark = "警惕!! " + userInfoExtra.getMark();
                }
                Integer countOrder = commonOrderCountService.countOderByUidAndLess10(extract.getUserInfo().getId());
                if (countOrder != null && countOrder > 10) {
                    if (StringUtil.isNullOrEmpty(mark)) {
                        mark = "刷单预警!!";
                    } else {
                        mark = mark + "     刷单预警!!";
                    }
                }
                data.put("mark", mark);
                data.put("extract", extract);
                data.put("beforeMoney", beforeMoney);
@@ -691,6 +705,15 @@
                        mark = "警惕!! " + userInfoExtra.getMark();
                    }
                    Integer countOrder = commonOrderCountService.countOderByUidAndLess10(extract.getUserInfo().getId());
                    if (countOrder != null && countOrder > 10) {
                        if (StringUtil.isNullOrEmpty(mark)) {
                            mark = "刷单预警!!";
                        } else {
                            mark = mark + "     刷单预警!!";
                        }
                    }
                    data.put("mark", mark);
                    data.put("extract", extract);
                    data.put("beforeMoney", beforeMoney);
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -158,7 +158,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,
            Integer riskType, PrintWriter out) {
            Integer riskType, BigDecimal payment, PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
@@ -213,11 +213,11 @@
            // 查询列表
            List<CommonOrderVO> list = commonOrderService.listQuery((pageIndex - 1) * pageSize, pageSize, keyType, key,
                    state, type, orderState, startTime, endTime, sourceType, listShopId, listGoodsId, minTime, money);
                    state, type, orderState, startTime, endTime, sourceType, listShopId, listGoodsId, minTime, money, payment);
            // 统计总数
            long count = commonOrderService.countQuery(keyType, key, state, type, orderState, startTime, endTime,
                    sourceType, listShopId, listGoodsId, minTime, money);
                    sourceType, listShopId, listGoodsId, minTime, money, payment);
            // 查询是否维权
            for (CommonOrderVO order : list) {
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java
@@ -161,4 +161,12 @@
     * @return
     */
    BigDecimal countCommissionByDate(@Param("preDay") String preDay);
    /**
     * 查询最近50小于10的订单数量
     * @param uid
     * @return
     */
    Integer countOderByUidAndLess10(@Param("uid") Long uid);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java
@@ -186,7 +186,7 @@
            @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
            @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);
            @Param("minTime")Date minTime, @Param("money")BigDecimal money, @Param("payment") BigDecimal payment);
    /**
     * 订单列表查询(不包含子订单)
@@ -206,7 +206,7 @@
    List<CommonOrderVO> listQueryWithNoChild(@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("payment") BigDecimal payment);
    /**
     * 统计
@@ -215,11 +215,11 @@
            @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
            @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);
            @Param("minTime")Date minTime, @Param("money")BigDecimal money,@Param("payment") BigDecimal payment);
    long countQueryWithNoChild(@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("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source, @Param("payment") BigDecimal payment);
    /**
     * 根据来源类型与订单号查询列表
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml
@@ -320,4 +320,12 @@
        WHERE d.`co_third_create_time`= #{preDay} AND (d.`co_state`=1 OR d.`co_state`=2)  
    </select>
    
    <select id="countOderByUidAndLess10" resultType="Integer">
        SELECT count(1) from (SELECT SUM(d.co_payment) as payment FROM `yeshi_ec_common_order` d
        where d.co_uid = #{uid} and d.co_source_type = 1  and d.co_state <![CDATA[<>]]> 4
        GROUP BY d.`co_order_no`
        ORDER BY d.co_third_create_time desc
        limit 50)A where A.payment<![CDATA[<]]> 10
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
@@ -810,6 +810,11 @@
        <include refid="SELECT_PARAM_ORDER_CREATE_TIME" />
        <!-- 订单时间 -->
        <if test="orderNo != null and orderNo !='' ">AND co.co_order_no = #{orderNo}</if>
        <if test="payment != null">
            AND co.co_payment <![CDATA[<]]> #{payment}
        </if>
        ORDER BY co.co_third_create_time DESC LIMIT ${start},${count}
    </select>
    <select id="countQueryByUid" resultType="java.lang.Long">
@@ -908,6 +913,9 @@
        </if>
        <!-- 订单来源 -->
        <if test="source != null">AND co.co_source_type = #{source}</if>
        <if test="payment != null">
            AND co.co_payment <![CDATA[<]]> #{payment}
        </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>
@@ -944,6 +952,9 @@
            <foreach collection="listShopId" item="shopId" open=" and ("
                separator=" or " close=")">g.`cog_shop_id` =#{shopId}</foreach>
        </if>
        <if test="payment != null">
            AND co.co_payment <![CDATA[<]]> #{payment}
        </if>
        <if test="minTime != null">
            <!-- 高风险订单 -->
            AND co.`co_third_create_time`&gt;#{minTime} AND<![CDATA[ (co.`co_estimate`>=  ${money} OR co.`co_eIncome`> ${money})]]>
@@ -968,6 +979,9 @@
            <if test="keyType == 1 ">AND co.co_order_no = '${key}'</if>
            <if test="keyType == 2 ">AND hb.hb_uid = ${key}</if>
        </if>
        <if test="payment != null">
            AND co.co_payment <![CDATA[<]]> #{payment}
        </if>
        <!-- 订单来源 -->
        <if test="source != null">AND co.co_source_type = #{source}</if>
    </select>
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java
@@ -59,6 +59,11 @@
        return commonOrderCountMapper.countByState(state);
    }
    @Override
    public Integer countOderByUidAndLess10(Long uid) {
        return commonOrderCountMapper.countOderByUidAndLess10(uid);
    }
    public List<ChartTDO> dayFactory(String startTime, String endTime, List<ChartTDO> list) throws Exception {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        if (startTime.equals(endTime)) {
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -1240,16 +1240,16 @@
    @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, List<Long> listShopId,
            List<Long> listGoodsId, Date minTime, BigDecimal money) throws CommonOrderException {
            List<Long> listGoodsId, Date minTime, BigDecimal money,BigDecimal payment) throws CommonOrderException {
        List<CommonOrderVO> list = null;
        if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
            list = commonOrderMapper.listQueryWithNoChild(start, count, keyType, key, state, type, orderState,
                    startTime, endTime, source);
                    startTime, endTime, source, payment);
        } else {
            list = commonOrderMapper.listQuery(start, count, keyType, key, state, type, orderState, startTime, endTime,
                    source, listShopId, listGoodsId, minTime, money);
                    source, listShopId, listGoodsId, minTime, money,payment);
        }
        if (list == null) {
@@ -1436,13 +1436,13 @@
    @Override
    public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
            String startTime, String endTime, Integer source, List<Long> listShopId, List<Long> listGoodsId,
            Date minTime, BigDecimal money) throws CommonOrderException {
            Date minTime, BigDecimal money,BigDecimal payment) throws CommonOrderException {
        if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
            return commonOrderMapper.countQueryWithNoChild(keyType, key, state, type, orderState, startTime, endTime,
                    source);
                    source, payment);
        } else {
            return commonOrderMapper.countQuery(keyType, key, state, type, orderState, startTime, endTime, source,
                    listShopId, listGoodsId, minTime, money);
                    listShopId, listGoodsId, minTime, money, payment);
        }
    }
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderCountService.java
@@ -192,4 +192,12 @@
    public List<CountOrderTrackRate> getOrderTrackRate(int type, Date startTime, Date endTime);
    
    /**
     * 查询最近50小于10的订单数量
     * @param uid
     * @return
     */
    public Integer countOderByUidAndLess10(Long uid);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java
@@ -226,12 +226,12 @@
    public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state,
            Integer type, Integer orderState, String startTime, String endTime, Integer source,
            List<Long> listShopId, List<Long> listGoodsId, Date minTime, BigDecimal money)
            List<Long> listShopId, List<Long> listGoodsId, Date minTime, BigDecimal money,BigDecimal payment)
            throws CommonOrderException;
    public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
            String startTime, String endTime, Integer source, 
            List<Long> listShopId, List<Long> listGoodsId,Date minTime, BigDecimal money) throws CommonOrderException;
            List<Long> listShopId, List<Long> listGoodsId,Date minTime, BigDecimal money,BigDecimal payment) throws CommonOrderException;
    /**
     * 查询订单