Merge pull request 'feat-IRONFANS-70' (#293) from feat-IRONFANS-70 into test
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/293
This commit is contained in:
commit
b753c6a9e3
|
@ -1559,14 +1559,15 @@ func (s *Service) utilFillZonesWithApiVOInfo(ctx *gin.Context, list []*dbstruct.
|
|||
vo.Expenditure = zidZuMap[zid].GetConsume()
|
||||
|
||||
// 填充铁粉解锁信息
|
||||
if zidZuMap[zid].IsUnlockIronfanship() {
|
||||
zu, ok := zidZuMap[zid]
|
||||
if ok && zu.IsUnlockIronfanship() {
|
||||
vo.IsIronfanshipUnlocked = consts.IsIronfanshipUnlocked_Yes
|
||||
} else {
|
||||
vo.IsIronfanshipUnlocked = consts.IsIronfanshipUnlocked_No
|
||||
}
|
||||
|
||||
// 填充超粉解锁信息
|
||||
if zidZuMap[zid].IsUnlockSuperfanship() {
|
||||
if ok && zu.IsUnlockSuperfanship() {
|
||||
vo.IsSuperfanshipUnlocked = consts.IsSuperfanshipUnlocked_Yes
|
||||
} else {
|
||||
vo.IsSuperfanshipUnlocked = consts.IsSuperfanshipUnlocked_No
|
||||
|
@ -1678,14 +1679,15 @@ func (s *Service) utilFillZoneMomentsWithApiVOInfo(ctx *gin.Context, list []*dbs
|
|||
}
|
||||
|
||||
// 填充铁粉解锁信息
|
||||
if zidZuMap[zid].IsUnlockIronfanship() {
|
||||
zu, ok := zidZuMap[zid]
|
||||
if ok && zu.IsUnlockIronfanship() {
|
||||
vo.IsIronfanshipUnlocked = consts.IsIronfanshipUnlocked_Yes
|
||||
} else {
|
||||
vo.IsIronfanshipUnlocked = consts.IsIronfanshipUnlocked_No
|
||||
}
|
||||
|
||||
// 填充超粉解锁信息
|
||||
if zidZuMap[zid].IsUnlockSuperfanship() {
|
||||
if ok && zu.IsUnlockSuperfanship() {
|
||||
vo.IsSuperfanshipUnlocked = consts.IsSuperfanshipUnlocked_Yes
|
||||
} else {
|
||||
vo.IsSuperfanshipUnlocked = consts.IsSuperfanshipUnlocked_No
|
||||
|
|
|
@ -948,6 +948,9 @@ type ZoneUnlock struct {
|
|||
}
|
||||
|
||||
func (p *ZoneUnlock) IsUnlockAdmission() bool {
|
||||
if p == nil {
|
||||
return false
|
||||
}
|
||||
if p.AdmissionCt == nil {
|
||||
return false
|
||||
}
|
||||
|
@ -958,6 +961,9 @@ func (p *ZoneUnlock) IsUnlockAdmission() bool {
|
|||
}
|
||||
|
||||
func (p *ZoneUnlock) IsUnlockIronfanship() bool {
|
||||
if p == nil {
|
||||
return false
|
||||
}
|
||||
if p.IronfanshipCt == nil {
|
||||
return false
|
||||
}
|
||||
|
@ -968,6 +974,9 @@ func (p *ZoneUnlock) IsUnlockIronfanship() bool {
|
|||
}
|
||||
|
||||
func (p *ZoneUnlock) IsUnlockSuperfanship() bool {
|
||||
if p == nil {
|
||||
return false
|
||||
}
|
||||
if p.SuperfanshipCt == nil {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue