From f53370401fd9678a392cd551476de9fc51525c1f Mon Sep 17 00:00:00 2001 From: tangchangquan <792209833@qq.com> Date: Fri, 13 Aug 2021 16:13:37 +0800 Subject: [PATCH] =?UTF-8?q?update=E2=80=94=E2=80=94=E7=99=BE=E5=BA=A6?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=AE=A1=E6=A0=B8=E9=94=99=E8=AF=AF=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/logic/short/short.go | 6 +++++- app/model/short/short.go | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/logic/short/short.go b/app/logic/short/short.go index 701f726..23f9efa 100644 --- a/app/logic/short/short.go +++ b/app/logic/short/short.go @@ -69,7 +69,11 @@ func videoAudit(id uint, name string, video string, exid string) { rest := b.VideoAudit(name, video, exid) fmt.Println(rest, "=========") if rest.Conclusion != "合规" { - (&short.Short{}).GetDb().Model(&short.Short{}).Where("id=?", id).Update("compliance", 1) + var st = short.Short{ + Compliance: 1, + Emg: rest.ErrorMsg, + } + (&short.Short{}).GetDb().Model(&short.Short{}).Where("id=?", id).Updates(&st) } } diff --git a/app/model/short/short.go b/app/model/short/short.go index 622a8ee..8e6914c 100644 --- a/app/model/short/short.go +++ b/app/model/short/short.go @@ -20,6 +20,7 @@ type Short struct { IsDel int `gorm:"column:is_del" json:"isDel"` Compliance int `gorm:"column:compliance" json:"compliance"` Pass int `gorm:"column:pass" json:"pass"` + Emg string `gorm:"column:emg" json:"emg"` } // 插入