public ApiResult <bool> ChangeDivision(ChangeDivisionReqs request) { Wizards wizard = _wizardRepository.Query(request.CreatorId); if (wizard == null) { return(new ApiResult <bool>(ResultStatus.FAIL, "你是谁")); } Divisions division = _divisionRepository.Query(request.DivisionId); if (division == null) { return(new ApiResult <bool>(ResultStatus.FAIL, "找不到该分部")); } division.Change(request.Name, request.CityId, request.CreateTime); if (_divisionRepository.Update(division) <= 0) { return(new ApiResult <bool>(ResultStatus.FAIL, "没有任何更改")); } return(new ApiResult <bool>(ResultStatus.SUCCESS, true)); }