admin
2020-11-09 2147d023563a7c9d05d97547c00d6b0162c0644c
刷单风险规则优化
24个文件已修改
1个文件已添加
391 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/validate/ValidateController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/money/TeamRewardDebt.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/order/UserOrderWeiQuanRecord.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/TeamRewardDebtServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/tb/TaoBaoWeiQuanDrawBackServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderMoneySettleServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/UserOrderWeiQuanRecordServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoWeiQuanOrderServiceImpl.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/money/tb/TaoBaoWeiQuanDrawBackService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/OrderProcessService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/UserOrderWeiQuanRecordService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/manger/order/TeamRewardManager.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/HtmlToolUtil.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/money/TeamRewardDebtMapper.xml 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/order/CommonOrderCountMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/order/CommonOrderMapper.xml 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/test/java/org/fanli/MyBatisProduce.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -12,6 +12,7 @@
import com.yeshi.fanli.entity.accept.AdminAcceptData;
import com.yeshi.fanli.util.OrderConstant;
import net.sf.json.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
@@ -146,8 +147,10 @@
     */
    @RequestMapping(value = "getUserOrderList")
    public void getUserOrderList(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, Integer keyType, String key,
                                 Integer state, Integer type, Integer orderState, String startTime, String endTime, Integer sourceType,
                                 Integer state, String type, Integer orderState, String startTime, String endTime, Integer sourceType,
                                 Integer riskType, BigDecimal payment, PrintWriter out) {
        List<Integer> typeList = null;
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
@@ -160,8 +163,15 @@
            state = null;// 所有状态
        }
        if (type != null && type == 0) {
            type = null; // 所有类型订单
        if (!StringUtil.isNullOrEmpty(type)) {
            JSONArray array = JSONArray.fromObject(type);
            if (array.size() > 0) {
                typeList = new ArrayList<>();
                for (int i = 0; i < array.size(); i++) {
                    if (!StringUtil.isNullOrEmpty(array.optString(i)))
                        typeList.add(array.optInt(i));
                }
            }
        }
        if (endTime != null && endTime.trim().length() > 0) {
@@ -177,18 +187,18 @@
            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);
                List<Integer> hongBaoTypeList = new ArrayList<>();
                hongBaoTypeList.add(HongBaoV2.TYPE_ZIGOU);
                if (riskType == 1) {
                    listGoodsId = commonOrderCountService.getSameGoodsOrderByUidAndHongBaoType(typeList, uid,
                    listGoodsId = commonOrderCountService.getSameGoodsOrderByUidAndHongBaoType(hongBaoTypeList, uid,
                            Integer.parseInt(configService.getValue(ConfigKeyEnum.adminMinSameGoodsOrderCount.getKey(), acceptData.getSystem())));
                    if (listGoodsId == null || listGoodsId.isEmpty()) {
                        JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无同商品订单"));
                        return;
                    }
                } else if (riskType == 2) {
                    listShopId = commonOrderCountService.getSameShopOrderByUidAndHongBaoType(typeList, uid,
                    listShopId = commonOrderCountService.getSameShopOrderByUidAndHongBaoType(hongBaoTypeList, uid,
                            Integer.parseInt(configService.getValue(ConfigKeyEnum.adminMinSameShopOrderCount.getKey(), acceptData.getSystem())));
                    if (listShopId == null || listShopId.isEmpty()) {
                        JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无同店铺订单"));
@@ -202,10 +212,10 @@
            // 查询列表
            List<CommonOrderVO> list = commonOrderService.listQuery((pageIndex - 1) * pageSize, pageSize, keyType, key,
                    state, type, orderState, startTime, endTime, sourceType, listShopId, listGoodsId, minTime, money, payment, acceptData.getSystem());
                    state, typeList, orderState, startTime, endTime, sourceType, listShopId, listGoodsId, minTime, money, payment, acceptData.getSystem());
            // 统计总数
            long count = commonOrderService.countQuery(keyType, key, state, type, orderState, startTime, endTime,
            long count = commonOrderService.countQuery(keyType, key, state, typeList, orderState, startTime, endTime,
                    sourceType, listShopId, listGoodsId, minTime, money, payment, acceptData.getSystem());
            for (CommonOrderVO order : list) {
fanli/src/main/java/com/yeshi/fanli/controller/validate/ValidateController.java
@@ -28,7 +28,7 @@
        // 生成随机字串
        String verifyCode = VerifyCodeUtil.generateVerifyCode(4);
        // 存入会话session
        HttpSession session = request.getSession(true);
        HttpSession session = request.getSession();
        session.setAttribute(Constant.RANDKEY, verifyCode.toLowerCase());
        // 生成图片
        int w = 200, h = 80;
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java
@@ -198,11 +198,11 @@
    /**
     * 查询最近50小于10的订单数量
     *
     * @param uid
     * @param minDate
     * @return
     */
    Integer countOderByUidAndLess10(@Param("uid") Long uid);
    Integer countOderByUidAndLess10(@Param("uid") Long uid,@Param("minDate") Date minDate,@Param("maxMoney") BigDecimal maxMoney);
    List<Long> getDownOrderUserByListUidAndDate(@Param("preDay") Date preDay, @Param("list") List<Long> list);
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java
@@ -174,7 +174,7 @@
     * @param count
     * @param uid
     * @param state
     * @param type
     * @param typeList
     * @param orderState
     * @param startTime
     * @param endTime
@@ -182,7 +182,7 @@
     */
    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("typeList") List<Integer> typeList, @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("payment") BigDecimal payment, @Param("system") SystemEnum system);
@@ -204,20 +204,20 @@
     */
    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("typeList") List<Integer> typeList, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
                                             @Param("endTime") String endTime, @Param("source") Integer source, @Param("payment") BigDecimal payment, @Param("system") SystemEnum system);
    /**
     * 统计
     */
    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("typeList") List<Integer> typeList, @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("payment") BigDecimal payment, @Param("system") SystemEnum system);
    long countQueryWithNoChild(@Param("keyType") Integer keyType, @Param("key") String key,
                               @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
                               @Param("state") Integer state, @Param("typeList") List<Integer> typeList, @Param("orderState") Integer orderState,
                               @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source, @Param("payment") BigDecimal payment, @Param("system") SystemEnum system);
    /**
fanli/src/main/java/com/yeshi/fanli/entity/money/TeamRewardDebt.java
@@ -10,7 +10,6 @@
 * 团队奖金欠账
 * 
 * @author Administrator
 *
 */
@Table("yeshi_ec_team_reward_debt")
public class TeamRewardDebt {
@@ -32,6 +31,10 @@
    private Date updateTime;
    @Column(name = "rd_trade_id")
    private String tradeId;
    @Column(name = "rd_source_type")
    private Integer sourceType;
    @Column(name = "rd_estimate_pay_time")
    private Date estimatePayTime;//预计偿还时间
@@ -130,4 +133,13 @@
        this.updateTime = updateTime;
    }
    public Integer getSourceType() {
        return sourceType;
    }
    public void setSourceType(Integer sourceType) {
        this.sourceType = sourceType;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/order/UserOrderWeiQuanRecord.java
@@ -14,6 +14,8 @@
 */
@Table("yeshi_ec_user_order_weiquan_record")
public class UserOrderWeiQuanRecord {
    public final static int STATE_NOT_RETURN=0;//未扣款
    public final static int STATE_RETURNED=1;//已扣款
    @Column(name = "wr_id")
    private Long id;
    @Column(name = "wr_source_type")
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java
@@ -54,7 +54,8 @@
    @Override
    public Integer countOderByUidAndLess10(Long uid) {
        return commonOrderCountMapper.countOderByUidAndLess10(uid);
        Date date = new Date(System.currentTimeMillis() - 1000 * 60 * 60L * 24 * 90L);
        return commonOrderCountMapper.countOderByUidAndLess10(uid, date,new BigDecimal(9));
    }
    public List<ChartTDO> dayFactory(String startTime, String endTime, List<ChartTDO> list) throws Exception {
fanli/src/main/java/com/yeshi/fanli/service/impl/money/TeamRewardDebtServiceImpl.java
@@ -7,6 +7,9 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord;
import com.yeshi.fanli.service.inter.order.UserOrderWeiQuanRecordService;
import com.yeshi.fanli.util.StringUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -25,10 +28,13 @@
    @Resource
    private TeamRewardDebtRepayHistoryMapper teamRewardDebtRepayHistoryMapper;
    @Resource
    private UserOrderWeiQuanRecordService userOrderWeiQuanRecordService;
    @Transactional(rollbackFor = Exception.class)
    @Override
    public void addDebt(TeamRewardDebt debt) throws TeamRewardDebtException {
        if (debt == null || debt.getOriginMoney() == null || debt.getOriginMoney() == null || debt.getUid() == null) {
        if (debt == null || debt.getOriginMoney() == null || debt.getOriginMoney() == null || debt.getUid() == null || StringUtil.isNullOrEmpty(debt.getTradeId()) || debt.getSourceType() == null) {
            throw new TeamRewardDebtException(1, "数据不完整");
        }
        if (debt.getCreateTime() == null)
@@ -60,6 +66,11 @@
        record.setMoney(money);
        record.setUid(debt.getUid());
        teamRewardDebtRepayHistoryMapper.insertSelective(record);
        //还钱是否还完
        if (update.getLeftMoney().compareTo(new BigDecimal(0)) <= 0) {
            //已经还完钱
            userOrderWeiQuanRecordService.weiQuanMoneyReturn(debt.getUid(), debt.getTradeId(), debt.getSourceType());
        }
    }
    @Transactional(rollbackFor = Exception.class)
fanli/src/main/java/com/yeshi/fanli/service/impl/money/tb/TaoBaoWeiQuanDrawBackServiceImpl.java
@@ -517,7 +517,7 @@
                settleMent = settleMent.add(taoBaoOrder.getSettlement());
            }
            // 查询下级子用户
            CommonOrder commonOrder = commonOrderMapper.selectBySourceTypeAndTradeId(Constant.SOURCE_TYPE_TAOBAO,
                    weiQuanOrder.getOrderItemId());
            if (commonOrder == null)
@@ -528,6 +528,7 @@
            if (hongbaoOrder == null || hongbaoOrder.getHongBaoV2() == null)
                throw new TaoBaoWeiQuanException(3, "红包有误");
            // 查询下级子用户
            List<HongBaoV2> childList = hongBaoV2Mapper.listChildrenById(hongbaoOrder.getHongBaoV2().getId());
            if (childList != null)
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -1489,16 +1489,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<Integer> typeList, Integer orderState, String startTime, String endTime, Integer source, List<Long> listShopId,
                                         List<Long> listGoodsId, Date minTime, BigDecimal money, BigDecimal payment, SystemEnum system) throws CommonOrderException {
        List<CommonOrderVO> list = null;
        if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
            list = commonOrderMapper.listQueryWithNoChild(start, count, keyType, key, state, type, orderState,
            list = commonOrderMapper.listQueryWithNoChild(start, count, keyType, key, state, typeList, orderState,
                    startTime, endTime, source, payment, system);
        } else {
            list = commonOrderMapper.listQuery(start, count, keyType, key, state, type, orderState, startTime, endTime,
            list = commonOrderMapper.listQuery(start, count, keyType, key, state, typeList, orderState, startTime, endTime,
                    source, listShopId, listGoodsId, minTime, money, payment, system);
        }
@@ -1684,14 +1684,14 @@
    }
    @Override
    public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
    public long countQuery(Integer keyType, String key, Integer state, List<Integer> typeList, Integer orderState,
                           String startTime, String endTime, Integer source, List<Long> listShopId, List<Long> listGoodsId,
                           Date minTime, BigDecimal money, BigDecimal payment, SystemEnum system) throws CommonOrderException {
        if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 搜索框无值或者按订单号搜索时都只搜索主订单
            return commonOrderMapper.countQueryWithNoChild(keyType, key, state, type, orderState, startTime, endTime,
            return commonOrderMapper.countQueryWithNoChild(keyType, key, state, typeList, orderState, startTime, endTime,
                    source, payment, system);
        } else {
            return commonOrderMapper.countQuery(keyType, key, state, type, orderState, startTime, endTime, source,
            return commonOrderMapper.countQuery(keyType, key, state, typeList, orderState, startTime, endTime, source,
                    listShopId, listGoodsId, minTime, money, payment, system);
        }
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderMoneySettleServiceImpl.java
@@ -547,9 +547,6 @@
                hongBaoV2Mapper.updateByPrimaryKeySelective(updateHongBao);
                // 添加到红包返利记录集合
                hbIdList.add(hongBao.getId());
                // 2018-08-05 过后的订单才处理维权
                HongBaoOrder hongBaoOrder = hongBaoOrderMapper.selectByHongBaoId(hongBao.getParent().getId());
                inviteOrders.add(hongBaoOrder.getCommonOrder().getOrderNo());
            }
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java
@@ -13,6 +13,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.service.manger.order.TeamRewardManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@@ -161,6 +162,9 @@
    @Resource
    private HongBaoV2AddManager hongBaoV2AddManager;
    @Resource
    private TeamRewardManager teamRewardManager;
    /**
     * 是否是分享订单
@@ -546,7 +550,7 @@
                    new Date(TimeUtil.convertToTimeTemp(orderList.get(0).getSettlementTime(), "yyyy-MM-dd HH:mm:ss")));
        // 处理维权成功但是已到账的订单
        if (order.getJieSuanTime().getTime() > TimeUtil.convertToTimeTemp("2019-01-01", "yyyy-MM-dd")) {// 结算时间在2月1号的开始处理已到账但是维权的
        if (order.getJieSuanTime().getTime() > TimeUtil.convertToTimeTemp("2019-01-01", "yyyy-MM-dd")) {// 结算时间在1月1号的开始处理已到账但是维权的
            CommonOrder commonOrder = commonOrderService.selectBySourceTypeAndTradeId(Constant.SOURCE_TYPE_TAOBAO,
                    order.getOrderItemId());
            if (commonOrder != null && !StringUtil.isNullOrEmpty(commonOrder.getTradeId())) {
@@ -560,8 +564,8 @@
                        try {
                            taoBaoWeiQuanDrawBackService.doWeiQuanFanli(order.getOrderId(), true);
                            taoBaoWeiQuanDrawBackService.doWeiQuanShare(order.getOrderId());
                            taoBaoWeiQuanDrawBackService.doWeiQuanInvite(order.getOrderId());
                        } catch (TaoBaoWeiQuanException e) {
                            teamRewardManager.weiQuan(order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO, order.getOrderItemId());
                        } catch (Exception e) {
                            try {
                                LogHelper.errorDetailInfo(e, "到账后处理维权扣款出错", "订单号:" + order.getOrderId());
                            } catch (Exception e1) {
@@ -569,21 +573,14 @@
                            }
                        }
                    } else {
                        // 查询子红包是否已到账
                        List<HongBaoV2> children = hongBaoV2Service
                                .listChildrenById(hongBaoOrder.getHongBaoV2().getId());
                        for (HongBaoV2 hongBaoV2 : children) {
                            if (hongBaoV2.getState() == HongBaoV2.STATE_YILINGQU) {
                                try {
                                    taoBaoWeiQuanDrawBackService.doWeiQuanInvite(order.getOrderId());
                                } catch (TaoBaoWeiQuanException e) {
//                                    taoBaoWeiQuanDrawBackService.doWeiQuanInvite(order.getOrderId());
                            teamRewardManager.weiQuan(order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO, order.getOrderItemId());
                        } catch (Exception e) {
                                    try {
                                        LogHelper.errorDetailInfo(e, "到账后处理维权扣款出错", "订单号:" + order.getOrderId());
                                    } catch (Exception e1) {
                                        e1.printStackTrace();
                                    }
                                }
                                break;
                            }
                        }
                    }
fanli/src/main/java/com/yeshi/fanli/service/impl/order/UserOrderWeiQuanRecordServiceImpl.java
@@ -122,7 +122,7 @@
            record.setMoney(hongBaoOrder.getHongBaoV2().getMoney().multiply(order.getMoney()).divide(settleMoney, 2,
                    RoundingMode.UP));
            record.setSourceType(Constant.SOURCE_TYPE_TAOBAO);
            record.setState(0);
            record.setState(UserOrderWeiQuanRecord.STATE_NOT_RETURN);
            record.setTradeId(order.getOrderItemId());
            record.setUid(hongBaoOrder.getHongBaoV2().getUserInfo().getId());
@@ -140,7 +140,7 @@
                record.setCreateTime(new Date());
                record.setMoney(v2.getMoney().multiply(order.getMoney()).divide(settleMoney, 2, RoundingMode.UP));
                record.setSourceType(Constant.SOURCE_TYPE_TAOBAO);
                record.setState(0);
                record.setState(UserOrderWeiQuanRecord.STATE_NOT_RETURN);
                record.setTradeId(order.getOrderItemId());
                record.setUid(v2.getUserInfo().getId());
@@ -166,9 +166,24 @@
    }
    
    
    @Override
    public BigDecimal countWeiQaunOrderMoneyByDate(String preDay) {
        return  userOrderWeiQuanRecordMapper.countWeiQaunOrderMoneyByDate(preDay);
    }
    @Transactional
    @Override
    public void weiQuanMoneyReturn(Long uid, String tradeId, int sourceType) {
        UserOrderWeiQuanRecord record = selectByOrderInfoAndUid(uid, tradeId, sourceType);
        if (record == null) {
            return;
        }
        if (record.getState() == UserOrderWeiQuanRecord.STATE_RETURNED)
            return;
        UserOrderWeiQuanRecord update = new UserOrderWeiQuanRecord();
        update.setId(record.getId());
        update.setState(UserOrderWeiQuanRecord.STATE_RETURNED);
        update.setUpdateTime(new Date());
        userOrderWeiQuanRecordMapper.updateByPrimaryKeySelective(update);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoWeiQuanOrderServiceImpl.java
@@ -6,6 +6,9 @@
import javax.annotation.Resource;
import com.yeshi.fanli.exception.money.TeamRewardDebtException;
import com.yeshi.fanli.exception.order.TaoBaoOrderException;
import com.yeshi.fanli.service.manger.order.TeamRewardManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -35,10 +38,8 @@
    private TaoBaoWeiQuanOrderMapper taoBaoWeiQuanOrderMapper;
    @Resource
    private UserOrderMsgNotificationService userOrderMsgNotificationService;
    private TeamRewardManager teamRewardManager;
    @Resource
    private MsgOrderDetailService msgOrderDetailService;
    @Resource
    private CommonOrderService commonOrderService;
@@ -79,16 +80,7 @@
            isUpdate = true;
            try {
                if (order.getState().contains("维权成功")) {
                    // 更改CommonOrder的状态
                    CommonOrder commonOrder = commonOrderService
                            .selectBySourceTypeAndTradeId(Constant.SOURCE_TYPE_TAOBAO, order.getOrderItemId());
                    if (commonOrder != null) {
                        CommonOrder updateCommonOrder = new CommonOrder(commonOrder.getId());
                        updateCommonOrder.setState(CommonOrder.STATE_WQ);
                        updateCommonOrder.setUpdateTime(new Date());
                        commonOrderService.updateByPrimaryKeySelective(updateCommonOrder);
                        userOrderWeiQuanRecordService.addTaoBaoWeiQuan(taoBaoWeiQuanOrder);
                    }
                    weiQuanSuccess(order);
                }
            } catch (Exception e) {
@@ -100,16 +92,7 @@
            id = order.getId();
            isAdd = true;
            if (order.getState().contains("维权成功")) {
                // 更改CommonOrder的状态
                CommonOrder commonOrder = commonOrderService.selectBySourceTypeAndTradeId(Constant.SOURCE_TYPE_TAOBAO,
                        order.getOrderItemId());
                if (commonOrder != null) {
                    CommonOrder updateCommonOrder = new CommonOrder(commonOrder.getId());
                    updateCommonOrder.setState(CommonOrder.STATE_WQ);
                    updateCommonOrder.setUpdateTime(new Date());
                    commonOrderService.updateByPrimaryKeySelective(updateCommonOrder);
                    userOrderWeiQuanRecordService.addTaoBaoWeiQuan(order);
                }
                weiQuanSuccess(order);
            }
        }
@@ -126,6 +109,33 @@
    }
    /**
     * 维权成功
     *
     * @param order
     */
    private void weiQuanSuccess(TaoBaoWeiQuanOrder order) {
        // 更改CommonOrder的状态
        CommonOrder commonOrder = commonOrderService.selectBySourceTypeAndTradeId(Constant.SOURCE_TYPE_TAOBAO,
                order.getOrderItemId());
        if (commonOrder != null) {
            CommonOrder updateCommonOrder = new CommonOrder(commonOrder.getId());
            updateCommonOrder.setState(CommonOrder.STATE_WQ);
            updateCommonOrder.setUpdateTime(new Date());
            commonOrderService.updateByPrimaryKeySelective(updateCommonOrder);
            userOrderWeiQuanRecordService.addTaoBaoWeiQuan(order);
            try {
                teamRewardManager.weiQuan(order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO, order.getOrderItemId());
            } catch (TaoBaoOrderException e) {
                e.printStackTrace();
            } catch (TeamRewardDebtException e) {
                e.printStackTrace();
            }
        }
    }
    @Override
    public List<TaoBaoWeiQuanOrder> getWeiQuanSuccessOrders(String orderId) {
        return taoBaoWeiQuanOrderMapper.selectListByOrderIdAndState(orderId, "维权成功");
fanli/src/main/java/com/yeshi/fanli/service/inter/money/tb/TaoBaoWeiQuanDrawBackService.java
@@ -34,7 +34,7 @@
    /**
     * 维权处理-子订单(邀请赚)
     *
     * 过时
     * @param orderId
     * @throws TaoBaoWeiQuanException
     */
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java
@@ -244,7 +244,7 @@
     * @param keyType
     * @param key
     * @param state
     * @param type
     * @param typeList
     * @param orderState
     * @param startTime
     * @param endTime
@@ -253,11 +253,11 @@
     */
    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<Integer> typeList, Integer orderState, String startTime, String endTime, Integer source,
                                         List<Long> listShopId, List<Long> listGoodsId, Date minTime, BigDecimal money, BigDecimal payment, SystemEnum system)
            throws CommonOrderException;
    public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
    public long countQuery(Integer keyType, String key, Integer state, List<Integer> typeList, Integer orderState,
                           String startTime, String endTime, Integer source,
                           List<Long> listShopId, List<Long> listGoodsId, Date minTime, BigDecimal money, BigDecimal payment, SystemEnum system) throws CommonOrderException;
fanli/src/main/java/com/yeshi/fanli/service/inter/order/OrderProcessService.java
@@ -91,6 +91,7 @@
    public void weiQuanOrder(List<TaoBaoWeiQuanOrder> orderList);
    /**
     * 过时
     * 单个订单维权
     * 
     * @param order
fanli/src/main/java/com/yeshi/fanli/service/inter/order/UserOrderWeiQuanRecordService.java
@@ -20,7 +20,6 @@
    public void addTaoBaoWeiQuan(TaoBaoWeiQuanOrder order);
    /**
     *
     * @Title: listByOrderInfoAndUid @Description: 根据订单信息与用户ID查询维权 @param
     * uid @param orderId @param sourceType @return List<UserOrderWeiQuanRecord>
     * 返回类型 @throws
@@ -30,6 +29,7 @@
    /**
     * 统计数量  订单分组 日期筛选
     *
     * @param preDay
     * @return
     */
@@ -37,9 +37,20 @@
    /**
     * 订单维权金额
     *
     * @param preDay
     * @return
     */
    public BigDecimal countWeiQaunOrderMoneyByDate(String preDay);
    /**
     * 维权资金偿还
     *
     * @param uid
     * @param tradeId
     * @param sourceType
     */
    public void weiQuanMoneyReturn(Long uid, String tradeId, int sourceType);
}
fanli/src/main/java/com/yeshi/fanli/service/manger/order/TeamRewardManager.java
@@ -66,6 +66,14 @@
        teamEincomeManager.addTeamReward(uid, date, money, sourceType);
    }
    /**
     * 处理邀请维权
     * @param orderNo
     * @param sourceType
     * @param tradeId
     * @throws TaoBaoOrderException
     * @throws TeamRewardDebtException
     */
    public void weiQuan(String orderNo, int sourceType, String tradeId)
            throws TaoBaoOrderException, TeamRewardDebtException {
        if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {// 只处理淘宝的维权
@@ -120,6 +128,7 @@
                    debt.setOriginMoney(drawBackMoney);
                    debt.setSourceId(child.getId());
                    debt.setTradeId(tradeId);
                    debt.setSourceType(sourceType);
                    debt.setUid(child.getUserInfo().getId());
                    debt.setEstimatePayTime(child.getPreGetTime());
                    teamRewardDebtService.addDebt(debt);
fanli/src/main/java/com/yeshi/fanli/util/HtmlToolUtil.java
New file
@@ -0,0 +1,35 @@
package com.yeshi.fanli.util;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class HtmlToolUtil {
    //解析SQLYog工具导出的html内容
    public static List<String[]> parseSQLYogExportHtmData(String path, int columns) {
        List<String[]> contentList = new ArrayList<>();
        try {
            Document doc = Jsoup.parse(new File(path), "UTF-8");
            Elements els = doc.getElementsByTag("tr");
            for (int i = 1; i < els.size(); i++) {
                Elements tds = els.get(i).getElementsByTag("td");
                String[] contents = new String[columns];
                for (int j = 0; j < columns; j++) {
                    String content = tds.get(j).html().trim();
                    contents[j] = content;
                }
                contentList.add(contents);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return contentList;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
@@ -907,7 +907,7 @@
            Comparator<JDCouponInfo> cm = new Comparator<JDCouponInfo>() {
                @Override
                public int compare(JDCouponInfo o1, JDCouponInfo o2) {
                    return o1.getQuota().compareTo(o2.getQuota());
                    return o1.getQuota().compareTo(o2.getQuota())==0?o1.getDiscount().compareTo(o2.getDiscount()):o1.getQuota().compareTo(o2.getQuota());
                }
            };
            Collections.sort(couponInfoList, cm);
fanli/src/main/resource/mapping/money/TeamRewardDebtMapper.xml
@@ -5,68 +5,49 @@
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.money.TeamRewardDebt">
        <id column="rd_id" property="id" jdbcType="BIGINT" />
        <result column="rd_uid" property="uid" jdbcType="BIGINT" />
        <result column="rd_origin_money" property="originMoney"
            jdbcType="DECIMAL" />
        <result column="rd_origin_money" property="originMoney" jdbcType="DECIMAL"/>
        <result column="rd_left_money" property="leftMoney" jdbcType="DECIMAL" />
        <result column="rd_source_id" property="sourceId" jdbcType="BIGINT" />
        <result column="rd_beizhu" property="beiZhu" jdbcType="VARCHAR" />
        <result column="rd_create_time" property="createTime" jdbcType="TIMESTAMP" />
        <result column="rd_update_time" property="updateTime" jdbcType="TIMESTAMP" />
        <result column="rd_trade_id" property="tradeId" jdbcType="VARCHAR" />
        <result column="rd_estimate_pay_time" property="estimatePayTime"
            jdbcType="TIMESTAMP" />
        <result column="rd_estimate_pay_time" property="estimatePayTime" jdbcType="TIMESTAMP"/>
        <result column="rd_source_type" property="sourceType" jdbcType="INTEGER"/>
    </resultMap>
    <sql id="Base_Column_List">rd_id,rd_uid,rd_origin_money,rd_left_money,rd_source_id,rd_beizhu,rd_create_time,rd_update_time,rd_trade_id,rd_estimate_pay_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
    <sql id="Base_Column_List">rd_id,rd_uid,rd_origin_money,rd_left_money,rd_source_id,rd_beizhu,rd_create_time,rd_update_time,rd_trade_id,rd_estimate_pay_time,rd_source_type</sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List" />
        from yeshi_ec_team_reward_debt where rd_id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
    <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List" />
        from yeshi_ec_team_reward_debt where rd_id = #{0} for update
    </select>
    <select id="selectBySourceId" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
    <select id="selectBySourceId" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List" />
        from yeshi_ec_team_reward_debt where rd_source_id = #{0}
    </select>
    <select id="listByLeftMoneyAndUidAndMaxEstimatePayTime" resultMap="BaseResultMap">
        select
    <select id="listByLeftMoneyAndUidAndMaxEstimatePayTime" resultMap="BaseResultMap">select
        <include refid="Base_Column_List" />
        from yeshi_ec_team_reward_debt where rd_uid = #{uid} and
        #{maxEstimatePayTime}>=rd_estimate_pay_time
        from yeshi_ec_team_reward_debt where rd_uid = #{uid} and #{maxEstimatePayTime}&gt;=rd_estimate_pay_time
        <if test="minMoney!=null">and rd_left_money&gt;=#{minMoney}</if>
        <if test="maxMoney!=null">and #{maxMoney}&gt;rd_left_money</if>
        limit #{start},#{count}
    </select>
    <select id="countByLeftMoneyAndUidAndMaxEstimatePayTime" resultType="java.lang.Long">
        select count(*) from yeshi_ec_team_reward_debt where rd_uid = #{uid}
        and #{maxEstimatePayTime}>=rd_estimate_pay_time
    <select id="countByLeftMoneyAndUidAndMaxEstimatePayTime" resultType="java.lang.Long">select count(*) from
        yeshi_ec_team_reward_debt where rd_uid = #{uid} and #{maxEstimatePayTime}&gt;=rd_estimate_pay_time
        <if test="minMoney!=null">and rd_left_money&gt;=#{minMoney}</if>
        <if test="maxMoney!=null">and #{maxMoney}&gt;rd_left_money</if>
    </select>
    <select id="sumLeftMoneyByUid" resultType="java.math.BigDecimal">select sum(rd_left_money) from yeshi_ec_team_reward_debt
        where rd_uid = #{uid} and #{maxEstimatePayTime}>=rd_estimate_pay_time
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_team_reward_debt where rd_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_team_reward_debt
        (rd_id,rd_uid,rd_origin_money,rd_left_money,rd_source_id,rd_beizhu,rd_create_time,rd_update_time,rd_trade_id,rd_estimate_pay_time)
        values
        (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{originMoney,jdbcType=DECIMAL},#{leftMoney,jdbcType=DECIMAL},#{sourceId,jdbcType=BIGINT},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{tradeId,jdbcType=VARCHAR},#{estimatePayTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_team_reward_debt
    <select id="sumLeftMoneyByUid"
            resultType="java.math.BigDecimal">select sum(rd_left_money) from yeshi_ec_team_reward_debt where rd_uid = #{uid} and #{maxEstimatePayTime}&gt;=rd_estimate_pay_time</select>
    <delete id="deleteByPrimaryKey"
            parameterType="java.lang.Long">delete from yeshi_ec_team_reward_debt where rd_id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt" useGeneratedKeys="true"
            keyProperty="id">insert into yeshi_ec_team_reward_debt (rd_id,rd_uid,rd_origin_money,rd_left_money,rd_source_id,rd_beizhu,rd_create_time,rd_update_time,rd_trade_id,rd_estimate_pay_time,rd_source_type) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{originMoney,jdbcType=DECIMAL},#{leftMoney,jdbcType=DECIMAL},#{sourceId,jdbcType=BIGINT},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{tradeId,jdbcType=VARCHAR},#{estimatePayTime,jdbcType=TIMESTAMP},#{sourceType,jdbcType=INTEGER})</insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt" useGeneratedKeys="true"
            keyProperty="id">insert into yeshi_ec_team_reward_debt
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">rd_id,</if>
            <if test="uid != null">rd_uid,</if>
@@ -78,6 +59,7 @@
            <if test="updateTime != null">rd_update_time,</if>
            <if test="tradeId != null">rd_trade_id,</if>
            <if test="estimatePayTime != null">rd_estimate_pay_time,</if>
            <if test="sourceType != null">rd_source_type,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -90,24 +72,14 @@
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="tradeId != null">#{tradeId,jdbcType=VARCHAR},</if>
            <if test="estimatePayTime != null">#{estimatePayTime,jdbcType=TIMESTAMP}</if>
            <if test="estimatePayTime != null">#{estimatePayTime,jdbcType=TIMESTAMP},</if>
            <if test="sourceType != null">#{sourceType,jdbcType=INTEGER},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt">update
        yeshi_ec_team_reward_debt set rd_uid =
        #{uid,jdbcType=BIGINT},rd_origin_money =
        #{originMoney,jdbcType=DECIMAL},rd_left_money =
        #{leftMoney,jdbcType=DECIMAL},rd_source_id =
        #{sourceId,jdbcType=BIGINT},rd_beizhu =
        #{beiZhu,jdbcType=VARCHAR},rd_create_time =
        #{createTime,jdbcType=TIMESTAMP},rd_update_time =
        #{updateTime,jdbcType=TIMESTAMP} ,rd_trade_id
        =#{tradeId,jdbcType=VARCHAR} ,rd_estimate_pay_time
        =#{estimatePayTime,jdbcType=TIMESTAMP} where rd_id =
        #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt">
        update yeshi_ec_team_reward_debt
    <update id="updateByPrimaryKey"
            parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt">update yeshi_ec_team_reward_debt set rd_uid = #{uid,jdbcType=BIGINT},rd_origin_money = #{originMoney,jdbcType=DECIMAL},rd_left_money = #{leftMoney,jdbcType=DECIMAL},rd_source_id = #{sourceId,jdbcType=BIGINT},rd_beizhu = #{beiZhu,jdbcType=VARCHAR},rd_create_time = #{createTime,jdbcType=TIMESTAMP},rd_update_time = #{updateTime,jdbcType=TIMESTAMP} ,rd_trade_id =#{tradeId,jdbcType=VARCHAR} ,rd_estimate_pay_time =#{estimatePayTime,jdbcType=TIMESTAMP} ,rd_source_type =#{sourceType,jdbcType=INTEGER} where rd_id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.money.TeamRewardDebt">update
        yeshi_ec_team_reward_debt
        <set>
            <if test="uid != null">rd_uid=#{uid,jdbcType=BIGINT},</if>
            <if test="originMoney != null">rd_origin_money=#{originMoney,jdbcType=DECIMAL},</if>
@@ -117,9 +89,8 @@
            <if test="createTime != null">rd_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">rd_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="tradeId !=null">rd_trade_id =#{tradeId,jdbcType=VARCHAR},</if>
            <if test="estimatePayTime !=null">rd_estimate_pay_time
                =#{estimatePayTime,jdbcType=TIMESTAMP},
            </if>
            <if test="estimatePayTime !=null">rd_estimate_pay_time =#{estimatePayTime,jdbcType=TIMESTAMP},</if>
            <if test="sourceType !=null">rd_source_type =#{sourceType,jdbcType=INTEGER},</if>
        </set>
        where rd_id = #{id,jdbcType=BIGINT}
    </update>
fanli/src/main/resource/mapping/order/CommonOrderCountMapper.xml
@@ -411,9 +411,15 @@
    <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
        <if test="minDate!=null">
            and d.co_third_create_time>#{minDate}
        </if>
        GROUP BY d.`co_order_no`
        ORDER BY d.co_third_create_time desc
        limit 100)A where A.payment<![CDATA[<]]> 10
        limit 100)A where A.payment<![CDATA[<]]> #{maxMoney}
    </select>
fanli/src/main/resource/mapping/order/CommonOrderMapper.xml
@@ -426,6 +426,29 @@
            v2.`hb_type` = 21 OR v2.`hb_type` = 22)
        </if>
    </sql>
    <sql id="SELECT_PARAM_HONGBAO_TYPE_LIST">
        <if test="typeList!=null">
            <foreach collection="typeList" item="type" separator=" or " open=" and (" close=")">
                <if test="type != null and type == 1">
                    <!-- 自购订单 -->
                    (v2.hb_type =1 or v2.hb_type =2)
                </if>
                <if test="type != null and type == 2">
                    <!-- 分享订单 -->
                    v2.`hb_type` = 20
                </if>
                <if test="type != null and type == 3">
                    <!-- 邀请订单 -->
                    (v2.`hb_type` = 5 OR v2.`hb_type` = 6 OR v2.`hb_type` = 7 OR
                    v2.`hb_type` = 21 OR v2.`hb_type` = 22)
                </if>
            </foreach>
        </if>
    </sql>
    <sql id="SELECT_PARAM_HONGBAO_STATE">
        <if test="state != null and state == 1">
            <!-- 未到账 -->
@@ -875,7 +898,7 @@
        hb.`hb_get_time` AS accountTime, hb.`hb_pre_get_time` AS
        preAccountTime, co.* FROM yeshi_ec_hongbao_order ho LEFT JOIN (SELECT
        * FROM yeshi_ec_hongbao_v2 v2 WHERE 1=1
        <include refid="SELECT_PARAM_HONGBAO_TYPE"/>
        <include refid="SELECT_PARAM_HONGBAO_TYPE_LIST"/>
        <!-- 红包类型 -->
        <include refid="SELECT_HONGBAO_STATE"/>
        <!-- 红包状态 -->
@@ -932,7 +955,7 @@
        hb.`hb_get_time` AS accountTime, hb.`hb_pre_get_time` AS
        preAccountTime, co.* FROM yeshi_ec_hongbao_order ho LEFT JOIN (SELECT
        * FROM yeshi_ec_hongbao_v2 v2 WHERE 1=1
        <include refid="SELECT_PARAM_HONGBAO_TYPE"/>
        <include refid="SELECT_PARAM_HONGBAO_TYPE_LIST"/>
        <!-- 红包类型 -->
        <include refid="SELECT_HONGBAO_STATE"/>
        <!-- 红包状态 -->
@@ -960,7 +983,7 @@
    <select id="countQuery" resultType="java.lang.Long">
        SELECT count(ho.ho_id) FROM yeshi_ec_hongbao_order ho LEFT JOIN
        (SELECT * FROM yeshi_ec_hongbao_v2 v2 WHERE 1=1
        <include refid="SELECT_PARAM_HONGBAO_TYPE"/>
        <include refid="SELECT_PARAM_HONGBAO_TYPE_LIST"/>
        <!-- 红包类型 -->
        <include refid="SELECT_HONGBAO_STATE"/>
        <!-- 红包状态 -->
@@ -1007,7 +1030,7 @@
    <select id="countQueryWithNoChild" resultType="java.lang.Long">
        SELECT count(ho.ho_id) FROM yeshi_ec_hongbao_order ho LEFT JOIN
        (SELECT * FROM yeshi_ec_hongbao_v2 v2 WHERE 1=1
        <include refid="SELECT_PARAM_HONGBAO_TYPE"/>
        <include refid="SELECT_PARAM_HONGBAO_TYPE_LIST"/>
        <!-- 红包类型 -->
        <include refid="SELECT_HONGBAO_STATE"/>
        <!-- 红包状态 -->
fanli/src/test/java/org/fanli/MyBatisProduce.java
@@ -5,6 +5,7 @@
import com.yeshi.fanli.entity.bus.user.Order;
import com.yeshi.fanli.entity.common.Config;
import com.yeshi.fanli.entity.config.CommonConfig;
import com.yeshi.fanli.entity.money.TeamRewardDebt;
import com.yeshi.fanli.entity.pdd.PDDOrder;
import com.yeshi.fanli.entity.push.PushGoods;
import com.yeshi.fanli.entity.system.BusinessSystem;
@@ -30,8 +31,8 @@
    @Test
    public void test1() {
        ColumnParseUtil.parseColumn(Order.class,
                "D:\\workspace\\fanli\\fanli-server\\fanli\\src\\main\\resource\\mapping\\order\\OrderMapper.xml");
        ColumnParseUtil.parseColumn(TeamRewardDebt.class,
                "D:\\workspace\\fanli\\fanli-server\\fanli\\src\\main\\resource\\mapping\\money\\TeamRewardDebtMapper.xml");
    }
}