Merge branch 'xjjdev' into dev
This commit is contained in:
commit
219528bbab
@ -294,17 +294,21 @@ func CountArtworkTotalWhichAuditPassed(artistUid string) (rulerPassedTotal int64
|
|||||||
|
|
||||||
// CountAllArtworkTotal 单个统计画家所有的画作数量和平尺数
|
// CountAllArtworkTotal 单个统计画家所有的画作数量和平尺数
|
||||||
func CountAllArtworkTotal(artistUid string) (artworkTotal int64, artworkRulerTotal int64) {
|
func CountAllArtworkTotal(artistUid string) (artworkTotal int64, artworkRulerTotal int64) {
|
||||||
|
//查询画家宝中的画作总数
|
||||||
|
var artworkUids []string
|
||||||
|
db.DB.Model(model.ArtworkLockRecord{}).Where("artist_uid = ?", artistUid).Pluck("artwork_uid", &artworkUids)
|
||||||
|
artworkTotal = int64(len(artworkUids))
|
||||||
//查询此画家的所有画作
|
//查询此画家的所有画作
|
||||||
artworkList, err := service.ArtworkQueryImpl.ArtworkList(context.Background(), &artwork_query.ArtworkListRequest{
|
artworkList, err := service.ArtworkQueryImpl.ArtworkPreviewList(context.Background(), &artwork_query.ArtworkPreviewListRequest{
|
||||||
Page: 1,
|
Page: 1,
|
||||||
PageSize: -1,
|
PageSize: -1,
|
||||||
ArtistUid: artistUid,
|
ArtistUid: artistUid,
|
||||||
|
ArtworkUids: artworkUids,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("画作列表查询失败", err.Error())
|
fmt.Println("画作列表查询失败", err.Error())
|
||||||
return 0, 0
|
return 0, 0
|
||||||
}
|
}
|
||||||
artworkTotal = int64(artworkList.Count)
|
|
||||||
for _, v := range artworkList.Data {
|
for _, v := range artworkList.Data {
|
||||||
artworkRulerTotal += int64(v.Ruler)
|
artworkRulerTotal += int64(v.Ruler)
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ func (a ArtistInfoArtworkLogic) ArtworkStatic(request *artistInfoArtwork.ArtistA
|
|||||||
PageSize: int64(request.PageSize),
|
PageSize: int64(request.PageSize),
|
||||||
Total: total,
|
Total: total,
|
||||||
}
|
}
|
||||||
viewDatas, err := dao.PassedArtworkStatic(request, artistUids)
|
viewDatas, err := dao.PassedArtworkStatic(&artistInfoArtwork.ArtistArtworkStaticRequest{Page: 1, PageSize: -1}, artistUids)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user