|
|
@@ -56,8 +56,10 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.knowledge
|
|
56
|
56
|
{
|
|
57
|
57
|
var parent = _repositorycategoryreposytory.GetSingle(x => x.F_CategoryId == input.F_ParentId).Result;
|
|
58
|
58
|
if (parent != null)
|
|
59
|
|
- model.F_Expand2 = parent.F_Expand2 += res + "|";
|
|
|
59
|
+ model.F_Expand2 += parent.F_Expand2 + res + "|";
|
|
60
|
60
|
}
|
|
|
61
|
+ var Expand = _repositorycategoryreposytory.Update(model);
|
|
|
62
|
+
|
|
61
|
63
|
}
|
|
62
|
64
|
return Success("添加成功");
|
|
63
|
65
|
}
|
|
|
@@ -84,9 +86,20 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.knowledge
|
|
84
|
86
|
var parent = _repositorycategoryreposytory.GetSingle(x => x.F_CategoryId == input.F_ParentId)
|
|
85
|
87
|
.Result;
|
|
86
|
88
|
if (parent != null)
|
|
87
|
|
- { input.F_Expand1 = parent.F_CategoryName;
|
|
88
|
|
- input.F_Expand2 = parent.F_Expand2 += input.F_CategoryId + "|";
|
|
|
89
|
+ {
|
|
|
90
|
+ string[] Expand = parent.F_Expand2.Split('|');
|
|
|
91
|
+ if (Expand.Contains(input.F_CategoryId.ToString()))
|
|
|
92
|
+ {
|
|
|
93
|
+ return Error("不能选择该分类的上级分类");
|
|
|
94
|
+ }
|
|
|
95
|
+ else
|
|
|
96
|
+ {
|
|
|
97
|
+ input.F_Expand1 = parent.F_CategoryName;
|
|
|
98
|
+ input.F_Expand2 = parent.F_Expand2 += input.F_CategoryId + "|";
|
|
|
99
|
+ }
|
|
|
100
|
+
|
|
89
|
101
|
}
|
|
|
102
|
+
|
|
90
|
103
|
}
|
|
91
|
104
|
input.F_DeleteFlag = 0;
|
|
92
|
105
|
input.F_CreateBy = model.F_CreateBy;
|