44 lines
2.0 KiB
C#
44 lines
2.0 KiB
C#
using Store.Contracts.User.Entitys;
|
|
using Store.Contracts.User.Enums;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data.Common;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Store.Contracts.User.Interfaces;
|
|
|
|
public interface IUserService
|
|
{
|
|
/// <summary>交易类型默认地板价,单位:分。</summary>
|
|
int GetDefaultFloorPrice(UserPaymentTypes paymentType);
|
|
/// <summary>设置直属主用户加价,单位:分,不允许传入子账号。</summary>
|
|
void SetUserMarkup(string setterOemId, string userName, UserPaymentTypes paymentType, int markup);
|
|
/// <summary>设置直属下级OEM加价,单位:分。</summary>
|
|
void SetOEMMarkup(string setterOemId, string oemId, UserPaymentTypes paymentType, int markup);
|
|
/// <summary>地板价加上A对B的加价、B对用户的加价,缺失规则按0计算,单位:分。</summary>
|
|
int GetUserFinalPrice(string userName, UserPaymentTypes paymentType);
|
|
/// <summary>批量查询四种最终价格,返回用户名到消费类型、价格(分)的映射。</summary>
|
|
Dictionary<string, Dictionary<UserPaymentTypes, int>> GetUserFinalPrices(IEnumerable<UserEntity> users);
|
|
bool CanAfford(string userName, UserPaymentTypes type, decimal consumeAmount);
|
|
OEMEntity GetOEMByOemId(string oemId, bool isCache = true);
|
|
OEMEntity GetOEMByUserName(string userName, bool isCache = true);
|
|
List<UserEntity> GetOEMUsers(string oemId, bool includeSu = true);
|
|
|
|
List<UserEntity> GetUserAndSubUser(string userName);
|
|
UserEntity GetUserByUserName(string userName);
|
|
bool IsOem(string userName);
|
|
OEMEntity SettleOemFlows(string userName, DbTransaction tarn = null);
|
|
long SettleUserFlows(string userName, DbTransaction tarn = null);
|
|
/// <summary>
|
|
/// 用户消费付款记录
|
|
/// </summary>
|
|
/// <param name="userName"></param>
|
|
/// <param name="orderId"></param>
|
|
/// <param name="type"></param>
|
|
/// <param name="tarn"></param>
|
|
/// <exception cref="Exception"></exception>
|
|
void UserPayment(string userName, string orderId, UserPaymentTypes type, DbTransaction tarn = null);
|
|
}
|