yujian
2020-01-18 f4a0f2acc63d7785eab108419a4e16f5f688cb95
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java
@@ -8,6 +8,7 @@
import javax.annotation.Resource;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.yeshi.utils.DateUtil;
@@ -19,6 +20,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 +169,15 @@
      return hongBaoV2CountMapper.countHongBaoType(dateType, type, year, startTime, endTime);
   }
   @Override
   public Integer 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 +248,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 +313,57 @@
      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 countValidOrderTeamUserByUid(Long uid, Long time, BigDecimal payment) {
      return hongBaoV2CountMapper.countValidOrderTeamUserByUid(uid, time, payment);
   }
   @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 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);
   }
}