后台,应用可不加密

This commit is contained in:
wolter 2024-08-12 11:08:24 +08:00
parent 18d5f96096
commit 4032cbdd5b
2 changed files with 2 additions and 2 deletions

View File

@ -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:"商户公钥"`

View File

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