This commit is contained in:
PandaX-Go
2024-08-25 19:58:05 +08:00
parent 96e2500fad
commit 77ac18c21b
157 changed files with 249 additions and 5190 deletions

View File

@@ -1,11 +1,11 @@
package api
import (
"github.com/PandaXGO/PandaKit/biz"
"github.com/PandaXGO/PandaKit/restfulx"
"github.com/PandaXGO/PandaKit/utils"
"pandax/apps/device/entity"
"pandax/apps/device/services"
"pandax/kit/biz"
"pandax/kit/restfulx"
"pandax/kit/utils"
"strings"
)
@@ -80,7 +80,7 @@ func (p *DeviceGroupApi) GetDeviceGroup(rc *restfulx.ReqCtx) {
func (p *DeviceGroupApi) InsertDeviceGroup(rc *restfulx.ReqCtx) {
var data entity.DeviceGroup
restfulx.BindJsonAndValid(rc, &data)
data.Id = utils.GenerateID()
data.Id = utils.GenerateID("dg")
data.Owner = rc.LoginAccount.UserName
data.OrgId = rc.LoginAccount.OrganizationId
p.DeviceGroupApp.Insert(data)