wangkaiyue 4 жил өмнө
parent
commit
c31c2dd6d2

+ 1 - 1
src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go

@@ -246,7 +246,7 @@ func (this *SubscribeChange) Upgrade() {
 			"dis_word":       disWord,
 			"dis_word":       disWord,
 			"discount_price": discount_price,
 			"discount_price": discount_price,
 			"d_relation_id":  userLotteryId,
 			"d_relation_id":  userLotteryId,
-			"vip_type":       3, //立即升级
+			"vip_type":       2, //立即升级
 			"user_phone":     order_phone,
 			"user_phone":     order_phone,
 		}
 		}
 		if order_phone != "" {
 		if order_phone != "" {

+ 9 - 0
src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

@@ -266,6 +266,11 @@ func (this *SubVipPayOrder) Renew() {
 		if mog_id == "" {
 		if mog_id == "" {
 			return &entity.FuncResult{false, errors.New("创建订单出错"), nil}
 			return &entity.FuncResult{false, errors.New("创建订单出错"), nil}
 		}
 		}
+
+		//计算开始价格和结束价格
+		startTime := time.Unix(endUnix, 0)
+		endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, endUnix)
+
 		//原价
 		//原价
 		original_price := totalfee
 		original_price := totalfee
 
 
@@ -299,7 +304,11 @@ func (this *SubVipPayOrder) Renew() {
 			"dis_word":       disWord,           //分销口令
 			"dis_word":       disWord,           //分销口令
 			"discount_price": discount_price,
 			"discount_price": discount_price,
 			"d_relation_id":  userLotteryId,
 			"d_relation_id":  userLotteryId,
+			"vip_starttime":  qutil.FormatDate(&startTime, qutil.Date_Full_Layout),
+			"vip_endtime":    qutil.FormatDate(&endTime, qutil.Date_Full_Layout),
+			"vip_type":       1,
 		}
 		}
+
 		orderid := util.Mysql.Insert("dataexport_order", insertMap)
 		orderid := util.Mysql.Insert("dataexport_order", insertMap)
 		if orderid == -1 {
 		if orderid == -1 {
 			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
 			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}

+ 1 - 1
src/jfw/modules/subscribepay/src/subvip_price.json

@@ -30,7 +30,7 @@
       "allProvince_allBuyerClass": 59900
       "allProvince_allBuyerClass": 59900
     },
     },
     "year": {
     "year": {
-      "oneProvince_allBuyerClass": 38800,
+      "oneProvince_allBuyerClass": 38000,
       "allProvince_allBuyerClass": 599900
       "allProvince_allBuyerClass": 599900
     },
     },
     "provincePrice": 3800,
     "provincePrice": 3800,