Kaynağa Gözat

用户管理字段修改,地区添加,修改,删除

duhongyu 6 yıl önce
ebeveyn
işleme
13b4ed5906

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -51,7 +51,7 @@ namespace CallCenterApi.Interface.Controllers
51 51
                         parentid = dModel.F_ParentId,
52 52
                         parentname = dModel.F_ParentName,
53 53
                         remark = dModel.F_Remark,
54
-                        layer=dModel .F_Layer,
54
+                        layerType=dModel .F_Layer,
55 55
                         //部门类型0不区分1大区2分公司
56 56
                         //    headerid = dModel.F_Header,    //部门权限范围:9全部,1区域,2项目,3期
57 57
                         //   TypeId = dModel.F_Type,    //部门操作权限:1接待部,2办理人员,3区域客服,4监管

+ 10 - 16
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/RegionCategoryController.cs

@@ -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>

+ 3 - 15
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/RegionCategoryInput.cs

@@ -39,22 +39,10 @@ namespace CallCenterApi.Interface.Models.Input
39 39
             set;
40 40
             get;
41 41
         }
42
-        public class RegionCategoryList
42
+        public int? F_Layer
43 43
         {
44
-        
45
-            public int regionid { get; set; }
46
-            /// <summary>
47
-            ///
48
-            /// </summary>
49
-            public string regionname { get; set; }
50
-            /// <summary>
51
-            ///
52
-            /// </summary>
53
-            public int? layer { get; set; }
54
-            /// <summary>
55
-            /// 
56
-            /// </summary>
57
-            public int ?  parentid{ get; set; }
44
+            set;
45
+            get;
58 46
         }
59 47
     }
60 48
 }