//UpdateSolution 更新判题结果 func (this *solution) UpdateSolution() { sid, err := strconv.Atoi(strconv.Itoa(this.Sid)) solutionModel := model.SolutionModel{} ori, err := solutionModel.Detail(sid) if err != nil { logger.Println(err) return } ori.Judge = this.Judge ori.Time = this.Time ori.Memory = this.Memory ori.Sim = this.Sim ori.Sim_s_id = this.Sim_s_id ori.Error = this.Error err = solutionModel.Update(sid, *ori) if err != nil { logger.Println(err) return } }