|
@@ -147,26 +147,31 @@ WHERE a.status = 1 %s and b.user_phone = '%s' and a.product_type like '%s' ORDER
|
|
|
userServer, _ := g.DB().Query(ctx, fmt.Sprintf(`SELECT s_serviceid,s_smainid,l_endtime,l_starttime FROM bigmember_service_user WHERE s_userid = '%s' and i_status =0`, userId))
|
|
|
if !userServer.IsEmpty() {
|
|
|
vipExist = true
|
|
|
+ serMap := make(map[int]bool)
|
|
|
count, _ := g.DB().GetCount(ctx, fmt.Sprintf(`SELECT * FROM bigmember_service_user WHERE s_userid = '%s' and i_status =0 and (s_serviceid=4 or s_serviceid =19)`, userId))
|
|
|
isHUa := count > 0
|
|
|
for _, v := range userServer.List() {
|
|
|
if isHUa && v["s_serviceid"] == 26 {
|
|
|
continue
|
|
|
}
|
|
|
+ var serviceId int
|
|
|
if common.IntAll(v["s_smainid"]) == 0 {
|
|
|
if common.IntAll(v["s_serviceid"]) == 12 {
|
|
|
- serviceList = append(serviceList, 23)
|
|
|
+ serviceId = 23
|
|
|
} else {
|
|
|
- serviceList = append(serviceList, common.IntAll(v["s_serviceid"]))
|
|
|
+ serviceId = common.IntAll(v["s_serviceid"])
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
if common.IntAll(v["s_smainid"]) == 12 {
|
|
|
- serviceList = append(serviceList, 23)
|
|
|
+ serviceId = 23
|
|
|
} else {
|
|
|
- serviceList = append(serviceList, common.IntAll(v["s_smainid"]))
|
|
|
+ serviceId = common.IntAll(v["s_smainid"])
|
|
|
}
|
|
|
}
|
|
|
+ if !serMap[serviceId] {
|
|
|
+ serviceList = append(serviceList, serviceId)
|
|
|
+ serMap[serviceId] = true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if vipExist {
|