mirror of
https://github.com/tiger1103/gfast.git
synced 2026-09-21 02:04:07 +00:00
添加任务信息
This commit is contained in:
@@ -69,7 +69,7 @@ func (c *CmsMenu) Add(r *ghttp.Request) {
|
||||
}
|
||||
list := gconv.Maps(menus)
|
||||
list = utils.PushSonToParent(list, 0, "parent_id")
|
||||
typeChecker, err := dict_service.GetDictWithDataByType("cms_category_type")
|
||||
typeChecker, err := dict_service.GetDictWithDataByType("cms_category_type", "")
|
||||
if err != nil {
|
||||
response.FailJson(true, r, err.Error())
|
||||
}
|
||||
@@ -111,7 +111,7 @@ func (c *CmsMenu) Edit(r *ghttp.Request) {
|
||||
}
|
||||
list := gconv.Maps(menus)
|
||||
list = utils.PushSonToParent(list, 0, "parent_id")
|
||||
typeChecker, err := dict_service.GetDictWithDataByType("cms_category_type")
|
||||
typeChecker, err := dict_service.GetDictWithDataByType("cms_category_type", gconv.String(menuInfo.CateType))
|
||||
if err != nil {
|
||||
response.FailJson(true, r, err.Error())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package admin
|
||||
|
||||
import "github.com/gogf/gf/net/ghttp"
|
||||
import (
|
||||
"gfast/app/service/admin/dict_service"
|
||||
"gfast/library/response"
|
||||
"github.com/gogf/gf/frame/g"
|
||||
"github.com/gogf/gf/net/ghttp"
|
||||
)
|
||||
|
||||
type MonitorJob struct{}
|
||||
|
||||
@@ -9,5 +14,18 @@ func (c *MonitorJob) List(r *ghttp.Request) {}
|
||||
|
||||
//添加任务
|
||||
func (c *MonitorJob) Add(r *ghttp.Request) {
|
||||
|
||||
//获取相关选项
|
||||
jobStatus, err := dict_service.GetDictWithDataByType("sys_job_status", "")
|
||||
if err != nil {
|
||||
response.FailJson(true, r, err.Error())
|
||||
}
|
||||
jobGroup, err := dict_service.GetDictWithDataByType("sys_job_group", "")
|
||||
if err != nil {
|
||||
response.FailJson(true, r, err.Error())
|
||||
}
|
||||
res := g.Map{
|
||||
"jobStatus": jobStatus,
|
||||
"jobGroup": jobGroup,
|
||||
}
|
||||
response.SusJson(true, r, "添加任务", res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user