public void DeleteStaffInfo(StaffConfig request, StaffConfigResponse response) { ValidRequest(request, new StaffConfigVaildator(), ruleSet: "Delete"); //验证员工编号是否存在 var staffConfigs = _privilegeRepository.QueryStaffInfo(); if (!(staffConfigs.Any(i => i.STAFFNO == request.StaffNo))) { throw new Utility.WeChatException("STAFF_DELETE_ERROR", "当前员工编号在库中不存在,无法删除"); } _privilegeRepository.DeleteStaffInfo(request.StaffNo); response.ResponseStatus.ErrorCode = "OK"; }