|
@@ -90,7 +90,6 @@ WHERE %s and jod.status =1 order by dor.create_time desc`, whereSql))
|
|
if param.BuySubject == "1" {
|
|
if param.BuySubject == "1" {
|
|
var (
|
|
var (
|
|
linkedId, comboId, areaCount, paySubNum, gifUserCount, payUserCount int
|
|
linkedId, comboId, areaCount, paySubNum, gifUserCount, payUserCount int
|
|
- endTime string
|
|
|
|
orderArr []map[string]interface{}
|
|
orderArr []map[string]interface{}
|
|
serviceList []int
|
|
serviceList []int
|
|
)
|
|
)
|
|
@@ -135,11 +134,9 @@ WHERE a.status = 1 and b.user_phone = ? and b.buy_subject = 1 and a.product_typ
|
|
areaCount = common.IntAll(memberJyMap["i_areacount"])
|
|
areaCount = common.IntAll(memberJyMap["i_areacount"])
|
|
}
|
|
}
|
|
if startTime >= time.Now().Unix() {
|
|
if startTime >= time.Now().Unix() {
|
|
- endTime = time.Unix(bigEnd, 0).Format("2006-01-02 15:04:05")
|
|
|
|
vipExist = true
|
|
vipExist = true
|
|
} else if (time.Now().Unix() < bigEnd && memberStatus > 0) || startTime >= time.Now().Unix() {
|
|
} else if (time.Now().Unix() < bigEnd && memberStatus > 0) || startTime >= time.Now().Unix() {
|
|
vipExist = true
|
|
vipExist = true
|
|
- endTime = time.Unix(bigEnd, 0).Format("2006-01-02 15:04:05")
|
|
|
|
}
|
|
}
|
|
if (subStatus == 0 && memberStatus < 0 && mainId != "") || (subStatus == 1 && memberStatus > 0 && mainId != "") {
|
|
if (subStatus == 0 && memberStatus < 0 && mainId != "") || (subStatus == 1 && memberStatus > 0 && mainId != "") {
|
|
vipExist = true
|
|
vipExist = true
|
|
@@ -156,7 +153,7 @@ WHERE a.status = 1 and b.user_phone = ? and b.buy_subject = 1 and a.product_typ
|
|
"vipExist": vipExist, //当前服务是否在有限期内
|
|
"vipExist": vipExist, //当前服务是否在有限期内
|
|
"name": gconv.String(m["product_type"]), //产品名称
|
|
"name": gconv.String(m["product_type"]), //产品名称
|
|
"productCode": productCode, //产品code
|
|
"productCode": productCode, //产品code
|
|
- "serviceEndTime": endTime, //服务结束时间
|
|
|
|
|
|
+ "serviceEndTime": bigEnd, //服务结束时间
|
|
"serviceStartTime": startTime, //服务开始时间
|
|
"serviceStartTime": startTime, //服务开始时间
|
|
"empowerCount": paySubNum, //服务授权数
|
|
"empowerCount": paySubNum, //服务授权数
|
|
"gifUserCount": gifUserCount, //赠送授权数
|
|
"gifUserCount": gifUserCount, //赠送授权数
|
|
@@ -205,6 +202,8 @@ WHERE a.status = 1 and b.user_phone = ? and b.buy_subject = 1 and a.product_type
|
|
}
|
|
}
|
|
}
|
|
}
|
|
vipExist = gconv.Int((*userData)["i_vip_status"]) > 0
|
|
vipExist = gconv.Int((*userData)["i_vip_status"]) > 0
|
|
|
|
+ endTime = time.Unix(common.Int64All((*userData)["l_vip_endtime"]), 0).Format("2006-01-02 15:04:05")
|
|
|
|
+ startTime = time.Unix(common.Int64All((*userData)["l_vip_starttime"]), 0).Format("2006-01-02 15:04:05")
|
|
if vipExist {
|
|
if vipExist {
|
|
paySubNum = 1
|
|
paySubNum = 1
|
|
vipInfo := common.ObjToMap((*userData)["o_vipjy"])
|
|
vipInfo := common.ObjToMap((*userData)["o_vipjy"])
|
|
@@ -218,8 +217,6 @@ WHERE a.status = 1 and b.user_phone = ? and b.buy_subject = 1 and a.product_type
|
|
if areaCount == -1 {
|
|
if areaCount == -1 {
|
|
nationwide = true
|
|
nationwide = true
|
|
}
|
|
}
|
|
- endTime = time.Unix(common.Int64All((*userData)["l_vip_endtime"]), 0).Format("2006-01-02 15:04:05")
|
|
|
|
- startTime = time.Unix(common.Int64All((*userData)["l_vip_starttime"]), 0).Format("2006-01-02 15:04:05")
|
|
|
|
}
|
|
}
|
|
productCode := fmt.Sprintf("cjdy%03d", gconv.Int(common.If(areaCount > 15 || areaCount == -1, 16, areaCount)))
|
|
productCode := fmt.Sprintf("cjdy%03d", gconv.Int(common.If(areaCount > 15 || areaCount == -1, 16, areaCount)))
|
|
serviceArrMap = append(serviceArrMap, map[string]interface{}{
|
|
serviceArrMap = append(serviceArrMap, map[string]interface{}{
|