fix:修改用户素材表时间结构
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"fusenapi/model/gmodel"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
|
||||
"gorm.io/gorm"
|
||||
|
||||
"fusenapi/server/product-template-tag/internal/svc"
|
||||
@@ -56,7 +57,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu
|
||||
productTemplateTags, err = l.svcCtx.AllModels.FsProductTemplateTags.GetList(l.ctx, 1, req.Limit, 0, 1, "`id` DESC")
|
||||
} else {
|
||||
//元数据是空的
|
||||
if userMaterial.Metadata == nil || *userMaterial.Metadata == "" {
|
||||
if userMaterial.Metadata == nil {
|
||||
// 返回固定模板标签列表
|
||||
productTemplateTags, err = l.svcCtx.AllModels.FsProductTemplateTags.GetList(l.ctx, 1, req.Limit, 0, 1, "`id` DESC")
|
||||
} else {
|
||||
|
||||
@@ -6,9 +6,10 @@ import (
|
||||
"fusenapi/constants"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
|
||||
"gorm.io/gorm"
|
||||
|
||||
"context"
|
||||
|
||||
"fusenapi/server/render/internal/svc"
|
||||
@@ -52,7 +53,7 @@ func (l *GetFaceSliceLogic) GetFaceSlice(req *types.Request, userinfo *auth.User
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user material info")
|
||||
}
|
||||
if materialInfo.Metadata == nil || *materialInfo.Metadata == "" {
|
||||
if materialInfo.Metadata == nil {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "user material info`Metadata is empty")
|
||||
}
|
||||
var info map[string]interface{}
|
||||
|
||||
@@ -182,9 +182,10 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
|
||||
return resp.SetStatus(basic.CodeServiceErr, fmt.Sprintf("算法请求--LOGO信息--错误:%+v", err))
|
||||
}
|
||||
resultStr = resLogoStandard.Res
|
||||
resultStrB := []byte(resultStr)
|
||||
|
||||
var module = "logo"
|
||||
var nowTime = time.Now().UTC().Unix()
|
||||
var nowTime = time.Now().UTC()
|
||||
// 新增记录
|
||||
userMaterialModel := gmodel.NewFsUserMaterialModel(l.svcCtx.MysqlConn)
|
||||
_, err = userMaterialModel.CreateOrUpdate(l.ctx, &gmodel.FsUserMaterial{
|
||||
@@ -193,7 +194,7 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
|
||||
GuestId: &guestId,
|
||||
ResourceId: &uploadRes.ResourceId,
|
||||
ResourceUrl: &uploadRes.ResourceUrl,
|
||||
Metadata: &resultStr,
|
||||
Metadata: &resultStrB,
|
||||
CreateAt: &nowTime,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user