IUnionShareService.java 3.71 KB
package com.yoho.unions.server.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yoho.service.model.union.bo.*;
import com.yoho.service.model.union.request.*;
import com.yoho.service.model.union.response.PageResponseBO;
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionShareUserApplyListBo;
import com.yoho.service.model.union.response.UnionShareUserBankListBO;
import com.yoho.unions.dal.model.UnionShareOrders;
import com.yoho.unions.dal.model.UnionShareSettlement;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 联盟红人推广返利
 * Created by mingdan.ge on 2018/5/10.
 */
public interface IUnionShareService {

    /**
     * 订单插入或更新
     */
    void saveOrUpdateOrder(ShareOrderBo bo);

    PageUnionShareOrderRspBO queryUnionShareOrders(UnionShareOrderSearchReqBO reqBO);
    /**
     * 提现结算单状态变更
     * */
    void updateSettlementStatus(ShareSettlementBo bo);

    /**
     * 提现
     */
    BigDecimal addSettlement(Integer uid);

    /**
     * 获取用户可提现金额、已提现金额、是否可以提现
     * */
    ShareUserSettlementInfoBo getUserSettleMentInfo(Integer uid);

    /**
     * 用户登录时获取对应的渠道号
     * @param uid
     * @return
     */
    UnionShareUserBo queryUnionTypeByUid(int uid);

    /**
     * 申请
     * @param req
     * @return
     */
    int userApply(UnionShareUserApplyReqBo req);

    /**
     * 申请状态
     * @param uid
     * @return
     */
    JSONObject checkApply(int uid);

    /**
     * 重置申请状态
     * @param uid
     * @return
     */
    String resetApply(int uid);

    /**
     * 查询绑定银行卡
     * @param uid
     * @return
     */
    UnionShareUserBankBo getBankCard(int uid);

  /**
     * 获取银行列表
     * @return
     */
  List<UnionShareBankBo> getBankList();

  /**
     * 获取银行列表
     * @return
     */
  Map<String,JSONArray> getSocialMediaBasicParams();

  /**
     * 绑定银行卡
     * @param bo
     * @return
     */
  int bindBankCard(UnionShareUserBankBo bo);

  /**
     * 校验银行卡信息
     * @param bo
     * @return
     */
  UnionShareUserBankBo checkAndBuildBankCard(UnionShareUserBankBo bo);

    /**
     * 用户前台获取个人推广近期订单(10个)
     * @param uid
     * @return
     */
    List<UnionShareOrders> queryRecentlyOrderLimitTen(int uid);

    /**
     * 订单明细
     * @param orderCode
     * @return
     */
    ShareOrderBo queryOrderDetail(Integer uid, String orderCode);

    /**
     * 提现记录列表
     * @param unionShareOrderReqBO
     * @return
     */
    PageResponseBO<UnionShareSettlement> querySettlementRecord(UnionShareOrderReqBO unionShareOrderReqBO);

    /**
     * 订单列表
     * @param unionShareOrderReqBO
     * @return
     */
    PageResponseBO<UnionShareOrders> queryOrderList(UnionShareOrderReqBO unionShareOrderReqBO);

    /**
     * 查询用户绑定银行卡信息
     * @param parm
     * @return
     */
    PageResponseBO<UnionShareUserBankListBO> queryUnionShareUserBanks(UnionShareUserBankListReqBo parm);

    /**
     * 作废用户绑定的银行卡
     * @param req
     * @return
     */
    int cancelUserBanks(IdOrIdsBo req);

    /**
     * 拒绝用户申请
     * @param req
     * @return
     */
    int refuseApply(IdOrIdsBo req);

    /**
     * 通过用户申请
     * @param req
     * @return
     */
    int agreeApply(IdOrIdsBo req);

    /**
     * 查询申请记录
     * @param parm
     * @return
     */
    PageResponseBO<UnionShareUserApplyListBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm);
}