From 327bbb65ea576d10b79b4d196d847202ad572fc0 Mon Sep 17 00:00:00 2001 From: dorlolo <428192774@qq.com> Date: Thu, 9 Mar 2023 15:10:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/dao/artistInfo_user.go | 1 + cmd/internal/dao/artistinfo_artshow_artistIndex.go | 2 +- cmd/internal/dao/artistinfo_artwork.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/internal/dao/artistInfo_user.go b/cmd/internal/dao/artistInfo_user.go index a4be462..3f4ec6e 100644 --- a/cmd/internal/dao/artistInfo_user.go +++ b/cmd/internal/dao/artistInfo_user.go @@ -286,6 +286,7 @@ func ArtistSupplyList(req *artistInfoUser.ArtistSupplyListRequest) (rep *artistI } func UserLock(req *artistInfoUser.UserLockRequest) (rep *artistInfoUser.UserLockRespond, err error) { + rep = &artistInfoUser.UserLockRespond{} var tx = db.DB.Model(model.User{}).Begin() switch { case req.Id != 0: diff --git a/cmd/internal/dao/artistinfo_artshow_artistIndex.go b/cmd/internal/dao/artistinfo_artshow_artistIndex.go index afe4665..c373b49 100644 --- a/cmd/internal/dao/artistinfo_artshow_artistIndex.go +++ b/cmd/internal/dao/artistinfo_artshow_artistIndex.go @@ -61,7 +61,7 @@ func (a artistinfoArtshowArtistIndex) DeletedData(id ...int64) (err error) { } func (a artistinfoArtshowArtistIndex) GetData(id int64) (data *model.ArtshowArtistIndex, err error) { - err = db.DB.Where("id = ?", id).First(data).Error + err = db.DB.Where("id = ?", id).First(&data).Error return } diff --git a/cmd/internal/dao/artistinfo_artwork.go b/cmd/internal/dao/artistinfo_artwork.go index c6409af..340aa84 100644 --- a/cmd/internal/dao/artistinfo_artwork.go +++ b/cmd/internal/dao/artistinfo_artwork.go @@ -128,7 +128,7 @@ func GetArtworkLockRecords(req *artistInfoArtwork.GetArtworkLockRecordsRequest) case artistInfoArtwork.ArtworkQueryMode_NowPreSaveAndLocked: //当前暂存和已锁定的画作(也就是用户端画作管理中的数据) tx = tx.Where("status =1 OR status =2") case artistInfoArtwork.ArtworkQueryMode_NowAuditFlowOfBase: //当前处于基本信息审批阶段的画作(包括进入其它流程的画作) - tx = tx.Where("status = 2") // AND audit_flow_index = 2 + tx = tx.Where("status = 2 ") // AND audit_flow_index = 2 case artistInfoArtwork.ArtworkQueryMode_NowAuditFlowOfSupplementing: //当前处于补充信息审批阶段的画作 tx = tx.Where("status =2 AND audit_flow_index = 3") case artistInfoArtwork.ArtworkQueryMode_AllUnlockArtwork: //所有已解锁的画作(历史画作)