|
@@ -5,6 +5,7 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"github.com/baiy/Cadmin-server-go/admin"
|
|
|
+ "log"
|
|
|
"mongodb"
|
|
|
qutil "qfw/util"
|
|
|
"strings"
|
|
@@ -67,7 +68,7 @@ func orderPriceCount(context *admin.Context) (interface{}, error) {
|
|
|
}
|
|
|
if param.VipType == 2 {
|
|
|
monthCount, userId = GetUserBigTime(param.Phone, true)
|
|
|
- fmt.Println("*******", monthCount)
|
|
|
+ //fmt.Println("*******", monthCount)
|
|
|
}
|
|
|
if monthCount == 11 {
|
|
|
monthCount = 10
|
|
@@ -80,7 +81,7 @@ func orderPriceCount(context *admin.Context) (interface{}, error) {
|
|
|
monthCount = monthCount - (monthCount/12)*2
|
|
|
}
|
|
|
}
|
|
|
- fmt.Println("购买周期:", monthCount)
|
|
|
+ //fmt.Println("购买周期:", monthCount)
|
|
|
if param.ProductType == "超级订阅" {
|
|
|
if param.VipType == 2 { //升级需要计算用户剩余服务周期数
|
|
|
areaCount := param.AreaCount - param.OriginalAreaCount
|
|
@@ -90,7 +91,7 @@ func orderPriceCount(context *admin.Context) (interface{}, error) {
|
|
|
unitPrice = qutil.IntAll(config.SysConfigs.VipPrice["SingleProvince"])
|
|
|
}
|
|
|
//monthCount = GetUserBigTime(param.Phone, true)
|
|
|
- fmt.Println(unitPrice, monthCount, areaCount, param.BuyCount)
|
|
|
+ //fmt.Println(unitPrice, monthCount, areaCount, param.BuyCount)
|
|
|
price = float64(unitPrice * monthCount * areaCount * param.BuyCount)
|
|
|
} else {
|
|
|
if param.BuyCount == 0 {
|
|
@@ -111,7 +112,7 @@ func orderPriceCount(context *admin.Context) (interface{}, error) {
|
|
|
}
|
|
|
primaryAccountPrice := 0 //大会员价格
|
|
|
subAccountPrice := 0 //子账号价格
|
|
|
- fmt.Println("++++", param.Products)
|
|
|
+ //fmt.Println("++++", param.Products)
|
|
|
switch param.Products {
|
|
|
case 1: //大会员订单
|
|
|
/*if param.CreateType == 2 { //补充服务
|
|
@@ -171,7 +172,7 @@ func orderPriceCount(context *admin.Context) (interface{}, error) {
|
|
|
}
|
|
|
//会员套餐年价格
|
|
|
primaryAccountPrice = config.BigMemberCombo[param.ComboId]
|
|
|
- fmt.Println(primaryAccountPrice)
|
|
|
+ //fmt.Println(primaryAccountPrice)
|
|
|
}
|
|
|
//子账号价格
|
|
|
if param.CreateType != 2 {
|
|
@@ -229,11 +230,11 @@ func orderPriceCount(context *admin.Context) (interface{}, error) {
|
|
|
if monthCount == 0 {
|
|
|
return nil, errors.New("查询用户大会员权益剩余服务周期出错")
|
|
|
}
|
|
|
- fmt.Println(subAccountPrice, monthCount, param.BuyCount)
|
|
|
+ //fmt.Println(subAccountPrice, monthCount, param.BuyCount)
|
|
|
price = float64(subAccountPrice / 10 * monthCount * param.BuyCount)
|
|
|
}
|
|
|
}
|
|
|
- fmt.Println("标准售价----", price)
|
|
|
+ log.Println("标准售价----", price)
|
|
|
return map[string]interface{}{
|
|
|
"price": price,
|
|
|
}, err
|