yujian
2020-04-15 c6b718c3cadf5e5fff4c2a47fd1247842439f8c7
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java
@@ -19,6 +19,7 @@
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoWeiQuanOrderMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.order.CommonOrderService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
@@ -167,6 +168,15 @@
      return hongBaoV2CountMapper.countHongBaoType(dateType, type, year, startTime, endTime);
   }
   @Override
   public Long countOrderByTypeAndDate(Integer orderType, String preDay) {
      return hongBaoV2CountMapper.countOrderByTypeAndDate(orderType, preDay);
   }
   @Override
   public List<ChartTDO> getProportionByType(Integer dateType, Integer type, String year, String startTime,
         String endTime) throws Exception {
@@ -237,6 +247,11 @@
   public int getTotalTiChengCount(Long uid) {
      return hongBaoV2CountMapper.getTotalTiChengCount(uid);
   }
   @Override
   public long getHongBaoCount(Long uid,Integer type) {
      return hongBaoV2CountMapper.getHongBaoCount(uid, type);
   }
   @Override
   public long countValidNumberByUid(Long uid, Integer dateType) {
@@ -297,13 +312,89 @@
      return hongBaoV2CountMapper.countAlreadyGetMoneyByUid(uid, typeList, minGetTime, maxGetTime);
   }
   @Override
   public BigDecimal getShareRewardByTeamUid(Long uid, Long teamUid, Date endTime) {
      return hongBaoV2CountMapper.getShareRewardByTeamUid(uid, teamUid, endTime);
   @Override
   public BigDecimal getOrderRewardByTeamUid(Long uid, Long teamUid, Date endTime) {
      return hongBaoV2CountMapper.getOrderRewardByTeamUid(uid, teamUid, endTime);
   }
   
   @Override
   public BigDecimal getShareRewardByTeamUidLastMonth(Long uid, Long teamUid) {
      return hongBaoV2CountMapper.getShareRewardByTeamUidLastMonth(uid, teamUid);
   public BigDecimal getOrderRewardByTeamUidTheMonth(Long uid, Long teamUid) {
      return hongBaoV2CountMapper.getOrderRewardByTeamUidTheMonth(uid, teamUid);
   }
   @Override
   public BigDecimal getRewardMoneyBySelf(Long uid) {
      List<Integer> list = new ArrayList<Integer>();
      list.add(HongBaoV2.TYPE_ZIGOU);
      return hongBaoV2CountMapper.getRewardMoneyByUid(uid, list);
   }
   @Override
   public BigDecimal getRewardMoneyByShare(Long uid) {
      List<Integer> list = new ArrayList<Integer>();
      list.add(HongBaoV2.TYPE_SHARE_GOODS);
      return hongBaoV2CountMapper.getRewardMoneyByUid(uid, list);
   }
   @Override
   public BigDecimal getRewardMoneyByInvite(Long uid) {
      List<Integer> list = new ArrayList<Integer>();
      list.add(HongBaoV2.TYPE_YIJI);
      list.add(HongBaoV2.TYPE_ERJI);
      list.add(HongBaoV2.TYPE_SHARE_YIJI);
      list.add(HongBaoV2.TYPE_SHARE_ERJI);
      return hongBaoV2CountMapper.getRewardMoneyByUid(uid, list);
   }
   @Override
   public long countValidOrderByUidAndTime(Long uid, Long time, BigDecimal payment) {
      Long count = hongBaoV2CountMapper.countValidOrderByUidAndTime(uid, time, payment);
      if (count == null) {
         count = 0L;
      }
      return count;
   }
   @Override
   public long countOrderByUidAndSettled(Long uid, Long time, BigDecimal payment) {
      Long count = hongBaoV2CountMapper.countOrderByUidAndSettled(uid, time, payment);
      if (count == null) {
         count = 0L;
      }
      return count;
   }
   @Override
   public long counOrderByUidAndOrderType(Long uid, BigDecimal payment,int type) {
      Long count = hongBaoV2CountMapper.counOrderByUidAndOrderType(uid, payment, type);
      if (count == null) {
         count = 0L;
      }
      return count;
   }
   @Override
   public BigDecimal getRewardMoneyToCount(Long uid, Integer dateType, Integer hbType, List<Integer> listSource) {
      return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, null, null, null, listSource);
   }
   @Override
   public BigDecimal geBonusByuid(Long uid, Integer dateType, Integer hbType, Integer moneyState) {
       BigDecimal money = hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, moneyState, null, null, null);
       if (money == null) {
          money = new BigDecimal(0);
       }
       return money;
   }
   @Override
   public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer orderType, Integer orderState,
         String orderNo,  Integer moneyState, String startTime,  String endTime, List<Integer> listSource) {
      return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, orderType, orderState, orderNo, moneyState,
            startTime, endTime, listSource);
   }
}