Browse Source

剩料提交

baishaojie 9 months ago
parent
commit
cddcac5f64
2 changed files with 7 additions and 0 deletions
  1. BIN
      __debug_bin.exe
  2. 7 0
      http/handle/api/surplus.go

BIN
__debug_bin.exe


+ 7 - 0
http/handle/api/surplus.go

@@ -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
 	}