|
@@ -571,7 +571,7 @@ func OpenUserService(tx *sql.Tx, orderCode string, orderInfo map[string]interfac
|
|
|
bigEnd := cm.Int64All(userData["i_member_endtime"])
|
|
|
areaCount := cm.IntAll(filterMap["areaCount"])
|
|
|
ok, err := SubAccount(SubAccountParam{
|
|
|
- BuyCount: cm.IntAll(orderInfo["buy_count"]) + freeSubNum + paySubNum,
|
|
|
+ BuyCount: cm.IntAll(orderInfo["buy_count"]),
|
|
|
BuySubject: cm.IntAll(orderInfo["buy_subject"]),
|
|
|
StartTime: time.Unix(bigStart, 0),
|
|
|
EndTime: time.Unix(bigEnd, 0),
|
|
@@ -582,31 +582,11 @@ func OpenUserService(tx *sql.Tx, orderCode string, orderInfo map[string]interfac
|
|
|
ProvinceCount: cm.IntAll(cm.If(areaCount == 0, -1, areaCount)),
|
|
|
ProductType: getBigMemberProductTypeByOrderCode(cm.ObjToString(filterMap["contactOrderCode"])),
|
|
|
Phone: cm.ObjToString(orderInfo["user_phone"]),
|
|
|
+ OldOrderCode: cm.ObjToString(filterMap["contactOrderCode"]),
|
|
|
})
|
|
|
if !ok && err != nil {
|
|
|
return err
|
|
|
}
|
|
|
- if cm.IntAll(orderInfo["buy_subject"]) == 2 {
|
|
|
- var sName string
|
|
|
- if cm.IntAll(filterMap["comboId"]) != 0 {
|
|
|
- if cm.IntAll(filterMap["comboId"]) == 5 {
|
|
|
- sName = ComboCustom
|
|
|
- } else {
|
|
|
- combo := util.JysqlDB.FindOne("bigmember_combo", map[string]interface{}{"id": cm.IntAll(filterMap["comboId"])}, "", "")
|
|
|
- if combo != nil && len(*combo) > 0 {
|
|
|
- sName = cm.ObjToString((*combo)["s_name"])
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- st := time.Unix(bigStart, 0).Format(cm.Date_Full_Layout)
|
|
|
- et := time.Unix(bigEnd, 0).Format(cm.Date_Full_Layout)
|
|
|
- err := EntLicense(cm.IntAll(orderInfo["entId"]), cm.IntAll(orderInfo["buy_count"]), cm.IntAll(cm.If(cm.IntAll(filterMap["areaCount"]) > 0, cm.IntAll(filterMap["areaCount"]), -1)), cm.IntAll(orderInfo["id"]), 0, fmt.Sprintf("%s%s", "大会员", sName), st, et, cm.ObjToString(orderInfo["user_phone"]))
|
|
|
- if err != nil {
|
|
|
- log.Printf("EntLicense 创建企业授权信息失败:code:%s,err:%s", orderCode, err.Error())
|
|
|
- return err
|
|
|
- }
|
|
|
- }
|
|
|
updateOrder["vip_starttime"] = time.Now().Format(cm.Date_Full_Layout)
|
|
|
updateOrder["vip_endtime"] = time.Unix(bigEnd, 0).Format(cm.Date_Full_Layout)
|
|
|
|