package com.yeshi.fanli.service.inter.order;
|
|
import java.math.BigDecimal;
|
import java.util.Date;
|
import java.util.List;
|
|
import com.yeshi.fanli.dto.HongBaoDTO;
|
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
import com.yeshi.fanli.entity.order.CommonOrder;
|
import com.yeshi.fanli.exception.order.HongBaoException;
|
import com.yeshi.fanli.exception.user.UserAccountException;
|
|
public interface HongBaoV2Service {
|
|
public int insert(HongBaoV2 record);
|
|
public int insertSelective(HongBaoV2 record);
|
|
public int updateByPrimaryKey(HongBaoV2 record);
|
|
public int updateByPrimaryKeySelective(HongBaoV2 record);
|
|
public int deleteByPrimaryKey(Long id);
|
|
public HongBaoV2 selectByPrimaryKey(Long id);
|
|
/**
|
* 添加红包
|
*
|
* @param commonOrder
|
* 订单对象
|
* @param type
|
* 类型
|
* @return 0-未添加也未更新 1-只添加 2-只更新 12-有添加也有更新
|
* @throws HongBaoException
|
*/
|
public int addHongBao(List<CommonOrder> commonOrder, int type) throws HongBaoException,UserAccountException ;
|
|
/**
|
* 奖金列表(1.4.9之前的版本)
|
*
|
* @param uid
|
* @param page
|
* @param pageSize
|
* @return
|
*/
|
public List<HongBaoDTO> listJiangJinByUid(Long uid, int page, int pageSize);
|
|
/**
|
* 奖金数量(1.4.9之前的版本)
|
*
|
* @param uid
|
* @return
|
*/
|
public long countJiangJinByUid(Long uid);
|
|
/**
|
* 总共的提成金额
|
*
|
* @param uid
|
* @return
|
*/
|
|
BigDecimal getTotalTiChengMoney(Long uid);
|
|
/**
|
* 获取总的提成笔数
|
*
|
* @param uid
|
* @return
|
*/
|
int getTotalTiChengCount(Long uid);
|
|
/**
|
* 获取还未到账的提成金额
|
*
|
* @param uid
|
* @return
|
*/
|
BigDecimal getUnGetTiChengMoney(Long uid);
|
|
/**
|
* 获取总共返利金额
|
*
|
* @param uid
|
* @return
|
*/
|
BigDecimal getTotalFanLiMoney(Long uid);
|
|
/**
|
* 获取还未到账的金额
|
*
|
* @param uid
|
* @return
|
*/
|
BigDecimal getUnRecievedFanLiMoney(Long uid);
|
|
/**
|
* 尚未到账的金额(根据创建时间)
|
*
|
* @param uid
|
* @param minDate
|
* @param maxDate
|
* @return
|
*/
|
BigDecimal getUnRecievedMoneyWithCreateTime(Long uid, Date minDate, Date maxDate);
|
|
/**
|
* 尚未到账的金额(根据预计领取时间)
|
*
|
* @param uid
|
* @param minDate
|
* @param maxDate
|
* @return
|
*/
|
BigDecimal getUnRecievedMoneyWithPreGetTime(Long uid, Date minDate, Date maxDate);
|
|
/**
|
* 计算资金
|
*
|
* @param uid
|
* @param state
|
* @return
|
*/
|
BigDecimal computeMoneyByUidAndState(Long uid, int state);
|
|
/**
|
* 查询子红包
|
*
|
* @param id
|
* @return
|
*/
|
public List<HongBaoV2> listChildrenById(Long id);
|
|
/**
|
* 查询子红包
|
*
|
* @param idList
|
* @return
|
*/
|
public List<HongBaoV2> listChildrenByIds(List<Long> idList);
|
|
/**
|
* 最近30天内产生过分享订单的用户
|
*
|
* @return
|
*/
|
public List<Long> getUidByNear30DayShareSucceed();
|
|
/**
|
* 让邀请赚失效(根据下级用户ID)
|
*
|
* @param parentUid
|
* @param beiZhu
|
*/
|
public void invalidInviteHongBaoByParentUid(Long parentUid, String beiZhu);
|
|
/**
|
* 根据用户ID,交易ID查询红包信息
|
*
|
* @param sourceType
|
* @param uid
|
* @param tradeIdList
|
* @return
|
*/
|
public List<HongBaoV2> listBySourceTypeAndTradeIdListAndUid(int sourceType, long uid, List<String> tradeIdList);
|
|
/**
|
* 获取首次有效的红包(根据类型与用户ID)
|
*
|
* @param typeList
|
* @param uid
|
* @return
|
*/
|
public HongBaoV2 getFirstValidHongBaoByTypeAndUid(List<Integer> typeList, Long uid);
|
|
/**
|
* 根据ID批量查询
|
*
|
* @param idList
|
* @return
|
*/
|
public List<HongBaoV2> listByIds(List<Long> idList);
|
}
|