mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-25 03:48:35 +08:00
大屏
This commit is contained in:
@@ -8,6 +8,7 @@ package api
|
||||
import (
|
||||
"github.com/XM-GO/PandaKit/model"
|
||||
"github.com/XM-GO/PandaKit/restfulx"
|
||||
"github.com/kakuilan/kgo"
|
||||
"strings"
|
||||
|
||||
"pandax/apps/visual/entity"
|
||||
@@ -26,6 +27,8 @@ func (p *VisualScreenApi) GetVisualScreenList(rc *restfulx.ReqCtx) {
|
||||
data.ScreenName = restfulx.QueryParam(rc, "screenName")
|
||||
data.Status = restfulx.QueryParam(rc, "status")
|
||||
|
||||
data.GroupId = int64(restfulx.QueryInt(rc, "groupId", 0))
|
||||
|
||||
list, total := p.VisualScreenApp.FindListPage(pageNum, pageSize, data)
|
||||
|
||||
rc.ResData = model.ResultPage{
|
||||
@@ -46,7 +49,9 @@ func (p *VisualScreenApi) GetVisualScreen(rc *restfulx.ReqCtx) {
|
||||
func (p *VisualScreenApi) InsertVisualScreen(rc *restfulx.ReqCtx) {
|
||||
var data entity.VisualScreen
|
||||
restfulx.BindQuery(rc, &data)
|
||||
|
||||
data.UserId = rc.LoginAccount.UserId
|
||||
data.ScreenId = kgo.KStr.Uniqid("px")
|
||||
data.Creator = rc.LoginAccount.UserName
|
||||
p.VisualScreenApp.Insert(data)
|
||||
}
|
||||
|
||||
@@ -64,3 +69,10 @@ func (p *VisualScreenApi) DeleteVisualScreen(rc *restfulx.ReqCtx) {
|
||||
screenIds := strings.Split(screenId, ",")
|
||||
p.VisualScreenApp.Delete(screenIds)
|
||||
}
|
||||
|
||||
// UpdateScreenStatus 修改状态
|
||||
func (p *VisualScreenApi) UpdateScreenStatus(rc *restfulx.ReqCtx) {
|
||||
var screen entity.VisualScreen
|
||||
restfulx.BindQuery(rc, &screen)
|
||||
p.VisualScreenApp.Update(screen)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user