From ddb93bae41123405cb1710e2674241af3511572c Mon Sep 17 00:00:00 2001 From: Hiven Date: Thu, 3 Aug 2023 14:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=A8=A1=E5=9D=97--logo?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/home-user-auth/internal/logic/userlogolistlogic.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/home-user-auth/internal/logic/userlogolistlogic.go b/server/home-user-auth/internal/logic/userlogolistlogic.go index b3615e04..fc68b59e 100644 --- a/server/home-user-auth/internal/logic/userlogolistlogic.go +++ b/server/home-user-auth/internal/logic/userlogolistlogic.go @@ -41,7 +41,6 @@ func NewUserLogoListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *User func (l *UserLogoListLogic) UserLogoList(req *types.UserLogoListReq, userinfo *auth.UserInfo) (resp *basic.Response) { // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) // userinfo 传入值时, 一定不为null - // 定义用户ID var userId int64 var guestId int64 @@ -56,14 +55,15 @@ func (l *UserLogoListLogic) UserLogoList(req *types.UserLogoListReq, userinfo *a } userMaterialModel := gmodel.NewFsUserMaterialModel(l.svcCtx.MysqlConn) - userMaterialRSB := userMaterialModel.RowSelectBuilder(nil).Where("module = ?", "logo").Where("user_id = ?", userId).Where("guest_id = ?", guestId).Order("id desc") + userMaterialRSB := userMaterialModel.RowSelectBuilder(nil). + Where("module = ?", "logo").Where("user_id = ?", userId).Where("guest_id = ?", guestId).Order("id desc") list, err := userMaterialModel.FindAll(l.ctx, userMaterialRSB, nil, "") if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { - return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "order not found") + return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "data not found") } logx.Error(err) - return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to get order info") + return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to get data list") } return resp.SetStatus(basic.CodeOK, []interface{}{ list,