代码列子: public ActionResult FindUserByUserId(SysMessageDTO model) { CustomResultMsg customResult = new CustomResultMsg() { ResultValue = 1 }; try { RecordLogExtension.WriteError(model.DateTimeFrom.ToString()+model.DateTimeTo.ToString()); var data = use