This commit is contained in:
parent
acd49e99a2
commit
2511bf9e1f
|
@ -743,9 +743,10 @@ func (v *Vas) OneStepUnlockContactV2(ctx *gin.Context, req *vasproto.OneStepUnlo
|
|||
// 一步解锁联系方式
|
||||
func (v *Vas) OneStepUnlockContact(ctx *gin.Context, req *vasproto.OneStepUnlockContactReq) (lockType int32, orderId, retContact string, err error) {
|
||||
var (
|
||||
mid = req.Mid // 解锁人
|
||||
uid = req.Uid // 要解锁的人,即 mid 要解锁 uid 的联系方式
|
||||
contactProductId = req.ContactProductId // 要解锁的联系方式
|
||||
mid = req.Mid // 解锁人
|
||||
uid = req.Uid // 要解锁的人,即 mid 要解锁 uid 的联系方式
|
||||
contactProductId = req.ContactProductId // 要解锁的联系方式
|
||||
originalContactProductId = req.ContactProductId
|
||||
)
|
||||
|
||||
// 获取uid的邀请人mid
|
||||
|
@ -956,6 +957,10 @@ func (v *Vas) OneStepUnlockContact(ctx *gin.Context, req *vasproto.OneStepUnlock
|
|||
InviterDias = int64(0)
|
||||
OfficialDias = int64(0)
|
||||
)
|
||||
// h5解锁情况,主播收益为原价的80%
|
||||
if originalContactProductId == dbstruct.ProductIdH5ContactWechat {
|
||||
StreamerDias = int64(float64(uVasInfo.GetWechatCoinPrice()) * 0.8)
|
||||
}
|
||||
if req.InviterMid > 0 {
|
||||
InviterDias = int64(float64(TotalDias) * 0.05)
|
||||
}
|
||||
|
|
|
@ -20,6 +20,10 @@ func (p UserVasInfo) GetH5WechatCoinPrice() int64 {
|
|||
return int64(math.Ceil(float64(p.WechatCoinPrice)/9)) * 10
|
||||
}
|
||||
|
||||
func (p UserVasInfo) GetWechatCoinPrice() int64 {
|
||||
return p.WechatCoinPrice
|
||||
}
|
||||
|
||||
// 金币订单oplog
|
||||
const (
|
||||
OrderOpLogActionAdd = "add"
|
||||
|
|
Loading…
Reference in New Issue