add
This commit is contained in:
parent
f3533490f8
commit
4fb56ba1cc
|
@ -567,10 +567,8 @@ func (s *Service) OpCoinOrderList(ctx *gin.Context, req *vasproto.OpCoinOrderLis
|
|||
Coins: co.GetCoins(),
|
||||
Ct: co.GetCt(),
|
||||
}
|
||||
switch co.GetProductId() {
|
||||
case dbstruct.ProductIdContactWechat:
|
||||
item.ProductName = "微信联系方式"
|
||||
}
|
||||
item.ProductName = dbstruct.ProductIdDescMap[co.GetProductId()]
|
||||
|
||||
list = append(list, item)
|
||||
}
|
||||
return
|
||||
|
@ -637,9 +635,7 @@ func (s *Service) OpOrderList(ctx *gin.Context, req *vasproto.OpOrderListReq) (l
|
|||
Coins: o.GetCoins(),
|
||||
Ct: o.GetCt(),
|
||||
}
|
||||
if p, ok := productMap[o.GetProductId()]; ok {
|
||||
item.ProductName = p.Name
|
||||
}
|
||||
item.ProductName = dbstruct.ProductIdDescMap[o.GetProductId()]
|
||||
list = append(list, item)
|
||||
}
|
||||
return
|
||||
|
@ -724,7 +720,7 @@ func (s *Service) ZoneGetCashier(ctx *gin.Context, req *vasproto.ZoneGetCashierR
|
|||
//ec = errcode.ErrCodeVasSrvFail
|
||||
//return nil, ec, fmt.Errorf("已解锁该动态,请勿重复购买")
|
||||
}
|
||||
data.Name = "付费动态"
|
||||
data.Name = "单条付费动态"
|
||||
// 获取动态价格
|
||||
zmp, _ := _DefaultVas.GetZoneMomentPriceById(ctx, req.MomentId)
|
||||
if zmp != nil {
|
||||
|
@ -748,6 +744,13 @@ func (s *Service) ZoneGetCashier(ctx *gin.Context, req *vasproto.ZoneGetCashierR
|
|||
return nil, ec, fmt.Errorf("无法获取主播动态")
|
||||
}
|
||||
data.Name = "空间会员"
|
||||
|
||||
// 获取主播信息
|
||||
acntMap, _ := _DefaultAccount.GetAccountMapByMids(ctx, []int64{zone.GetMid()})
|
||||
if a, ok := acntMap[zone.GetMid()]; ok && a.Name != nil {
|
||||
data.Name = *a.Name + "-空间成员"
|
||||
}
|
||||
|
||||
if zv == nil {
|
||||
ec = errcode.ErrCodeVasSrvFail
|
||||
return nil, ec, fmt.Errorf("该主播未设置空间价格")
|
||||
|
@ -773,8 +776,15 @@ func (s *Service) ZoneGetCashier(ctx *gin.Context, req *vasproto.ZoneGetCashierR
|
|||
data.HasBought = 1
|
||||
return data, ec, nil
|
||||
}
|
||||
|
||||
data.Name = "超粉"
|
||||
|
||||
// 获取主播信息
|
||||
zone, _ := _DefaultZone.GetById(ctx, zid)
|
||||
acntMap, _ := _DefaultAccount.GetAccountMapByMids(ctx, []int64{zone.GetMid()})
|
||||
if a, ok := acntMap[zone.GetMid()]; ok && a.Name != nil {
|
||||
data.Name = *a.Name + "-超粉"
|
||||
}
|
||||
|
||||
if zv == nil {
|
||||
ec = errcode.ErrCodeVasSrvFail
|
||||
return nil, ec, fmt.Errorf("该主播未设置空间价格")
|
||||
|
|
|
@ -29,11 +29,25 @@ const (
|
|||
)
|
||||
|
||||
var ProductIdDescMap = map[string]string{
|
||||
ProductIdContactWechat: "解锁微信",
|
||||
ProductIdMembership: "永久会员",
|
||||
ProductIdH5ZoneMoment: "空间动态",
|
||||
ProductIdH5ZoneAdmission: "解锁空间",
|
||||
ProductIdH5ZoneSuperfanship: "解锁超粉",
|
||||
ProductIdOpCoin: "op充值金币",
|
||||
ProductIdH5CustomCoin: "自定义金币",
|
||||
ProductIdH5Coin500: "500金币",
|
||||
ProductIdH5Coin1000: "1000金币",
|
||||
ProductIdH5Coin3000: "3000金币",
|
||||
ProductIdH5Coin5000: "5000金币",
|
||||
ProductIdH5Coin8000: "8000金币",
|
||||
ProductIdH5Coin10000: "10000金币",
|
||||
ProductIdH5Coin15000: "15000金币",
|
||||
ProductIdH5Coin18000: "18000金币",
|
||||
ProductIdH5Coin20000: "20000金币",
|
||||
ProductIdH5ContactWechat: "h5解锁微信",
|
||||
ProductIdSuperfanGiftContactWechat: "超粉赠送解锁微信",
|
||||
ProductIdContactWechat: "解锁微信",
|
||||
ProductIdMembership: "永久会员",
|
||||
ProductIdH5Membership: "h5永久会员",
|
||||
ProductIdH5ZoneMoment: "空间动态",
|
||||
ProductIdH5ZoneAdmission: "解锁空间",
|
||||
ProductIdH5ZoneSuperfanship: "解锁超粉",
|
||||
}
|
||||
|
||||
// 商品类型
|
||||
|
|
Loading…
Reference in New Issue