public async Task <IActionResult> Create(DepartmentModel model) { if (!ModelState.IsValid) { return(Operation(false, "数据验证失败;" + GetErrorFromModelStateStr(), model.GoBackUrl)); } Department module = model.MapTo <Department>(); module.CreatorTime = DateTime.Now; module.CreatorUserId = CurrentUser().Id; var r = await DepartmentApp.CreateAsync(module); return(Json(r)); }