fix: 老版本客户端去掉每个套餐 discount 最后一个,而非整个套餐
This commit is contained in:
parent
3b4e882965
commit
1dbc3a81e9
@ -59,10 +59,14 @@ func (l *QuerySubscribeListLogic) QuerySubscribeList(req *types.QuerySubscribeLi
|
|||||||
list[i] = sub
|
list[i] = sub
|
||||||
}
|
}
|
||||||
|
|
||||||
// 老版本客户端(无 X-App-Id)去掉排序最后一个套餐
|
// 老版本客户端(无 X-App-Id)去掉每个套餐 discount 的最后一个
|
||||||
hasAppId, _ := l.ctx.Value(constant.CtxKeyHasAppId).(bool)
|
hasAppId, _ := l.ctx.Value(constant.CtxKeyHasAppId).(bool)
|
||||||
if !hasAppId && len(list) > 0 {
|
if !hasAppId {
|
||||||
list = list[:len(list)-1]
|
for i := range list {
|
||||||
|
if len(list[i].Discount) > 0 {
|
||||||
|
list[i].Discount = list[i].Discount[:len(list[i].Discount)-1]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resp.List = list
|
resp.List = list
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user