package dao import ( "context" "fmt" "time" "go-common/app/interface/main/feedback/model" "go-common/library/database/sql" "go-common/library/log" "go-common/library/xstr" "strings" ) const ( _selSsn = "SELECT id,mid,content,img_url,log_url,state,ctime FROM session WHERE buvid=? AND system=? AND version=? AND mid=?" _selSsnByMid = "SELECT id,mid,content,img_url,log_url,state,ctime FROM session WHERE mid=? AND platform IN (%s)" _selSSnCntByMid = `SELECT COUNT(id) AS count FROM session WHERE mid=? AND state IN (0,1,2) AND platform IN ("ugc","article")` _inSsn = "INSERT INTO session (buvid,system,version,mid,aid,content,img_url,log_url,device,channel,ip,net_state,net_operator,agency_area,platform,browser,qq,email,state,laster_time,ctime,mtime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" _upSsn = "UPDATE session SET device=?,channel=?,ip=?,net_state=?,net_operator=?,agency_area=?,platform=?,browser=?,qq=?,email=?,state=?,laster_time=?,mtime=? WHERE id=?" _upSsnMtime = "UPDATE session SET mtime=? WHERE id=?" _upSsnState = "UPDATE session SET state=? where id=?" _selTagByPlat = "SELECT id,name,platform,type FROM tag where type=? AND platform IN (%s)" _selSsnIDbByTagID = "SELECT session_id FROM session_tag WHERE tag_id IN (%s)" _selSSnBySsnID = "SELECT id,content,ctime,state FROM session WHERE id IN (%s) AND state IN (%s) AND session.ctime>? AND session.ctime? AND session.ctime