|
@@ -192,7 +192,9 @@ func BuyProductList(this *entmanageapplication.BuyProductListReq) *entmanageappl
|
|
if provinceCount := common.IntAllDef(v["province_count"], -1); provinceCount > 0 {
|
|
if provinceCount := common.IntAllDef(v["province_count"], -1); provinceCount > 0 {
|
|
switch provinceCount {
|
|
switch provinceCount {
|
|
case 1:
|
|
case 1:
|
|
- productTypeSuffix = "单省版"
|
|
|
|
|
|
+ if !strings.Contains(product_type, "单省版") {
|
|
|
|
+ productTypeSuffix = "单省版"
|
|
|
|
+ }
|
|
default:
|
|
default:
|
|
productTypeSuffix = "省份版"
|
|
productTypeSuffix = "省份版"
|
|
}
|
|
}
|
|
@@ -393,14 +395,14 @@ func vipSetMap(orderData map[string]interface{}) (set map[string]interface{}, se
|
|
json.Unmarshal([]byte(common.ObjToString(orderData["filter"])), &vms)
|
|
json.Unmarshal([]byte(common.ObjToString(orderData["filter"])), &vms)
|
|
set = map[string]interface{}{
|
|
set = map[string]interface{}{
|
|
"o_entniche": map[string]interface{}{
|
|
"o_entniche": map[string]interface{}{
|
|
- "i_trial": -1, //已激活试用
|
|
|
|
|
|
+ "i_trial": -1, //已激活试用
|
|
"o_area": map[string]interface{}{"北京": []interface{}{}}, //设置地区
|
|
"o_area": map[string]interface{}{"北京": []interface{}{}}, //设置地区
|
|
"o_buyset": map[string]interface{}{
|
|
"o_buyset": map[string]interface{}{
|
|
"upgrade": 1,
|
|
"upgrade": 1,
|
|
"areacount": vms.FinalAreaCount,
|
|
"areacount": vms.FinalAreaCount,
|
|
"newcitys": []int{},
|
|
"newcitys": []int{},
|
|
"buyerclasscount": -1,
|
|
"buyerclasscount": -1,
|
|
- }, //购买内容 城市、省份、行业数量, //购买内容 城市、省份、行业数量
|
|
|
|
|
|
+ }, //购买内容 城市、省份、行业数量, //购买内容 城市、省份、行业数量
|
|
"a_buyerclass": []interface{}{}, //设置行业
|
|
"a_buyerclass": []interface{}{}, //设置行业
|
|
},
|
|
},
|
|
"i_vip_expire_tip": 0, //消息提示初始化
|
|
"i_vip_expire_tip": 0, //消息提示初始化
|
|
@@ -429,10 +431,11 @@ func memberSetMap(userId, waitEmpowerId int64, orderData map[string]interface{})
|
|
filterMap := common.ObjToMap(orderData["filter"])
|
|
filterMap := common.ObjToMap(orderData["filter"])
|
|
comboId := common.IntAll((*filterMap)["comboId"])
|
|
comboId := common.IntAll((*filterMap)["comboId"])
|
|
level := common.If(comboId == 0, 5, comboId).(int)
|
|
level := common.If(comboId == 0, 5, comboId).(int)
|
|
|
|
+ level = common.If(gconv.Int((*filterMap)["finalAreaCount"]) == 1, 6, level).(int)
|
|
payCycle := month(common.IntAll((*filterMap)["buy_cycle"]), common.IntAll((*filterMap)["buy_type"])) + month(common.IntAll((*filterMap)["give_cycle"]), common.IntAll((*filterMap)["give_type"]))
|
|
payCycle := month(common.IntAll((*filterMap)["buy_cycle"]), common.IntAll((*filterMap)["buy_type"])) + month(common.IntAll((*filterMap)["give_cycle"]), common.IntAll((*filterMap)["give_type"]))
|
|
|
|
|
|
//payCycle := common.IntAll((*filterMap)["cycle"])
|
|
//payCycle := common.IntAll((*filterMap)["cycle"])
|
|
- serversId := common.ObjToString((*filterMap)["serversId"])
|
|
|
|
|
|
+ serversId := gconv.Strings((*filterMap)["serviceIds"])
|
|
startTime := common.ObjToString(orderData["service_starttime"])
|
|
startTime := common.ObjToString(orderData["service_starttime"])
|
|
endTime := common.ObjToString(orderData["service_endtime"])
|
|
endTime := common.ObjToString(orderData["service_endtime"])
|
|
tmp := "2006-01-02 15:04:05"
|
|
tmp := "2006-01-02 15:04:05"
|
|
@@ -444,11 +447,10 @@ func memberSetMap(userId, waitEmpowerId int64, orderData map[string]interface{})
|
|
dataType = 2
|
|
dataType = 2
|
|
}
|
|
}
|
|
var (
|
|
var (
|
|
- areaCount = common.IntAllDef((*filterMap)["areaCount"], -1)
|
|
|
|
|
|
+ areaCount = common.IntAllDef((*filterMap)["finalAreaCount"], -1)
|
|
area = common.If(areaCount > 0, map[string]interface{}{"北京": []string{}}, map[string]interface{}{}).(map[string]interface{})
|
|
area = common.If(areaCount > 0, map[string]interface{}{"北京": []string{}}, map[string]interface{}{}).(map[string]interface{})
|
|
)
|
|
)
|
|
-
|
|
|
|
- areaCount = common.IntAllDef((*filterMap)["areaCount"], -1)
|
|
|
|
|
|
+ //areaCount = common.IntAllDef((*filterMap)["finalAreaCount"], -1)
|
|
set = map[string]interface{}{
|
|
set = map[string]interface{}{
|
|
"i_type": 1,
|
|
"i_type": 1,
|
|
"o_member_jy": map[string]interface{}{
|
|
"o_member_jy": map[string]interface{}{
|
|
@@ -457,6 +459,7 @@ func memberSetMap(userId, waitEmpowerId int64, orderData map[string]interface{})
|
|
"o_entniche.i_areacount": areaCount,
|
|
"o_entniche.i_areacount": areaCount,
|
|
"o_entniche.o_area": area, //默认北京
|
|
"o_entniche.o_area": area, //默认北京
|
|
}
|
|
}
|
|
|
|
+ log.Println("权益分配参数set:", set)
|
|
setEntUser = map[string]interface{}{
|
|
setEntUser = map[string]interface{}{
|
|
"i_member_status": common.If(dataType == 1, level, -level),
|
|
"i_member_status": common.If(dataType == 1, level, -level),
|
|
"i_member_starttime": startdate.Unix(),
|
|
"i_member_starttime": startdate.Unix(),
|
|
@@ -551,7 +554,7 @@ func memberSetMap(userId, waitEmpowerId int64, orderData map[string]interface{})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- for _, s := range strings.Split(serversId, ",") {
|
|
|
|
|
|
+ for _, s := range serversId {
|
|
serverId, _ := strconv.Atoi(s)
|
|
serverId, _ := strconv.Atoi(s)
|
|
mainId := serverId
|
|
mainId := serverId
|
|
if serverMap[serverId] != 0 {
|
|
if serverMap[serverId] != 0 {
|