mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:13:26 +08:00
【修复】修复当新增或者删除会员等级后,【签到设置】连续签到规则数据错误,累计签到设置保存无效的问题。
This commit is contained in:
@@ -50,14 +50,17 @@ namespace CoreCms.Net.Services
|
||||
return await _dal.InsertAsync(entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// 获取的所有数据及子集
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<CoreCmsContinuousCheckInRules>> GetCaChe()
|
||||
public async Task<List<CoreCmsContinuousCheckInRules>> GetDataWidthChild()
|
||||
{
|
||||
return await _dal.GetCaChe();
|
||||
return await _dal.GetDataWidthChild();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,24 +39,5 @@ namespace CoreCms.Net.Services
|
||||
_unitOfWork = unitOfWork;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity">实体数据</param>
|
||||
/// <returns></returns>
|
||||
public async Task<AdminUiCallBack> InsertAsync(List<CoreCmsCumulativeCheckInRules> entity)
|
||||
{
|
||||
return await _dal.InsertAsync(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<CoreCmsCumulativeCheckInRules>> GetCaChe()
|
||||
{
|
||||
return await _dal.GetCaChe();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace CoreCms.Net.Services
|
||||
}
|
||||
|
||||
//判断累计签到次数是否满足
|
||||
var cumulativeCheckInRules = await _cumulativeCheckInRulesServices.GetCaChe();
|
||||
var cumulativeCheckInRules = await _cumulativeCheckInRulesServices.QueryAsync(true, true);
|
||||
//获取用户总签到次数(使用userCheckIn的签到次数统计也可以,但是查询实时数据最可靠。根据个人来)
|
||||
//var cumulativeCheckInCount = await _dal.GetCountAsync(p => p.userId == entity.userId);
|
||||
var cumulativeCheckInCount = userCheckIn.cumulativeCheckInCount;
|
||||
@@ -150,7 +150,7 @@ namespace CoreCms.Net.Services
|
||||
|
||||
|
||||
//判断连续签到次数是否满足
|
||||
var continuousCheckInRules = await _continuousCheckInRulesServices.GetCaChe();
|
||||
var continuousCheckInRules = await _continuousCheckInRulesServices.QueryAsync(true, true);
|
||||
//获取用户数据
|
||||
var user = await _userServices.QueryByIdAsync(entity.userId);
|
||||
//获取用户当前已经连续签到的次数
|
||||
|
||||
Reference in New Issue
Block a user