mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 21:03:26 +08:00
【修复】修复后端可以设置用户自身为自身推荐人的问题。
This commit is contained in:
@@ -993,7 +993,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
[Description("修改余额提交")]
|
||||
public async Task<AdminUiCallBack> DoEditBalance([FromBody] FMUpdateUserBalance entity)
|
||||
{
|
||||
var jm = await _coreCmsUserServices.UpdateBalance(entity.id, entity.balance,entity.memo);
|
||||
var jm = await _coreCmsUserServices.UpdateBalance(entity.id, entity.balance, entity.memo);
|
||||
return jm;
|
||||
}
|
||||
|
||||
@@ -1103,6 +1103,12 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
{
|
||||
var jm = new AdminUiCallBack();
|
||||
|
||||
if (entity.id == entity.parentId)
|
||||
{
|
||||
jm.msg = "禁止设置自己为自己的推荐人";
|
||||
return jm;
|
||||
}
|
||||
|
||||
var model = await _coreCmsUserServices.QueryByIdAsync(entity.id);
|
||||
if (model == null)
|
||||
{
|
||||
@@ -1119,7 +1125,6 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
return jm;
|
||||
}
|
||||
|
||||
|
||||
if (parentObj.parentId == model.id)
|
||||
{
|
||||
jm.msg = "不允许双方互相设置为上级";
|
||||
|
||||
Reference in New Issue
Block a user