|
@@ -194,6 +194,15 @@ func (this *SubscribeChange) Upgrade() {
|
|
|
log.Println(userId+" 前台计算", req_price, "后台计算", final_price)
|
|
|
return &entity.FuncResult{false, errors.New(fmt.Sprintf("金额校验异常[%d,%d]", final_price, req_price)), nil}
|
|
|
}
|
|
|
+ order_status := 0
|
|
|
+ //老用户 0元升级
|
|
|
+ if req_price == 0 && 0 == final_price {
|
|
|
+ if oldBuyset.Upgrade == 0 {
|
|
|
+ order_status = 1
|
|
|
+ } else {
|
|
|
+ return &entity.FuncResult{false, errors.New("超级订阅升级异常"), nil}
|
|
|
+ }
|
|
|
+ }
|
|
|
//卡卷使用
|
|
|
userLotteryId, lotteryId := "", this.GetString("lotteryId")
|
|
|
full_price, reduce_price := 0, 0
|
|
@@ -232,11 +241,6 @@ func (this *SubscribeChange) Upgrade() {
|
|
|
if len(*infoList) != 0 {
|
|
|
disWord = fmt.Sprint((*infoList)[0]["password"])
|
|
|
}
|
|
|
- order_status := 0
|
|
|
- //老用户 0元升级
|
|
|
- if req_price == 0 && 0 == final_price && oldBuyset.Upgrade == 0 {
|
|
|
- order_status = 1
|
|
|
- }
|
|
|
insertMap := map[string]interface{}{
|
|
|
"order_money": final_price,
|
|
|
"order_status": order_status,
|