|
@@ -268,7 +268,7 @@ func delPower(id int64) {
|
|
|
} else if productType == "大会员" {
|
|
|
set["i_member_endtime"] = time.Now().Unix()
|
|
|
set["i_member_status"] = 0
|
|
|
- JyMysql.Update(BigServiceUser, map[string]interface{}{"s_userid": posititonId}, map[string]interface{}{"i_status": -1})
|
|
|
+ JyMysql.Update(BigServiceUser, map[string]interface{}{"s_userid": common.InterfaceToStr(posititonId)}, map[string]interface{}{"i_status": -1})
|
|
|
}
|
|
|
|
|
|
Mgo.Update("ent_user", map[string]interface{}{
|
|
@@ -438,11 +438,11 @@ func memberSetMap(userId int64, orderData map[string]interface{}) (set map[strin
|
|
|
}
|
|
|
}
|
|
|
sqls := "select * from bigmember_service_user where s_serviceid = ? and s_userid = ? and i_status = -1"
|
|
|
- serverDatas := JyMysql.SelectBySql(sqls, serverId, userId)
|
|
|
+ serverDatas := JyMysql.SelectBySql(sqls, serverId, common.InterfaceToStr(userId))
|
|
|
if serverDatas != nil && len(*serverDatas) > 0 {
|
|
|
i_status := common.If(dataType == 1, 0, 1)
|
|
|
sql := "update bigmember_service_user set i_frequency = ?,l_updatetime = ?,l_starttime = ?,l_endtime = ?,i_status = ? where s_serviceid = ? and s_userid = ?"
|
|
|
- status1 := JyMysql.UpdateOrDeleteBySql(sql, fmt.Sprint(frequency), time.Now().Format(tmp), startdate.Format(tmp), enddate.Format(tmp), fmt.Sprint(i_status), serverId, userId)
|
|
|
+ status1 := JyMysql.UpdateOrDeleteBySql(sql, fmt.Sprint(frequency), time.Now().Format(tmp), startdate.Format(tmp), enddate.Format(tmp), fmt.Sprint(i_status), serverId, common.InterfaceToStr(userId))
|
|
|
if status1 < 0 {
|
|
|
log.Println("新建服务-更新服务表出错", userId)
|
|
|
return
|
|
@@ -493,11 +493,11 @@ func memberSetMap(userId int64, orderData map[string]interface{}) (set map[strin
|
|
|
}
|
|
|
}
|
|
|
sqls := "select * from bigmember_service_user where s_serviceid = ? and s_userid = ? and i_status = -1"
|
|
|
- serverDatas := JyMysql.SelectBySql(sqls, serverId, userId)
|
|
|
+ serverDatas := JyMysql.SelectBySql(sqls, serverId, common.InterfaceToStr(userId))
|
|
|
if serverDatas != nil && len(*serverDatas) > 0 {
|
|
|
i_status := common.If(dataType == 1, 0, 1)
|
|
|
sql := "update bigmember_service_user set i_frequency = ?,l_updatetime = ?,l_starttime = ?,l_endtime = ?,i_status = ? where s_serviceid = ? and s_userid = ?"
|
|
|
- status1 := JyMysql.UpdateOrDeleteBySql(sql, fmt.Sprint(frequency), time.Now().Format(tmp), startdate.Format(tmp), enddate.Format(tmp), fmt.Sprint(i_status), serverId, userId)
|
|
|
+ status1 := JyMysql.UpdateOrDeleteBySql(sql, fmt.Sprint(frequency), time.Now().Format(tmp), startdate.Format(tmp), enddate.Format(tmp), fmt.Sprint(i_status), serverId, common.InterfaceToStr(userId))
|
|
|
if status1 < 0 {
|
|
|
log.Println("新建服务-更新服务表出错")
|
|
|
return
|