diff --git a/model/gmodel/fs_user_material_logic.go b/model/gmodel/fs_user_material_logic.go index c500f71e..842a458e 100644 --- a/model/gmodel/fs_user_material_logic.go +++ b/model/gmodel/fs_user_material_logic.go @@ -58,9 +58,6 @@ func (m *FsUserMaterialModel) RowSelectBuilder(selectData []string) *gorm.DB { // 获取最新记录 func (m *FsUserMaterialModel) FindLatestOne(ctx context.Context, userId int64, guestId int64) (resp FsUserMaterial, err error) { - if userId == 0 && guestId == 0 { - return FsUserMaterial{}, nil - } db := m.db.WithContext(ctx).Model(&FsUserMaterial{}). Where("`user_id` = ? and `guest_id` = ?", userId, guestId). Order("id DESC") diff --git a/server/websocket/internal/logic/ws_render_image_logic.go b/server/websocket/internal/logic/ws_render_image_logic.go index 80b22ab0..9b555e9b 100644 --- a/server/websocket/internal/logic/ws_render_image_logic.go +++ b/server/websocket/internal/logic/ws_render_image_logic.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "errors" + "fmt" "fusenapi/constants" "fusenapi/service/repositories" "fusenapi/utils/curl" @@ -83,7 +84,6 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { logx.Error("invalid format of websocket render image message:template_tag") return } - logx.Info("##########################begin##############################") //获取上传最近的logo userMaterial, err := w.logic.svcCtx.AllModels.FsUserMaterial.FindLatestOne(w.logic.ctx, w.userId, w.guestId) if err != nil { @@ -103,12 +103,10 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_ERR_DATA_FORMAT, "failed to get default logo")) return } - logx.Info("素材:", userMaterialDefault) renderImageData.RenderData.Logo = *userMaterialDefault.ResourceUrl } else { renderImageData.RenderData.Logo = *userMaterial.ResourceUrl } - logx.Info("##########################end##############################") //用户id赋值 renderImageData.RenderData.UserId = w.userId renderImageData.RenderData.GuestId = w.guestId