Merge pull request 'by Robin at 20240416' (#296) from dev-feat-IRONFANS-70-Robin into feat-IRONFANS-70
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/296
This commit is contained in:
commit
559f6c1aff
|
@ -8,13 +8,19 @@ import (
|
||||||
|
|
||||||
type ApiZoneVO struct {
|
type ApiZoneVO struct {
|
||||||
*dbstruct.Zone
|
*dbstruct.Zone
|
||||||
StreamerExt *streamerproto.ApiListExtVO `json:"streamer_ext"`
|
AdmissionPrice int64 `json:"admission_price" bson:"admission_price"` // 空间解锁价格, 单位: 分
|
||||||
IsUnreadZoneMomentExist int64 `json:"is_unread_zone_moment_exist"`
|
IronfanshipPrice int64 `json:"ironfanship_price" bson:"ironfanship_price"` // 铁粉解锁价格, 单位: 分
|
||||||
VisitorRole int64 `json:"visitor_role"`
|
IsSuperfanshipEnabled int `json:"is_superfanship_enabled" bson:"is_superfanship_enabled"` // 是否开启超粉空间 0: 关闭, 1: 开启
|
||||||
Previews *dbstruct.MediaComponent `json:"previews"`
|
SuperfanshipPrice int64 `json:"superfanship_price" bson:"superfanship_price"` // 超粉价格, 单位: 分
|
||||||
Expenditure int64 `json:"expenditure"`
|
SuperfanshipValidPeriod int `json:"superfanship_valid_period" bson:"superfanship_valid_period"` // 超粉有效期类型, SuperfanshipValidPeriod*
|
||||||
IsIronfanshipUnlocked int64 `json:"is_ironfanship_unlocked"`
|
IsSuperfanshipGiveWechat int `json:"is_superfanship_give_wechat" bson:"is_superfanship_give_wechat"` // 是否开启超粉空间赠送微信 0: 不赠送, 1: 赠送
|
||||||
IsSuperfanshipUnlocked int64 `json:"is_superfanship_unlocked"`
|
StreamerExt *streamerproto.ApiListExtVO `json:"streamer_ext"`
|
||||||
|
IsUnreadZoneMomentExist int64 `json:"is_unread_zone_moment_exist"`
|
||||||
|
VisitorRole int64 `json:"visitor_role"`
|
||||||
|
Previews *dbstruct.MediaComponent `json:"previews"`
|
||||||
|
Expenditure int64 `json:"expenditure"`
|
||||||
|
IsIronfanshipUnlocked int64 `json:"is_ironfanship_unlocked"`
|
||||||
|
IsSuperfanshipUnlocked int64 `json:"is_superfanship_unlocked"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vo *ApiZoneVO) GetMid() int64 {
|
func (vo *ApiZoneVO) GetMid() int64 {
|
||||||
|
@ -45,3 +51,14 @@ func (vo *ApiZoneVO) SetIsIronfanshipUnlocked(is_ironfanship_unlocked int64) {
|
||||||
func (vo *ApiZoneVO) SetIsSuperfanshipUnlocked(is_superfanship_unlocked int64) {
|
func (vo *ApiZoneVO) SetIsSuperfanshipUnlocked(is_superfanship_unlocked int64) {
|
||||||
vo.IsSuperfanshipUnlocked = is_superfanship_unlocked
|
vo.IsSuperfanshipUnlocked = is_superfanship_unlocked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (vo *ApiZoneVO) CopyZoneVas(zv *dbstruct.ZoneVas) {
|
||||||
|
if zv != nil {
|
||||||
|
vo.AdmissionPrice = zv.AdmissionPrice
|
||||||
|
vo.IronfanshipPrice = zv.IronfanshipPrice
|
||||||
|
vo.IsSuperfanshipEnabled = zv.IsSuperfanshipEnabled
|
||||||
|
vo.SuperfanshipPrice = zv.SuperfanshipPrice
|
||||||
|
vo.SuperfanshipValidPeriod = zv.SuperfanshipValidPeriod
|
||||||
|
vo.IsSuperfanshipGiveWechat = zv.IsSuperfanshipGiveWechat
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1515,7 +1515,10 @@ func (s *Service) utilFillZonesWithApiVOInfo(ctx *gin.Context, list []*dbstruct.
|
||||||
zoneZidMap[zone.GetId()] = zone
|
zoneZidMap[zone.GetId()] = zone
|
||||||
}
|
}
|
||||||
|
|
||||||
// 8.填充信息
|
// 8.获取空间付费信息
|
||||||
|
zvMap, _ := _DefaultVas.GetZoneVasByIds(ctx, zids)
|
||||||
|
|
||||||
|
// 9.填充信息
|
||||||
for _, vo := range volist {
|
for _, vo := range volist {
|
||||||
|
|
||||||
zid := vo.Zone.GetId()
|
zid := vo.Zone.GetId()
|
||||||
|
@ -1572,6 +1575,10 @@ func (s *Service) utilFillZonesWithApiVOInfo(ctx *gin.Context, list []*dbstruct.
|
||||||
} else {
|
} else {
|
||||||
vo.IsSuperfanshipUnlocked = consts.IsSuperfanshipUnlocked_No
|
vo.IsSuperfanshipUnlocked = consts.IsSuperfanshipUnlocked_No
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if zv, ok := zvMap[zid]; ok {
|
||||||
|
vo.CopyZoneVas(zv)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue