Browse Source

wip:提交

wkyuer 1 month ago
parent
commit
08218d6f7a
2 changed files with 10 additions and 28 deletions
  1. 0 16
      entity/entity.go
  2. 10 12
      service/service.go

+ 0 - 16
entity/entity.go

@@ -29,22 +29,6 @@ const (
 )
 
 // 订单简单信息
-type VipSimpleMsg struct {
-	Area             *map[string]interface{}  `json:"area"`             //选择地区
-	Industry         []string                 `json:"industry"`         //选择行业
-	Cyclecount       int                      `json:"cyclecount"`       //日期数量(订单详情展示使用)
-	Cycleunit        int                      `json:"cycleunit"`        //日期单位(订单详情展示使用)
-	Buyset           *SubvipBuySet            `json:"buyset"`           //旧购买详情
-	NewBuyset        *SubvipBuySet            `json:"newBuyset"`        //新购买详情
-	UpgradeSubtotail []map[string]interface{} `json:"upgradeSubtotail"` //升级清单(订单详情计价清单展示使用)
-	OrderType        int                      `json:"ordertype"`        //1,3,5   类型 1:订单 2:续费 3:立即升级 4:下月升级 5:即将到期(可升降级续费)6:升级订单未生效再次升级
-	DisWord          string                   `json:"disWord"`          //分销系统 口令
-	ContractStatus   int                      `json:"contractStatus"`   //合同状态
-	Source           string                   `json:"source"`           //
-	Badge            string                   `json:"badge"`            //
-	Remark           string                   `json:"remark"`           //备注字段
-}
-
 type VipCycleFilter struct {
 	BuyAccountCount  int `json:"buyAccountCount"`  //购买数量(仅购买主体是企业)
 	GiftAccountCount int `json:"giftAccountCount"` //赠送数量 要算售价(仅购买主体是企业)

+ 10 - 12
service/service.go

@@ -385,21 +385,19 @@ func vipSetMap(orderData map[string]interface{}) (set map[string]interface{}, se
 	setEntUser["l_vip_starttime"] = startdate.Unix()
 	setEntUser["l_vip_endtime"] = enddate.Unix()
 	setEntUser["i_vip_status"] = common.If(isTrial, -2, 2) //1试用 2正式 -2 试用到期
-	vms := VipSimpleMsg{}
+
+	vms := VipCycleFilter{}
 	json.Unmarshal([]byte(common.ObjToString(orderData["filter"])), &vms)
-	if vms.NewBuyset == nil { //704改版后新订单不包含此类信息
-		newVms := VipCycleFilter{}
-		json.Unmarshal([]byte(common.ObjToString(orderData["filter"])), &newVms)
-		vms.NewBuyset = &SubvipBuySet{
-			Upgrade:   1,
-			AreaCount: newVms.FinalAreaCount,
-		}
-	}
 	set = map[string]interface{}{
 		"o_entniche": map[string]interface{}{
-			"i_trial": -1, //已激活试用
-			//"o_area":       *vms.Area,       //设置地区
-			"o_buyset":     *vms.NewBuyset,  //购买内容 城市、省份、行业数量
+			"i_trial": -1,                                              //已激活试用
+			"o_area":  map[string]interface{}{"北京": []interface{}{}}, //设置地区
+			"o_buyset": map[string]interface{}{
+				"upgrade":         1,
+				"areacount":       vms.FinalAreaCount,
+				"newcitys":        []int{},
+				"buyerclasscount": -1,
+			},                               //购买内容 城市、省份、行业数量,                                  //购买内容 城市、省份、行业数量
 			"a_buyerclass": []interface{}{}, //设置行业
 		},
 		"i_vip_expire_tip": 0, //消息提示初始化