44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using YLErp.DBModels;
|
|
|
|
namespace YLErp.Modules.SwapModule
|
|
{
|
|
public class SwapRateLogService: YLBaseService
|
|
{
|
|
public SwapRateLogService(OptUserInfo userInfo) : base(userInfo)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// 新增互换费率变更日志
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <exception cref="Exception"></exception>
|
|
public void AddSwapRateLog(int rateType,int rateId,string optType,string changes,string remark)
|
|
{
|
|
SwapRateLog swapRateLog = new SwapRateLog();
|
|
swapRateLog.Changes = changes;
|
|
swapRateLog.RateId = rateId;
|
|
swapRateLog.RateType = rateType;
|
|
swapRateLog.OptType = optType;
|
|
swapRateLog.Remark = remark;
|
|
swapRateLog.SetCreator(UserId,UserName);
|
|
swapRateLog.SetOpt(UserId, UserName);
|
|
DbContext.swap_rate_log.Add(swapRateLog);
|
|
DbContext.SaveChanges();
|
|
}
|
|
/// <summary>
|
|
/// 获取互换费率变更日志信息
|
|
/// </summary>
|
|
/// <param name="rateId"></param>
|
|
/// <returns></returns>
|
|
public List<SwapRateLog> GetSwapRateLogs(int rateId,int rateType)
|
|
{
|
|
return DbContext.swap_rate_log.Where(x=>x.RateId==rateId&&x.RateType==rateType).OrderByDescending(o=>o.create_time).ToList();
|
|
}
|
|
}
|
|
}
|