package com.yeshi.fanli.service.inter.hongbao;
|
|
import java.math.BigDecimal;
|
import java.util.List;
|
import java.util.Map;
|
|
import com.yeshi.fanli.entity.admin.OrderAdmin;
|
import com.yeshi.fanli.entity.bus.user.HongBao;
|
import com.yeshi.fanli.entity.bus.user.HongBaoExtra;
|
import com.yeshi.fanli.entity.bus.user.Order;
|
import com.yeshi.fanli.entity.bus.user.UserInfo;
|
import com.yeshi.fanli.entity.taobao.OrderVital;
|
import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
|
public interface HongBaoService {
|
|
public List<HongBaoExtra> getHongBao(long uid);
|
|
public HongBao getHongBaoById(long hid);
|
|
public List<HongBao> getHongBaoByUidAndState(long uid, int state);
|
|
public List<HongBao> getHongBaoList(int i, String state);
|
|
public int getCount(String state);
|
|
public Boolean success(OrderVital ov);
|
|
// public HongBao getHongBaoByOid(long oid);
|
/**
|
* @param id
|
* 用户ID
|
* @return 当前用户得到的总金额
|
*/
|
public BigDecimal getTotalHongBaoByUid(long id);
|
|
/**
|
*
|
* 方法说明: 获得我的余额
|
*
|
* @author mawurui createTime 2018年5月17日 下午4:34:15
|
* @param id
|
* @return
|
*/
|
public BigDecimal getMyTotalHongBaoByUid(long id);
|
|
/**
|
* @param id
|
* 用户ID
|
* @return 当前用户未打开红包金额
|
*/
|
public BigDecimal getUnOpenHongBaoByUid(long id);
|
|
/**
|
* 设置一个新人红包给当前用户
|
*
|
* @param form
|
* 用户
|
* @param type
|
* 1.注册 2.下首单
|
*/
|
public void setNewUserHongBao(UserInfo form, int type);
|
|
public void setNewUserHongBaoMyBatis(UserInfo form, int type);
|
|
public List<OrderAdmin> getOrderAdminList(int pageIndex, String key);
|
|
public List<HongBao> getHongBaoList(int pageIndex, long uid);
|
|
public int getCount(long uid);
|
|
public BigDecimal getCanOpenHongBaoByUid(long id);
|
|
public HongBao getUnOPenHongBao(long id);
|
|
/**
|
* 修改红包金额
|
*
|
* @param order
|
* 订单
|
* @param auctionId
|
* 商品ID
|
* @param hb
|
* 红包金额
|
* @param hongBao
|
* 红包
|
*/
|
public void updateHongBaoMoney(Order order, String auctionId, BigDecimal hb, HongBao hongBao);
|
|
/**
|
* 修改分销红包金额
|
*
|
* @param id
|
* 红包ID @
|
*/
|
public void updateSaleHongBao(long id, BigDecimal hb);
|
|
/**
|
* 获取分销红包
|
*
|
* @param id
|
* 红包ID
|
* @return
|
*/
|
public List<HongBao> findSaleHongBaoList(long id);
|
|
public void save(HongBao hongBao);
|
|
public double findThreeSaleMoney(long id);
|
|
public HongBaoExtra open(long hid, String ip);
|
|
/**
|
* 将红包状态改为可领取
|
*
|
* @param hongBao
|
* @return
|
*/
|
public void updateStateGet(HongBao hongBao);
|
|
public void relevantInvalid(long hid);
|
|
public void relevantInvalidVersion2(long hid);
|
|
public List<HongBao> getHongBaoListAll(long uid);
|
|
/**
|
*
|
* @param id
|
* @return
|
*/
|
public List<HongBao> findThreeSaleHongBao(long id);
|
|
/**
|
* 通过订单查找红包
|
*
|
* @param id
|
* @return
|
*/
|
public List<HongBao> findHongBaoByOrderList(long id);
|
|
/**
|
* 查找子红包
|
*
|
* @param id
|
* @return
|
*/
|
public List<HongBao> findChildHongBaoList(long id);
|
|
/**
|
* 修改红包
|
*
|
* @param hb
|
*/
|
public void update(HongBao hb);
|
|
/**
|
* 老版本红包返利
|
*/
|
public void oldVersionFanLi();
|
|
public HongBao getHongBaoByOid(long oid);
|
|
/**
|
* 建立红包与orderItem间的联系
|
*/
|
public void connectHongBaoAndOrderItem();
|
|
public void addHongBao(Order order, TaoBaoOrder taoBaoOrder, Long orderItemId);
|
|
public void updateHongBao(HongBao hongBao, TaoBaoOrder taoBaoOrder);
|
|
/**
|
* 累计提成订单数量(包含无效的订单)
|
*
|
* @param uid
|
* @return
|
*/
|
public int getTotalTiChengCount(Long uid);
|
|
/**
|
* 累计提成
|
*
|
* @param uid
|
* @return
|
*/
|
public BigDecimal getTotalTiChengMoney(Long uid);
|
|
/**
|
* 未到账提成
|
*
|
* @param uid
|
* @return
|
*/
|
public BigDecimal getUnGetTiChengMoney(Long uid);
|
|
/**
|
* 获取提成红包列表
|
*
|
* @param uid
|
* @param page
|
* @return
|
*/
|
public List<HongBao> getTiChengHongBaoList(Long uid, int page);
|
|
/**
|
* 获取提成红包数量
|
*
|
* @param uid
|
* @return
|
*/
|
public long getTiChengHongBaoListCount(Long uid);
|
|
/**
|
* 查询用户所有订单列表
|
*
|
* @param uid
|
* @return
|
*/
|
public List<HongBao> selectOrderByUid(int pageIndex, int pageSize, Long uid, String startTime, String endTime);
|
|
public int countOrderByUid(Long uid, String startTime, String endTime);
|
|
public double countProfitByUid(Long uid, String startTime, String endTime);
|
|
public int getCountByUid(Long uid);
|
|
public Long getCountByUidOrder(Long uid);
|
|
/**
|
* 统计已领取金额 账户历史总收益
|
*
|
* @param uid
|
* @return
|
*/
|
public double countReceiveMoneysByUid(Long uid);
|
|
/**
|
* 查询子级的收益
|
*
|
* @param pid
|
* @return
|
*/
|
public List<HongBao> findChildHongBaoList(Long pid);
|
|
/**
|
* 统计失效订单
|
*
|
* @param uid
|
* @return
|
*/
|
public int getCountCancelByUid(Long uid);
|
|
/**
|
* 根据订单号+付款金额
|
*
|
* @param oid
|
* @param payMoney
|
* @return
|
*/
|
public List<HongBao> queryByOrderIDAndPayMoney(Long oid, BigDecimal payMoney);
|
|
/**
|
* 统计当前用户 的自购订单数量
|
*
|
* @param uid
|
* @param isToday
|
* 统计当天 1 统计今日条件生效
|
* @param isMonth
|
* 统计当月 1 统计当月条件生效 注意:不可与当日同时生效
|
* @return
|
*/
|
public long countByUidSelf(Long uid, Integer isToday, Integer isMonth);
|
|
/**
|
* 统计未领取金额 待入账收益
|
*
|
* @param uid
|
* @return
|
*/
|
public double countForecastMoneysByUid(Long uid);
|
|
/**
|
* 根据id查询
|
*
|
* @param id
|
* @return
|
*/
|
public HongBao selectByPrimaryKey(Long id);
|
|
/**
|
* 最近一次下单时间
|
*
|
* @param uid
|
* @return
|
*/
|
public Long getLastOrderTime(Long uid);
|
|
/**
|
* 根据用户、订单号查询
|
*
|
* @param oid
|
* @param uid
|
* @return
|
*/
|
public List<HongBao> queryByOrderIDAndUid(Long oid, Long uid);
|
|
/**
|
* 查询前3天返利金额总额最高值
|
*
|
* @return
|
*/
|
public Double getMaxMoney(Integer[] typeArray);
|
|
/**
|
* 统计分享邀请总奖励
|
*
|
* @param start
|
* @param count
|
* @param date
|
* @return
|
*/
|
public List<HongBao> listShareAndInviteMoney(long start, int count, String date);
|
|
/**
|
* 根据渠道 统计历史产生的订单数量
|
* @param channel
|
* @return
|
*/
|
public List<Map<String, Object>> countHistoryOderByChannel(String channelArray, Integer type, String year,
|
String startTime, String endTime) throws Exception;
|
|
/**
|
* 根据渠道 统计新增用户24小时内产生的订单数量
|
* @param channel
|
* @return
|
*/
|
public List<Map<String, Object>> count24HOderByChannel(String channel, Integer type, String years,
|
String startTime, String endTime) throws Exception;
|
|
}
|