Commit 5af4f1c3 by Joneq

增加执行关闭

parent b1160282
Showing with 3 additions and 2 deletions
......@@ -97,6 +97,7 @@ func InsertRecord(c context.Context) {
//if !math.IsNaN(CurrentScore64) && CurrentScore64 != 0 {
//}
insertId,err := svc.InsertScores(c,insertScoreMsgRecord)
fmt.Print(c)
fmt.Print(err)
fmt.Print(insertId)
}
......
......@@ -32,8 +32,8 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int
}
}else{
execSql = "update `lie_scores` set `type` = ?, `project_pid` = ?, `project_id` = ?, `total_score` = ?, `current_score` = ?, `weight` = ?, `final_score` = ?, `com_credits_id` = ?, `update_time` = ? where `type` = ? and project_pid = ? and project_id = ? and com_credits_id = ?"
row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,score.ComCreditsId,time.Now().Unix(),score.Type,score.ProjectPid,score.ProjectId,score.ComCreditsId)
execSql = "update `lie_scores` set `type` = ?, `project_pid` = ?, `project_id` = ?, `total_score` = ?, `current_score` = ?, `weight` = ?, `final_score` = ?, `update_time` = ? where `type` = ? and project_pid = ? and project_id = ? and com_credits_id = ?"
row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,time.Now().Unix(),score.Type,score.ProjectPid,score.ProjectId,score.ComCreditsId)
if err != nil {
log.Error("updateScoresdb.DemoExec.Exec(%s) error(%v)", execSql, err)
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment