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

@@ -4,8 +4,8 @@ import (
"pandax/kit/biz"
"pandax/kit/model"
"pandax/kit/restfulx"
"pandax/kit/utils"
"pandax/pkg/global"
model2 "pandax/pkg/global/model"
"strings"
"pandax/apps/device/entity"
@@ -58,7 +58,7 @@ func (p *ProductTemplateApi) GetProductTemplate(rc *restfulx.ReqCtx) {
func (p *ProductTemplateApi) InsertProductTemplate(rc *restfulx.ReqCtx) {
var data entity.ProductTemplate
restfulx.BindJsonAndValid(rc, &data)
data.Id = model2.GenerateID()
data.Id = utils.GenerateID()
if data.Classify == entity.ATTRIBUTES_TSL || data.Classify == entity.TELEMETRY_TSL {
// 向超级表及子表中添加字段
len := 100