From 4032cbdd5bf8093fc6aaee1c2b8704e61dc1bcdc Mon Sep 17 00:00:00 2001 From: wolter Date: Mon, 12 Aug 2024 11:08:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=EF=BC=8C=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=8F=AF=E4=B8=8D=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/http/entities/backend/app.go | 2 +- app/services/app.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/http/entities/backend/app.go b/app/http/entities/backend/app.go index 5728d8e..2b8c8dd 100644 --- a/app/http/entities/backend/app.go +++ b/app/http/entities/backend/app.go @@ -48,7 +48,7 @@ type AppCreateRequest struct { AppName string `json:"app_name" validate:"required" label:"应用名称"` AppRemark string `json:"app_remark" label:"应用备注"` Status int32 `json:"status" validate:"oneof=0 1 2" label:"应用状态"` - KeyType int32 `json:"key_type" validate:"required" label:"应用密钥类型"` + KeyType int32 `json:"key_type" label:"应用密钥类型"` PublicKey string `json:"public_key" validate:"required" label:"应用公钥"` PrivateKey string `json:"private_key" validate:"required" label:"应用私钥"` MerchantPublicKey string `json:"merchant_public_key" label:"商户公钥"` diff --git a/app/services/app.go b/app/services/app.go index 47e0d4f..87ec3bb 100644 --- a/app/services/app.go +++ b/app/services/app.go @@ -61,7 +61,7 @@ func AppUpdate(app *appmodel.App) (code int) { conn = conn.And(builder.Eq{"Id": app.Id}) if app.AppName != "" { // 编辑页面更新,备注和白名单IP可更新为空 - _, err = repo.AppUpdate(app, conn, "app_remark", "white_ip", "notify_url") + _, err = repo.AppUpdate(app, conn, "app_remark", "white_ip", "notify_url", "key_type", "public_key", "private_key", "merchant_public_key") } else { _, err = repo.AppUpdate(app, conn) }