|
|
@@ -212,59 +212,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.IndexCategory
|
|
212
|
212
|
return Content(obj.ToJson());
|
|
213
|
213
|
}
|
|
214
|
214
|
}
|
|
215
|
|
- private string Category(int? CategoryId,int type, string key="")
|
|
216
|
|
- {
|
|
217
|
|
- var model = _qc_indexcategoryreposytory.GetSingle(x => x.F_CategoryId == CategoryId).Result;
|
|
218
|
|
- if (model != null)
|
|
219
|
|
- {
|
|
220
|
|
- if (key == "")
|
|
221
|
|
- {
|
|
222
|
|
- if (type == 0)
|
|
223
|
|
- {
|
|
224
|
|
- key = CategoryId + "";
|
|
225
|
|
- if (model .F_ParentId >0)
|
|
226
|
|
- {
|
|
227
|
|
- key +=","+ Category((int )model.F_ParentId, 0, key);
|
|
228
|
|
- }
|
|
229
|
|
- }
|
|
230
|
|
- else
|
|
231
|
|
- {
|
|
232
|
|
- key = model.F_CategoryName ;
|
|
233
|
|
- if (model.F_ParentId > 0)
|
|
234
|
|
- {
|
|
235
|
|
- key += "," + Category((int)model.F_ParentId, 1, key);
|
|
236
|
|
- }
|
|
237
|
|
- }
|
|
238
|
|
- }
|
|
239
|
|
- else
|
|
240
|
|
- {
|
|
241
|
|
- if (type == 0)
|
|
242
|
|
- {
|
|
243
|
|
- if (model.F_ParentId > 0)
|
|
244
|
|
- {
|
|
245
|
|
- key += "," + Category((int)model.F_ParentId, 0, key);
|
|
246
|
|
- }
|
|
247
|
|
- }
|
|
248
|
|
- else
|
|
249
|
|
- {
|
|
250
|
|
- if (model.F_ParentId > 0)
|
|
251
|
|
- {
|
|
252
|
|
- key += "," + Category((int)model.F_ParentId, 1, key);
|
|
253
|
|
- }
|
|
254
|
|
- }
|
|
255
|
|
-
|
|
256
|
|
- }
|
|
257
|
|
- return key;
|
|
258
|
|
-
|
|
259
|
|
- }
|
|
260
|
|
- else
|
|
261
|
|
- return key;
|
|
262
|
|
-
|
|
263
|
|
-
|
|
264
|
|
-
|
|
265
|
|
-
|
|
266
|
|
-
|
|
267
|
|
- }
|
|
|
215
|
+
|
|
268
|
216
|
|
|
269
|
217
|
private string CategoryId(int parentid)
|
|
270
|
218
|
{
|
|
|
@@ -297,10 +245,12 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.IndexCategory
|
|
297
|
245
|
{
|
|
298
|
246
|
return Error("获取失败");
|
|
299
|
247
|
}
|
|
|
248
|
+ List<string> CategoryId = new List<string>();
|
|
|
249
|
+ List<string> F_CategoryName = new List<string>();
|
|
300
|
250
|
var result =new {
|
|
301
|
251
|
|
|
302
|
|
- CategoryId = Category(model.F_CategoryId, 0),
|
|
303
|
|
- F_CategoryName = Category(model.F_CategoryId, 1),
|
|
|
252
|
+ CategoryId = Category(model.F_CategoryId, 0, CategoryId),
|
|
|
253
|
+ F_CategoryName = Category(model.F_CategoryId, 1, F_CategoryName),
|
|
304
|
254
|
model.F_Content,
|
|
305
|
255
|
model.F_Remark,
|
|
306
|
256
|
model.F_Title,
|
|
|
@@ -310,6 +260,27 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.IndexCategory
|
|
310
|
260
|
|
|
311
|
261
|
return Success("获取成功!", result);
|
|
312
|
262
|
}
|
|
|
263
|
+ public List<string> Category(int? CategoryId, int type, List<string> key)
|
|
|
264
|
+ {
|
|
|
265
|
+ var model = _qc_indexcategoryreposytory.GetSingle(x => x.F_CategoryId == CategoryId).Result;
|
|
|
266
|
+ if (type == 0)
|
|
|
267
|
+ {
|
|
|
268
|
+ key.Add("" + CategoryId);
|
|
|
269
|
+ if (model.F_ParentId > 0)
|
|
|
270
|
+ {
|
|
|
271
|
+ key = Category((int)model.F_ParentId, 0, key);
|
|
|
272
|
+ }
|
|
|
273
|
+ }
|
|
|
274
|
+ else
|
|
|
275
|
+ {
|
|
|
276
|
+ key.Add(model.F_CategoryName);
|
|
|
277
|
+ if (model.F_ParentId > 0)
|
|
|
278
|
+ {
|
|
|
279
|
+ key = Category((int)model.F_ParentId, 1, key);
|
|
|
280
|
+ }
|
|
|
281
|
+ }
|
|
|
282
|
+ return key;
|
|
|
283
|
+ }
|
|
313
|
284
|
//设置指标分数
|
|
314
|
285
|
private void SetScoreByCategory(int categoryid, int source, int type=0,int F_Score=0)
|
|
315
|
286
|
{
|