修改证书排序

修改插件
pull/236/head
v-me-50 2025-06-17 18:24:04 +08:00
parent 8e2e4918eb
commit b9f457e7ba
3 changed files with 19 additions and 7 deletions

View File

@ -37,10 +37,10 @@ func GetList(search string, p, limit int64) ([]map[string]any, int, error) {
if search != "" {
count, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Count()
data, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Limit(limits).Order("create_time", "desc").Select()
data, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Limit(limits).Order("end_time", "esc").Select()
} else {
count, err = s.Count()
data, err = s.Order("create_time", "desc").Limit(limits).Select()
data, err = s.Order("end_time", "esc").Limit(limits).Select()
}
if err != nil {
return data, 0, err

View File

@ -19,8 +19,9 @@ var (
)
type ActionInfo struct {
Name string `json:"name"`
Description string `json:"description"`
Name string `json:"name"`
Description string `json:"description"`
Params map[string]any `json:"params,omitempty"` // 可选参数
}
type PluginMetadata struct {

View File

@ -12,8 +12,9 @@ import (
)
type ActionInfo struct {
Name string `json:"name"`
Description string `json:"description"`
Name string `json:"name"`
Description string `json:"description"`
Params map[string]any `json:"params,omitempty"`
}
type Request struct {
@ -32,8 +33,18 @@ var pluginMeta = map[string]interface{}{
"description": "部署到多吉云",
"version": "1.0.0",
"author": "主包",
"config": map[string]interface{}{
"access_key": "多吉云 AccessKey",
"secret_key": "多吉云 SecretKey",
},
"actions": []ActionInfo{
{Name: "cdn", Description: "部署到多吉云cdn"},
{
Name: "cdn",
Description: "部署到多吉云cdn",
Params: map[string]any{
"domain": "CDN 域名",
},
},
},
}