|
|
@@ -172,22 +172,20 @@ namespace CallCenterApi.Interface.Controllers.customer
|
|
172
|
172
|
[HttpPost]
|
|
173
|
173
|
public ActionResult AddRegion(RegionCategoryInput input)
|
|
174
|
174
|
{
|
|
175
|
|
- ActionResult res = NoToken("未知错误,请重新登录");
|
|
176
|
|
- if (Request.IsAuthenticated)
|
|
177
|
|
- {
|
|
|
175
|
+
|
|
178
|
176
|
Model.T_RegionCategory dModel = new Model.T_RegionCategory();
|
|
179
|
177
|
dModel.F_ParentId = input.F_ParentId;
|
|
180
|
178
|
dModel.F_Sort = input.F_Sort;
|
|
181
|
179
|
dModel.F_RegionName = input.F_RegionName;
|
|
182
|
180
|
dModel.F_DeleteFlag = 0;
|
|
|
181
|
+ dModel.F_Layer = input.F_Layer;
|
|
183
|
182
|
dModel.F_CreateBy = CurrentUser.UserData.F_UserId;
|
|
184
|
183
|
dModel.F_CreateOn = DateTime.Now;
|
|
185
|
184
|
if (regionBLL.Add(dModel) > 0)
|
|
186
|
|
- res = Success("添加成功");
|
|
|
185
|
+ return Success("添加成功");
|
|
187
|
186
|
else
|
|
188
|
|
- res = Success("添加失败");
|
|
189
|
|
- }
|
|
190
|
|
- return res;
|
|
|
187
|
+ return Success("添加失败");
|
|
|
188
|
+
|
|
191
|
189
|
}
|
|
192
|
190
|
|
|
193
|
191
|
/// <summary>
|
|
|
@@ -198,8 +196,7 @@ namespace CallCenterApi.Interface.Controllers.customer
|
|
198
|
196
|
[HttpPost]
|
|
199
|
197
|
public ActionResult EditRegion(RegionCategoryInput input)
|
|
200
|
198
|
{
|
|
201
|
|
- if (Request.IsAuthenticated)
|
|
202
|
|
- {
|
|
|
199
|
+
|
|
203
|
200
|
if (input.F_RegionId <= 0)
|
|
204
|
201
|
return Error("请选择要编辑的地市");
|
|
205
|
202
|
BLL.T_RegionCategory dBLL = new BLL.T_RegionCategory();
|
|
|
@@ -209,14 +206,13 @@ namespace CallCenterApi.Interface.Controllers.customer
|
|
209
|
206
|
dModel.F_ParentId = input.F_ParentId;
|
|
210
|
207
|
dModel.F_Sort = input.F_Sort;
|
|
211
|
208
|
dModel.F_RegionName = input.F_RegionName;
|
|
212
|
|
-
|
|
|
209
|
+ dModel.F_Layer = input.F_Layer;
|
|
213
|
210
|
dModel.F_ModifyBy = CurrentUser.UserData.F_UserId;
|
|
214
|
211
|
dModel.F_ModifyOn = DateTime.Now;
|
|
215
|
212
|
if (dBLL.Update(dModel))
|
|
216
|
213
|
return Success("编辑成功");
|
|
217
|
214
|
return Error("编辑失败");
|
|
218
|
|
- }
|
|
219
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
215
|
+
|
|
220
|
216
|
}
|
|
221
|
217
|
|
|
222
|
218
|
/// <summary>
|
|
|
@@ -226,8 +222,7 @@ namespace CallCenterApi.Interface.Controllers.customer
|
|
226
|
222
|
/// <returns></returns>
|
|
227
|
223
|
public ActionResult DelRegion(string[] ids)
|
|
228
|
224
|
{
|
|
229
|
|
- if (Request.IsAuthenticated)
|
|
230
|
|
- {
|
|
|
225
|
+
|
|
231
|
226
|
if (ids == null || ids.Length <= 0)
|
|
232
|
227
|
return Error("请选择要删除的地市");
|
|
233
|
228
|
|
|
|
@@ -238,8 +233,7 @@ namespace CallCenterApi.Interface.Controllers.customer
|
|
238
|
233
|
if (regionBLL.DeleteList(idStr))
|
|
239
|
234
|
return Success("删除成功");
|
|
240
|
235
|
return Error("删除失败");
|
|
241
|
|
- }
|
|
242
|
|
- return NoToken("未知错误,请重新登录");
|
|
|
236
|
+
|
|
243
|
237
|
}
|
|
244
|
238
|
|
|
245
|
239
|
/// <summary>
|