| | |
| | | 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) {
|
| | | // // 查询同店铺商品,同商品订单超过一定数量的
|
| | |
| | | // }
|
| | |
|
| | | record.setWarnLevel(warnLevel);
|
| | |
|
| | | }
|
| | |
|
| | | int count = extractAuditRecordService.getMyAuditedTimeSlotCount(key, state, null, days);
|
| | |
| | | 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);
|
| | |
| | | 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);
|
| | |
| | | @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;
|
| | |
| | |
|
| | | // 查询列表
|
| | | 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) {
|
| | |
| | | * @return
|
| | | */
|
| | | BigDecimal countCommissionByDate(@Param("preDay") String preDay);
|
| | | |
| | | |
| | | /** |
| | | * 查询最近50小于10的订单数量 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | Integer countOderByUidAndLess10(@Param("uid") Long uid); |
| | | } |
| | |
| | | @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); |
| | |
|
| | | /**
|
| | | * 订单列表查询(不包含子订单)
|
| | |
| | | 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); |
| | |
|
| | | /**
|
| | | * 统计
|
| | |
| | | @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); |
| | |
|
| | | /**
|
| | | * 根据来源类型与订单号查询列表
|
| | |
| | | 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>
|
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | <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`>#{minTime} AND<![CDATA[ (co.`co_estimate`>= ${money} OR co.`co_eIncome`> ${money})]]> |
| | |
| | | <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> |
| | |
| | | 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)) {
|
| | |
| | | @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) {
|
| | |
| | | @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); |
| | | }
|
| | | }
|
| | |
|
| | |
| | | public List<CountOrderTrackRate> getOrderTrackRate(int type, Date startTime, Date endTime);
|
| | |
|
| | |
|
| | | /** |
| | | * 查询最近50小于10的订单数量 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public Integer countOderByUidAndLess10(Long uid); |
| | | |
| | | |
| | | }
|
| | |
| | |
|
| | | 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; |
| | |
|
| | | /**
|
| | | * 查询订单
|