gorm 字段+1操作
Oct 26, 2021
4 min read
sign_up_num是要增加的字段名,update 后面跟gorm表达式
Update
(
“
sign_up_num
”
,
gorm
.
Expr
(
“
comment_num
+
?”
,
1
))