| | |
| | | package com.yeshi.fanli.service.inter.count;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.ChartTDO;
|
| | | import com.yeshi.fanli.vo.order.HongBaoV2VO;
|
| | |
|
| | | public interface HongBaoV2CountService {
|
| | |
|
| | | /**
|
| | | * 统计历史总到账金额
|
| | | * |
| | | * @param uid
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | public BigDecimal countMoneyByUidAndState(Long uid, Integer state);
|
| | |
|
| | | /**
|
| | | * 统计历史红包数量
|
| | | * |
| | | * @param uid
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | public Integer countNumberByUidAndState(Long uid, Integer state);
|
| | |
|
| | | /**
|
| | | * 统计用户红包数量
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public Integer countNumberByUid(Long uid);
|
| | |
|
| | | /**
|
| | | * 统计总金额
|
| | | * |
| | | * @param channel
|
| | | * 渠道
|
| | | * @param dateType
|
| | | * 日期格式 日-1 月-2 年-3
|
| | | * @param state
|
| | | * 状态
|
| | | * @param years
|
| | | * 年份
|
| | | * @param startTime
|
| | | * 开始时间
|
| | | * @param endTime
|
| | | * 结束时间
|
| | | * @return
|
| | | */
|
| | | public List<ChartTDO> countHongBaoMoney(String channel, Integer dateType, Integer state, String year,
|
| | | String startTime, String endTime) throws Exception;
|
| | |
|
| | | /**
|
| | | * 统计总金额
|
| | | * |
| | | * @param channel
|
| | | * 渠道
|
| | | * @param dateType
|
| | | * 日期格式 日-1 月-2 年-3
|
| | | * @param state
|
| | | * 状态
|
| | | * @param years
|
| | | * 年份
|
| | | * @param startTime
|
| | | * 开始时间
|
| | | * @param endTime
|
| | | * 结束时间
|
| | | * @return
|
| | | */
|
| | | public List<ChartTDO> countHongBaoNum(String channel, Integer dateType, Integer state, String year,
|
| | | String startTime, String endTime) throws Exception;
|
| | |
|
| | | /**
|
| | | * 分类型订单数与比例
|
| | | * |
| | | * @param dateType
|
| | | * @param type
|
| | | * @param year
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<ChartTDO> getProportionByType(Integer dateType, Integer type, String year, String startTime,
|
| | | String endTime) throws Exception;
|
| | |
|
| | | /**
|
| | | * 统计提成订单数量
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public int getTotalTiChengCount(Long uid);
|
| | |
|
| | | /**
|
| | | * 统计未失效订单数量
|
| | | * |
| | | * @param uid
|
| | | * @param dateType
|
| | | * @return
|
| | | */
|
| | | public long countValidNumberByUid(Long uid, Integer dateType);
|
| | |
|
| | | /**
|
| | | * 统计未到账金额
|
| | | * |
| | | * @param uid
|
| | | * @param dateType
|
| | | * @return
|
| | | */
|
| | | public BigDecimal countWillGetMoneyByUid(Long uid);
|
| | |
|
| | | /**
|
| | | * 最后一次下单时间
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public Date getLastHongBaoTime(Long uid);
|
| | |
|
| | | public List<ChartTDO> count24HOderByChannel(String channel, Integer type, String years, String startTime,
|
| | | String endTime) throws Exception;
|
| | |
|
| | | /**
|
| | | * 统计所有类型订单数量
|
| | | * |
| | | * @param dateType
|
| | | * @param type
|
| | | * @param year
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<ChartTDO> countHongBaoType(Integer dateType, Integer type, String year, String startTime,
|
| | | String endTime) throws Exception;
|
| | |
|
| | | /**
|
| | | * 查询邀请=分享奖金
|
| | | * |
| | | * @param start
|
| | | * @param count
|
| | | * @param date
|
| | | * @return
|
| | | */
|
| | | public List<HongBaoV2VO> listShareAndInviteMoney(long start, int count, String date);
|
| | |
|
| | | /**
|
| | | * 奖励券金额
|
| | | * |
| | | * @return
|
| | | */
|
| | | public BigDecimal countRebateCouponMoney();
|
| | |
|
| | | /**
|
| | | * 统计返利订单
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countRebateOrder(Long uid);
|
| | |
|
| | | /**
|
| | | * 统计分享+ 邀请订单
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countShareOrInviteOrder(Long uid);
|
| | | |
| | | /**
|
| | | * 统计已到账
|
| | | * |
| | | * @param uid
|
| | | * @param typeList
|
| | | * @param minGetTime
|
| | | * @param maxGetTime
|
| | | * @return
|
| | | */
|
| | | public BigDecimal sumAlreadyGetMoneyByUid(Long uid, List<Integer> typeList, Date minGetTime, Date maxGetTime);
|
| | |
|
| | | public long countAlreadyGetMoneyByUid(Long uid, List<Integer> typeList, Date minGetTime, Date maxGetTime);
|
| | |
|
| | | package com.yeshi.fanli.service.inter.count; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.vo.order.HongBaoV2VO; |
| | | |
| | | public interface HongBaoV2CountService { |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询来源该下级成功分享 + 自购订单 |
| | | * @param uid
|
| | | * @param teamUid
|
| | | * @param endTime
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getOrderRewardByTeamUid(Long uid, Long teamUid, Date endTime);
|
| | |
|
| | | /**
|
| | | * 统计该下级成功分享 + 自购订单 |
| | | * @param uid
|
| | | * @param teamUid 下级id
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getOrderRewardByTeamUidTheMonth(Long uid, Long teamUid);
|
| | |
|
| | | /**
|
| | | * 自购返利到账金额
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getRewardMoneyBySelf(Long uid);
|
| | |
|
| | | /**
|
| | | * 分享奖励到账金额
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getRewardMoneyByShare(Long uid);
|
| | |
|
| | | /**
|
| | | * 下级产生奖励到账金额
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getRewardMoneyByInvite(Long uid);
|
| | |
|
| | | /**
|
| | | * 有效一级队员定义:2019年1月1日起(date),自购或分享1笔且付款总金额不小于 payment 元(退款为失效
|
| | | * @param uid
|
| | | * @param date
|
| | | * @param payment
|
| | | * @return
|
| | | */
|
| | | public long countValidOrderTeamUserByUid(Long uid, Long time, BigDecimal payment);
|
| | |
|
| | | /**
|
| | | * 统计不同时间:奖励
|
| | | * @param uid
|
| | | * @param dateType
|
| | | * @param hbType
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getRewardMoneyToCount(Long uid, Integer dateType, Integer hbType, List<Integer> listSource);
|
| | |
|
| | | /**
|
| | | * 统计红包个数
|
| | | * @param uid
|
| | | * @param type 红包类型
|
| | | * @return
|
| | | */
|
| | | public long getHongBaoCount(Long uid, Integer type);
|
| | |
|
| | | /**
|
| | | * 筛选结果页顶部统计
|
| | | * @param uid
|
| | | * @param dateType
|
| | | * @param hbType
|
| | | * @param orderState
|
| | | * @param orderNo
|
| | | * @param source
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer hbType, Integer orderState, String orderNo,
|
| | | Integer moneyState, String startTime, String endTime, List<Integer> listSource);
|
| | |
|
| | | |
| | | public Integer countOrderByTypeAndDate(Integer orderType, String preDay); |
| | |
|
| | | }
|
| | | * 统计历史总到账金额 |
| | | * |
| | | * @param uid |
| | | * @param state |
| | | * @return |
| | | */ |
| | | public BigDecimal countMoneyByUidAndState(Long uid, Integer state); |
| | | |
| | | /** |
| | | * 统计历史红包数量 |
| | | * |
| | | * @param uid |
| | | * @param state |
| | | * @return |
| | | */ |
| | | public Integer countNumberByUidAndState(Long uid, Integer state); |
| | | |
| | | /** |
| | | * 统计用户红包数量 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public Integer countNumberByUid(Long uid); |
| | | |
| | | |
| | | /** |
| | | * 统计提成订单数量 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public int getTotalTiChengCount(Long uid); |
| | | |
| | | /** |
| | | * 统计未失效订单数量 |
| | | * |
| | | * @param uid |
| | | * @param dateType |
| | | * @return |
| | | */ |
| | | public long countValidNumberByUid(Long uid, Integer dateType); |
| | | |
| | | /** |
| | | * 统计未到账金额 |
| | | * |
| | | * @param uid |
| | | * @param dateType |
| | | * @return |
| | | */ |
| | | public BigDecimal countWillGetMoneyByUid(Long uid); |
| | | |
| | | /** |
| | | * 最后一次下单时间 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public Date getLastHongBaoTime(Long uid); |
| | | |
| | | |
| | | /** |
| | | * 查询邀请=分享奖金 |
| | | * |
| | | * @param start |
| | | * @param count |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public List<HongBaoV2VO> listShareAndInviteMoney(long start, int count, String date); |
| | | |
| | | /** |
| | | * 奖励券金额 |
| | | * |
| | | * @return |
| | | */ |
| | | public BigDecimal countRebateCouponMoney(); |
| | | |
| | | /** |
| | | * 统计返利订单 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public long countRebateOrder(Long uid); |
| | | |
| | | /** |
| | | * 统计分享+ 邀请订单 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public long countShareOrInviteOrder(Long uid); |
| | | |
| | | /** |
| | | * 统计已到账 |
| | | * |
| | | * @param uid |
| | | * @param typeList |
| | | * @param minGetTime |
| | | * @param maxGetTime |
| | | * @return |
| | | */ |
| | | public BigDecimal sumAlreadyGetMoneyByUid(Long uid, List<Integer> typeList, Date minGetTime, Date maxGetTime); |
| | | |
| | | public long countAlreadyGetMoneyByUid(Long uid, List<Integer> typeList, Date minGetTime, Date maxGetTime); |
| | | |
| | | /** |
| | | * 查询来源该下级成功分享 + 自购订单 |
| | | * @param uid |
| | | * @param teamUid |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | public BigDecimal getOrderRewardByTeamUid(Long uid, Long teamUid, Date endTime); |
| | | |
| | | /** |
| | | * 统计该下级成功分享 + 自购订单 |
| | | * @param uid |
| | | * @param teamUid 下级id |
| | | * @return |
| | | */ |
| | | public BigDecimal getOrderRewardByTeamUidTheMonth(Long uid, Long teamUid); |
| | | |
| | | /** |
| | | * 自购返利到账金额 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public BigDecimal getRewardMoneyBySelf(Long uid); |
| | | |
| | | /** |
| | | * 分享奖励到账金额 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public BigDecimal getRewardMoneyByShare(Long uid); |
| | | |
| | | /** |
| | | * 下级产生奖励到账金额 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public BigDecimal getRewardMoneyByInvite(Long uid); |
| | | |
| | | |
| | | /** |
| | | * 统计不同时间:奖励 |
| | | * @param uid |
| | | * @param dateType |
| | | * @param hbType |
| | | * @return |
| | | */ |
| | | public BigDecimal getRewardMoneyToCount(Long uid, Integer dateType, Integer hbType, List<Integer> listSource); |
| | | |
| | | /** |
| | | * 统计红包个数 |
| | | * @param uid |
| | | * @param type 红包类型 |
| | | * @return |
| | | */ |
| | | public long getHongBaoCount(Long uid, Integer type); |
| | | |
| | | /** |
| | | * 筛选结果页顶部统计 |
| | | * @param uid |
| | | * @param dateType |
| | | * @param hbType |
| | | * @param orderState |
| | | * @param orderNo |
| | | * @param source |
| | | * @param startTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer hbType, Integer orderState, String orderNo, |
| | | Integer moneyState, String startTime, String endTime, List<Integer> listSource); |
| | | |
| | | |
| | | public Long countOrderByTypeAndDate(Integer orderType, String preDay); |
| | | |
| | | /** |
| | | * 统计订单数量 |
| | | * @param uid |
| | | * @param time 下单开始时间 |
| | | * @param payment 付款金额 |
| | | * @param type 订单类型 |
| | | * @return |
| | | */ |
| | | public long countMyDirectOrderByCashArrival(Long uid, BigDecimal payment); |
| | | |
| | | /** |
| | | * 统计订单数量 |
| | | * @param uid |
| | | * @param time 下单开始时间 |
| | | * @param payment 付款金额 |
| | | * @param type 订单类型 1自购 2分享 |
| | | * @return |
| | | */ |
| | | public long countMyDirectOrderByCashArrival(Long uid, BigDecimal payment, Integer type); |
| | | |
| | | |
| | | |
| | | public BigDecimal geBonusByuid(Long uid, Integer dateType, Integer hbType, Integer moneyState); |
| | | |
| | | /** |
| | | * 统计近日到账收入金额 |
| | | * @param uid |
| | | * @param day |
| | | * @return |
| | | */ |
| | | public BigDecimal sumMoneyArrivalByUidAndNearDay(Long uid, int day); |
| | | |
| | | /** |
| | | * 统计收货金额 |
| | | * @param uid |
| | | * @param minDate |
| | | * @param maxDate |
| | | * @return |
| | | */ |
| | | public BigDecimal sumMoneyBySettleTimeAndUid(Long uid, Date minDate, Date maxDate); |
| | | |
| | | |
| | | /** |
| | | * 180天内未收货的金额 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public BigDecimal sumMoneyByANotSettleAndUid(Long uid); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 统计已到账订单数量 |
| | | * @param uid |
| | | * @param payment -付款金额 |
| | | * @param type -类型: 1自购 2分享 3邀请 4自购+分享 |
| | | * @param dateType 1本月 |
| | | * @return |
| | | */ |
| | | public long countOrderByCashArrival(Long uid, BigDecimal payment, Integer type, Integer dateType); |
| | | |
| | | /** |
| | | * 统计未到账订单数量 |
| | | * @param uid |
| | | * @param payment -付款金额 |
| | | * @param type -类型: 1自购 2分享 3邀请 4自购+分享 |
| | | * @param dateType 1本月 |
| | | * @return |
| | | */ |
| | | public long countOrderByCashNotArrival(Long uid, BigDecimal payment, Integer type, Integer dateType); |
| | | |
| | | } |