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