mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:43:26 +08:00
【修复】修复设置用户父级发展人序列不能为0的情况。
This commit is contained in:
@@ -1110,11 +1110,18 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
return jm;
|
||||
}
|
||||
|
||||
var parentObj = await _coreCmsUserServices.QueryByIdAsync(entity.parentId);
|
||||
if (parentObj == null)
|
||||
if (entity.parentId > 0)
|
||||
{
|
||||
jm.msg = "不存在此上级信息";
|
||||
return jm;
|
||||
var parentObj = await _coreCmsUserServices.QueryByIdAsync(entity.parentId);
|
||||
if (parentObj == null)
|
||||
{
|
||||
jm.msg = "不存在此上级信息";
|
||||
return jm;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.parentId = 0;
|
||||
}
|
||||
|
||||
var bl = await _coreCmsUserServices.UpdateAsync(p => new CoreCmsUser() { parentId = entity.parentId }, p => p.id == model.id);
|
||||
|
||||
Reference in New Issue
Block a user