package com.cyksj.service.user;

import com.cyksj.model.entity.UserBalanceSourceRecord;

import java.math.BigDecimal;

/*
 *项目名: netflix
 *文件名: UserBenefitsService
 *创建者: JavaZou
 *创建时间:2023/5/18 16:06
 */
public interface UserBenefitsService {
	/**
	 * 扣除用户分销积分
	 * @param userId 用户ID
	 * @param deductPoints 扣除积分
	 */
	void deductDistributePoints(Long orderId, Long userId, BigDecimal deductPoints);

	/**
	 * 增加积分
	 */
	void addDistributePoints(Long userId, BigDecimal addPoints);

	/**
	 * 增加用户余额
	 */
	void addUserBalance(Long userId, BigDecimal addBalance, UserBalanceSourceRecord.Source source, Long yhsId, Long orderId, String detail, Boolean isRecord);

	/**
	 * 扣除用户余额
	 */
	void deductUserBalance(Long userId, BigDecimal subBalance);

	/**
	 * 记录用于余额来源
	 */
	void recordBalanceBySource(Long userId, BigDecimal balance, UserBalanceSourceRecord.Source source, Long orderId, String detail, String remark, String operator);

	void addYhsMoney(Long userId, BigDecimal money);

	/**
	 * 扣除店铺主用户 提成金额
	 */
	void deductYhShopTakeMoney(Long orderId, Long shopUserId, BigDecimal deductMoney);

	/**
	 * 返回用户邀请奖励提成
	 */
	void addDistributeSubMoney(Long userId, BigDecimal needApplyMoney);

	/**
	 * 增加镜像加盟商提成金额
	 */
	void addMpMoney(Long userId, BigDecimal money);

	void deductUserMirrorShopTakeMoney(Long orderId, Long shopUserId, BigDecimal deductMoney);
}
