This commit is contained in:
panda
2024-06-06 20:36:50 +08:00
parent 14c5b453b6
commit 41b61ebf1e
19 changed files with 41 additions and 288 deletions

View File

@@ -10,9 +10,9 @@ import (
"pandax/kit/biz"
"pandax/kit/model"
"pandax/kit/restfulx"
"pandax/kit/utils"
"pandax/pkg/cache"
"pandax/pkg/global"
model2 "pandax/pkg/global/model"
"strings"
"pandax/apps/device/entity"
@@ -107,7 +107,7 @@ func (p *ProductApi) GetProduct(rc *restfulx.ReqCtx) {
func (p *ProductApi) InsertProduct(rc *restfulx.ReqCtx) {
var data entity.Product
restfulx.BindJsonAndValid(rc, &data)
data.Id = model2.GenerateID()
data.Id = utils.GenerateID()
data.Owner = rc.LoginAccount.UserName
data.OrgId = rc.LoginAccount.OrganizationId
// 如果未设置规则链,默认为主链