|
@@ -50,6 +50,13 @@ func AddSurplus(c *gin.Context) {
|
|
|
appG.Response(http.StatusOK, e.ERROR, err)
|
|
|
return
|
|
|
}
|
|
|
+ err = tx.Commit()
|
|
|
+ if err != nil {
|
|
|
+ log.Println("AddSurplus-error-8: ", err)
|
|
|
+ appG.Response(http.StatusOK, e.ERROR, err)
|
|
|
+ tx.Rollback()
|
|
|
+ return
|
|
|
+ }
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, true)
|
|
|
return
|
|
|
}
|