db

package
v0.0.0-...-59da782 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptFriend

func AcceptFriend(userID, friendID, source string, addTime int64) error

同意好友申请

func AcceptFriendApply

func AcceptFriendApply(userId, friendId string) (int64, error)

同意好友申请 但是不更新时间

func ActiveAd

func ActiveAd(id string, isActive int) error

func AddApply

func AddApply(tp int, userID, friendID, reason, remark string, source string) (int, error)

添加好友请求

func AddFriendRequest

func AddFriendRequest(tp int, userID, friendID, reason, remark string) (bool, error)

添加好友申请

func AddPrivateChatLog

func AddPrivateChatLog(senderId, receiveId, msgId string, msgType, status, isSnap int, content, ext string, time int64) (int64, int64, error)

添加私聊聊天记录

func AddRoomUserMuted

func AddRoomUserMuted(tx *mysql.MysqlTx, roomId, userId string, mutedType int, deadline int64) (int64, int64, error)

设置成员禁言

func AddToken

func AddToken(userid, token string, createTime int64) (int64, error)

func AddUser

func AddUser(markId, uid, appId, username, phone, userLevel, device, version string, createTime int64) (num int64, userId int64, err error)

insert user info

func AddUserLoginLog

func AddUserLoginLog(userID, deviceType, deviceName, loginType, uuid, version string, loginTime int64) (int64, error)

func AddVerifyApply

func AddVerifyApply(val *types.VerifyApply) (int64, error)

添加认证请求

func AdminCheckLogin

func AdminCheckLogin(appId, account string) ([]map[string]string, error)

GetUserInfo 获取用户信息 根据account

func AlertRoomRevStateByRevId

func AlertRoomRevStateByRevId(revLogId string, state int) (int64, int64, error)

根据LogId修改消息接收状态

func AlterRoomAvatar

func AlterRoomAvatar(roomId, avatar string) (int64, int64, error)

修改群头像

func AlterRoomCanAddFriendPermission

func AlterRoomCanAddFriendPermission(roomId string, permisson int) error

修改是否可添加好友

func AlterRoomJoinPermission

func AlterRoomJoinPermission(roomId string, permisson int) error

修改加入群权限

func AlterRoomName

func AlterRoomName(roomId, name string) (int64, int64, error)

修改群名称

func AlterRoomRecordPermission

func AlterRoomRecordPermission(roomId string, permisson int) error

修改群拉取历史记录权限

func AppendApplyLog

func AppendApplyLog(targetId, userId, applyReason, source, remark string, state, tp int, datetime int64) (int64, int64, error)

添加申请记录 target:roomId 或者friendId

func AppendRoomChatLog

func AppendRoomChatLog(senderId, receiveId, msgId string, msgType, isSnap int, content, ext string, time int64) (int64, int64, error)

添加群聊聊天日志

func AppendRoomMemberReceiveLog

func AppendRoomMemberReceiveLog(roomLogId, receiver string, state int) (int64, int64, error)

添加群聊接收日志

func ChangePrivateChatLogStstus

func ChangePrivateChatLogStstus(id, status int) (int64, int64, error)

修改聊天记录状态

func ChangePrivateChatLogStstusByDatetime

func ChangePrivateChatLogStstusByDatetime(userId string, datetime int64) (int64, int64, error)

批量修改聊天记录状态

func ChangePrivateChatLogStstusByUserAndFriendId

func ChangePrivateChatLogStstusByUserAndFriendId(uid, fid string) (int64, int64, error)

修改聊天记录状态

func CheckCatLogIsUser

func CheckCatLogIsUser(userId, id string) (bool, error)

查询该条好友聊天记录是否属于user

func CheckDND

func CheckDND(user1, user2 string) (bool, error)

user1 是否对 user2 消息免打扰 是否消息免打扰 1免打扰 2关闭

func CheckFriend

func CheckFriend(userID, friendID string, isDelete int) (bool, error)

检查是否是好友关系

func CheckRoomMarkIdExist

func CheckRoomMarkIdExist(id string) (bool, error)

检查markId是否唯一

func ClearRoomMutedList

func ClearRoomMutedList(tx *mysql.MysqlTx, roomId string) (int64, int64, error)

清空禁言

func ClearUserDeviceToken

func ClearUserDeviceToken(userId string) (string, error)

return deviceToken and error

func CloseRoom

func CloseRoom(tx *mysql.MysqlTx, roomId string, closeUntil int64) error

func CloseUser

func CloseUser(tx *mysql.MysqlTx, userId string, closeUntil int64) error

func CreateRoom

func CreateRoom(creater, roomName, roomAvatar string, encrypt, canAddFriend, joinPermission, recordPermission, adminMuted, masterMuted int, members []string, randomRoomId string, createTime int64) (int64, error)

创建房间 返回 roomId

func CreateRoomV2

func CreateRoomV2(tx *mysql.MysqlTx, creater, roomName, roomAvatar string, encrypt, canAddFriend, joinPermission, recordPermission, adminMuted, masterMuted int, randomRoomId string, createTime int64) (int64, error)

创建房间 返回 roomId

func DelRoomUserMuted

func DelRoomUserMuted(tx *mysql.MysqlTx, roomId, userId string) (int64, int64, error)

取消成员禁言

func DeleteAd

func DeleteAd(id string) error

func DeleteCatLog

func DeleteCatLog(id string) (int, error)

删除好友聊天记录

func DeleteFriend

func DeleteFriend(userID, friendID string, alterTime int64) error

删除好友

func DeletePraise

func DeletePraise(id string) (int64, int64, error)

func DeleteRoomById

func DeleteRoomById(roomId string) (int64, int64, error)

删除群

func DeleteRoomMemberById

func DeleteRoomMemberById(userId, roomId string, time int64) (int64, int64, error)

删除群成员

func DeleteRoomMsgContent

func DeleteRoomMsgContent(id string) (int, error)

删除群聊天记录

func FindAddFriendConfByUserId

func FindAddFriendConfByUserId(userId string) ([]map[string]string, error)

查找加好友配置

func FindAdminById

func FindAdminById(id string) ([]map[string]string, error)

获取管理员信息 根据id

func FindAdminOperateLog

func FindAdminOperateLog(appId, query string, optType *int, startId int64, number int) (int64, []map[string]string, error)

查询操作日志列表

func FindAdminOperateLogByOptType

func FindAdminOperateLogByOptType(appId string, optType int, startId int64, number int) ([]map[string]string, error)

查询操作日志列表,根据操作类型

func FindAllPrivateLogs

func FindAllPrivateLogs() ([]map[string]string, error)

func FindAllReaded

func FindAllReaded(uid string, status int, time int64) ([]map[string]string, error)

func FindAllRecommendRooms

func FindAllRecommendRooms(appId string) ([]map[string]string, error)

获取所有手动推荐群 0:非推荐群 1:推荐群

func FindAllUnReadNum

func FindAllUnReadNum(uid string, status int) ([]map[string]string, error)

func FindApplyByUserId

func FindApplyByUserId(userId, friendId string) ([]map[string]string, error)

查询添加好友记录

func FindApplyCount

func FindApplyCount(userID, friendID string) (int32, error)

查询好友请求数量

func FindApplyId

func FindApplyId(userID, friendID string) ([]map[string]string, error)

查询好友请求数量

func FindApplyOrderByTime

func FindApplyOrderByTime(userId, friendId string) ([]map[string]string, error)

查询最新添加好友记录

func FindApplySource

func FindApplySource(userID, friendID string) ([]map[string]string, error)

查询好友来源

func FindBlockedList

func FindBlockedList(userId string) ([]map[string]string, error)

func FindCatLog

func FindCatLog(userID, friendID string, start int64, number int) ([]map[string]string, int64, error)

查找消息记录

func FindChatLogV2

func FindChatLogV2(userID, friendID string, start int64, number int) ([]map[string]string, int64, error)

查找消息记录,不需要判断时间是否是添加好友之后

func FindChatLogsNumberBetween

func FindChatLogsNumberBetween(uid string, isDel int, begin, end int64) ([]map[string]string, error)

查找消息记录

func FindCreateRoomNumbers

func FindCreateRoomNumbers(masterId string) (int, error)

创建群个数 未解散

func FindFeeSum

func FindFeeSum(appId string) ([]map[string]string, error)

查询手续费总额

func FindFirstMsg

func FindFirstMsg(uid, fid string) ([]map[string]string, error)

查询好友第一条聊天记录

func FindFriend

func FindFriend(userID, friendID string) ([]map[string]string, error)

查看好友关系详情 备注等信息

func FindFriendIdByUserId

func FindFriendIdByUserId(uid string) ([]map[string]string, error)

查询所有未删除好友id

func FindFriendInfoByUserId

func FindFriendInfoByUserId(uid string, fid string) ([]map[string]string, error)

TODO 查询好友id头像备注(昵称)

func FindFriendRequest

func FindFriendRequest(userID, friendID string) ([]map[string]string, error)

查询好友请求是否存在

func FindFriendRequestInfo

func FindFriendRequestInfo(userID, friendID string) ([]map[string]string, error)

查询好友请求信息

func FindFriendSource

func FindFriendSource(userId, friendId string) ([]map[string]string, error)

查询好友来源

func FindFriendsAfterTime

func FindFriendsAfterTime(id string, tp int, time int64) ([]map[string]string, error)

获取好友列表, 无论是否删除都返回

func FindLastCatLogId

func FindLastCatLogId(userID, friendID string) ([]map[string]string, error)

获取最新的消息id

func FindLastlogByUserId

func FindLastlogByUserId(uid string, status int) ([]map[string]string, error)

func FindNotBurndLogAfter

func FindNotBurndLogAfter(uid string, isDel int, time int64) ([]map[string]string, error)

func FindNotBurndLogBetween

func FindNotBurndLogBetween(uid string, isDel int, begin, end int64) ([]map[string]string, error)

func FindPrivateChatLog

func FindPrivateChatLog(senderId, receiveId string) ([]map[string]string, error)

查找聊天记录

func FindPrivateChatLogById

func FindPrivateChatLogById(logId string) ([]map[string]string, error)

func FindPrivateChatLogByMsgId

func FindPrivateChatLogByMsgId(senderId, MsgId string) ([]map[string]string, error)

func FindPrivateChatLogByStatus

func FindPrivateChatLogByStatus(senderId, receiveId string, status int) ([]map[string]string, error)

通过状态查找聊天记录

func FindRoomBanTimes

func FindRoomBanTimes(roomId string) (int, error)

群被封号次数

func FindRoomMemberIds

func FindRoomMemberIds(roomId int) ([]map[string]string, error)

查询群成员id

func FindRoomMemberName

func FindRoomMemberName(roomId, userId string) ([]map[string]string, error)

查询群昵称 没有的话 返回用户名称

func FindRoomMemberSetNoDisturbing

func FindRoomMemberSetNoDisturbing(roomId string, noDisturbing int) ([]map[string]string, error)

查找群中消息免打扰的成员id列表 1:开启了免打扰,2:关闭

func FindRoomsInAppClosed

func FindRoomsInAppClosed(appId string) ([]map[string]string, error)

查找某个app所有下封禁群

func FindRoomsInAppQueryMarkId

func FindRoomsInAppQueryMarkId(appId, query string) ([]map[string]string, error)

func FindRoomsInAppUnClose

func FindRoomsInAppUnClose(appId string) ([]map[string]string, error)

查找某个app所有下未封禁群

func FindSessionKeyAlert

func FindSessionKeyAlert(userId string, endTime int64) ([]map[string]string, error)

查询 群会话秘钥 通知消息

func FindToken

func FindToken(userid string) ([]map[string]string, error)

func FindTypicalChatLogs

func FindTypicalChatLogs(userID, friendID, owner string, start int64, number int, queryType []string) ([]map[string]string, int64, error)

查找特定类型消息记录

func FindUnReadNum

func FindUnReadNum(uid, fid string) (int32, error)

查询未读消息数

func FindUserBanTimes

func FindUserBanTimes(userId string) (int, error)

用户被封号次数

func FindUserByDeviceToken

func FindUserByDeviceToken(appId, deviceToken string) ([]map[string]string, error)

GetUserInfo 获取用户信息 根据device_token

func FindUserByMarkId

func FindUserByMarkId(appId, uid string) ([]map[string]string, error)

根据uid查找用户id

func FindUserByPhone

func FindUserByPhone(appId, uid string) ([]map[string]string, error)

func FindUserByPhoneV2

func FindUserByPhoneV2(appId, phone string) ([]map[string]string, error)

func FindUserByToken

func FindUserByToken(appId, token string) ([]map[string]string, error)

func FindUserCreateRoomsNumber

func FindUserCreateRoomsNumber(userId string) (int, error)

func FindUserIdByDeviceToken

func FindUserIdByDeviceToken(deviceToken string) (string, *string, error)

func FindUserInfo

func FindUserInfo(friendID string) ([]map[string]string, error)

查看好友详情

func FindVerifyApplyById

func FindVerifyApplyById(id string) ([]map[string]string, error)

func FindVerifyApplyByState

func FindVerifyApplyByState(tp int, targetId string, state int) ([]map[string]string, error)

func GetActiveNumber

func GetActiveNumber(appId string, startTime, endTime int64) (int64, error)

活跃用户统计

func GetActiveNumberAsPlatform

func GetActiveNumberAsPlatform(appId string, startTime, endTime int64, device string) (int64, error)

活跃用户统计 筛选平台

func GetActiveNumberAsVersion

func GetActiveNumberAsVersion(appId string, startTime, endTime int64, version string) (int64, error)

活跃用户统计 筛选版本

func GetActiveNumberAsVersionAndPlatform

func GetActiveNumberAsVersionAndPlatform(appId string, startTime, endTime int64, version, platform string) (int64, error)

活跃用户统计 筛选版本和平台

func GetActiveUsersInfoAsVersion

func GetActiveUsersInfoAsVersion(appId string, startTime, endTime int64, version string) ([]map[string]string, error)

活跃用户统计信息 筛选版本

func GetActiveUsersInfoAsVersionAndPlatform

func GetActiveUsersInfoAsVersionAndPlatform(appId string, startTime, endTime int64, version, platform string) ([]map[string]string, error)

活跃用户统计信息 筛选版本和平台

func GetAdNumbers

func GetAdNumbers(appId string) ([]map[string]string, error)

func GetAllAd

func GetAllAd(appId string) ([]map[string]string, error)

func GetAllFriendUnreadMsgCountByUserId

func GetAllFriendUnreadMsgCountByUserId(uid string, status int) (int32, error)

获取所有好友未读消息数

func GetApplyById

func GetApplyById(id int64) ([]map[string]string, error)

func GetApplyByUserAndTarget

func GetApplyByUserAndTarget(userId, targetId string, tp int) ([]map[string]string, error)

func GetApplyList

func GetApplyList(userId string, id int64, number int) ([]map[string]string, error)

获取申请列表

func GetApplyListNumber

func GetApplyListNumber(uid string) (int, error)

func GetChatlog

func GetChatlog(roomId string, startLogId, joinTime int64, number int) ([]map[string]string, string, error)

获取聊天消息 startLogId 0:从最新一条消息开始 大于0:从startLogId开始

func GetCloseRoomCountInApp

func GetCloseRoomCountInApp(appId string) (int64, error)

func GetCloseUserCountInApp

func GetCloseUserCountInApp(appId string) (int64, error)

func GetConn

func GetConn() *mysql.MysqlConn

func GetCreateRoomsLimit

func GetCreateRoomsLimit(appId string, level int) (int, error)

获取用户创建群个数上限

func GetEnabledRooms

func GetEnabledRooms() ([]map[string]string, error)

获取所有群

func GetFriendList

func GetFriendList(id string, tp, isDelete int) ([]map[string]string, error)

func GetIsChain

func GetIsChain(userId string) (int64, error)

func GetJoinedRooms

func GetJoinedRooms(userId string) ([]map[string]string, error)

func GetLastUserLoginLog

func GetLastUserLoginLog(userID string, deviceType []string) ([]map[string]string, error)

func GetLeaderBoardAsLike

func GetLeaderBoardAsLike(startTime, endTime int64) ([]map[string]string, error)

func GetLeaderBoardAsReward

func GetLeaderBoardAsReward(startTime, endTime int64) ([]map[string]string, error)

func GetNewTx

func GetNewTx() (*mysql.MysqlTx, error)

func GetOpenNumber

func GetOpenNumber(appId string, startTime, endTime int64) (int64, error)

func GetOpenNumberAsPlatform

func GetOpenNumberAsPlatform(appId string, startTime, endTime int64, device string) (int64, error)

func GetOpenNumberAsVersion

func GetOpenNumberAsVersion(appId string, startTime, endTime int64, version string) (int64, error)

func GetOpenNumberAsVersionAndPlatform

func GetOpenNumberAsVersionAndPlatform(appId string, startTime, endTime int64, version, platform string) (int64, error)

func GetPraiseByLogId

func GetPraiseByLogId(channelType int, logId string) ([]map[string]string, error)

func GetPraiseByLogIdAndOptId

func GetPraiseByLogIdAndOptId(channelType int, logId, optId string) ([]map[string]string, error)

查询某个人对某条消息的赞赏情况

func GetPraiseByLogIdLimit

func GetPraiseByLogIdLimit(channelType int, logId string, startId int64, number int) ([]map[string]string, int64, error)

func GetPraiseListByTarget

func GetPraiseListByTarget(msgSenderId string, channelType int, targetId string, startId int64, number int) ([]map[string]string, int64, error)

获取指定好友或者群中所有人对你的奖赏列表

func GetPraiseTodayLimit

func GetPraiseTodayLimit(optId string) ([]map[string]string, error)

func GetRedPacket

func GetRedPacket(packetId string) ([]map[string]string, error)

func GetRoomChatLogsByUserId

func GetRoomChatLogsByUserId(roomId, owner string, startId, joinTime int64, number int, queryType []string) ([]map[string]string, string, error)

func GetRoomCountInApp

func GetRoomCountInApp(appId string) (int64, error)

-------------------admin------------------// 根据appId获取应用的所有未解散的群聊,包括被封群

func GetRoomList

func GetRoomList(user string, Type int) ([]map[string]string, error)

获取群列表

func GetRoomManagerAndMaster

func GetRoomManagerAndMaster(roomId string) ([]map[string]string, error)

获取群中管理员和群主信息

func GetRoomMemberInfo

func GetRoomMemberInfo(roomId, userId string, isDel int) ([]map[string]string, error)

获取群中某成员信息

func GetRoomMemberInfoByName

func GetRoomMemberInfoByName(roomId, name string) ([]map[string]string, error)

获取群中某成员信息

func GetRoomMemberNumber

func GetRoomMemberNumber(roomId string) (int64, error)

获取群成员总数

func GetRoomMemberNumberByLevel

func GetRoomMemberNumberByLevel(roomId string, level int) (int64, error)

获取群中相应角色的数量

func GetRoomMembers

func GetRoomMembers(roomId string, searchNumber int) ([]map[string]string, error)

获取群成员信息列表

func GetRoomMembersLimit

func GetRoomMembersLimit(appId string, level int) (int, error)

获取群的成员数上限

func GetRoomMsgBurntNumber

func GetRoomMsgBurntNumber(logId string) (int, error)

func GetRoomMsgContent

func GetRoomMsgContent(id string) ([]map[string]string, error)

根据logId获取消息记录

func GetRoomMsgContentAfter

func GetRoomMsgContentAfter(rooms []string, time int64, isDel int) ([]map[string]string, error)

func GetRoomMsgContentBetween

func GetRoomMsgContentBetween(rooms []string, begin, end int64, isDel int) ([]map[string]string, error)

reutrn [begin,end)

func GetRoomMsgContentByMsgId

func GetRoomMsgContentByMsgId(senderId, msgId string) ([]map[string]string, error)

根据MsgId获取消息记录

func GetRoomMsgContentNumberBetween

func GetRoomMsgContentNumberBetween(rooms []string, begin, end int64, isDel int) ([]map[string]string, error)

reutrn [begin,end)

func GetRoomMutedListNumber

func GetRoomMutedListNumber(roomId string) ([]map[string]string, error)

获取群禁言数量

func GetRoomMutedListNumberByTx

func GetRoomMutedListNumberByTx(tx *mysql.MysqlTx, roomId string) ([]map[string]string, error)

获取群禁言数量 事务

func GetRoomMutedType

func GetRoomMutedType(roomId string) ([]map[string]string, error)

获取群禁言类型

func GetRoomRevMsgByLogId

func GetRoomRevMsgByLogId(logId, userId string) ([]map[string]string, error)

func GetRoomSystemMsgNumber

func GetRoomSystemMsgNumber(roomId string) (int64, error)

获取公告数目

func GetRoomUserApplyInfo

func GetRoomUserApplyInfo(roomId, userId string) ([]map[string]string, error)

func GetRoomUserMuted

func GetRoomUserMuted(roomId, userId string) ([]map[string]string, error)

获取成员禁言信息

func GetRoomUsersMutedInfo

func GetRoomUsersMutedInfo(roomId string, mutedType int) ([]map[string]string, error)

获取群的某种禁言信息列表

func GetRoomsById

func GetRoomsById(id string) ([]map[string]string, error)

根据userId获取加入的所有群

func GetRoomsInfo

func GetRoomsInfo(roomId string, isDel int) ([]map[string]string, error)

获取群详情

func GetRoomsInfoByMarkId

func GetRoomsInfoByMarkId(markId string, isDel int) ([]map[string]string, error)

获取群详情通过markId

func GetSystemMsg

func GetSystemMsg(roomId string, startLogId int64, number int) ([]map[string]string, string, error)

获群公告

func GetUnreadApplyNumber

func GetUnreadApplyNumber(userId string) (int, error)

func GetUserInfoByAccount

func GetUserInfoByAccount(appId, account string) ([]map[string]string, error)

GetUserInfo 获取用户信息 根据account

func GetUserInfoById

func GetUserInfoById(userId string) ([]map[string]string, error)

func GetUserInfoByUID

func GetUserInfoByUID(appId, uid string) ([]map[string]string, error)

GetUserInfo 获取用户信息 根据uid

func GetUsers

func GetUsers() ([]map[string]string, error)

获取所有UserId

func GetUsersInAppClosed

func GetUsersInAppClosed(appId string) ([]map[string]string, error)

查找某个app下所有封禁用户

func GetUsersInAppQueryUid

func GetUsersInAppQueryUid(appId, query string) ([]map[string]string, error)

查找所有app下用户信息,包括被封用户,模糊查询 uid account

func GetUsersInAppUnClose

func GetUsersInAppUnClose(appId string) ([]map[string]string, error)

查找某个app下所有未封禁用户

func GetVersionList

func GetVersionList(appId string) ([]map[string]string, error)

func GrandTotalUsers

func GrandTotalUsers(appId string, time int64) (int64, error)

累计用户

func GrandTotalUsersAsPlatform

func GrandTotalUsersAsPlatform(appId string, time int64, device string) (int64, error)

累计用户根据平台查询

func GrandTotalUsersAsVersion

func GrandTotalUsersAsVersion(appId string, time int64, version string) (int64, error)

累计用户 根据版本查询

func IncreaseUsers

func IncreaseUsers(appId string, startTime, endTime int64) (int64, error)

新增用户

func IncreaseUsersAsPlatform

func IncreaseUsersAsPlatform(appId string, startTime, endTime int64, device string) (int64, error)

新增用户 根据平台查询

func IncreaseUsersAsVersion

func IncreaseUsersAsVersion(appId string, startTime, endTime int64, version string) (int64, error)

新增用户 根据版本号

func IncreaseUsersAsVersionAndPlatform

func IncreaseUsersAsVersionAndPlatform(appId string, startTime, endTime int64, version, platform string) (int64, error)

新增用户 根据版本号和平台

func IncreaseUsersInfoAsVersion

func IncreaseUsersInfoAsVersion(appId string, startTime, endTime int64, version string) ([]map[string]string, error)

新增用户信息 根据版本号

func IncreaseUsersInfoAsVersionAndPlatform

func IncreaseUsersInfoAsVersionAndPlatform(appId string, startTime, endTime int64, version, platform string) ([]map[string]string, error)

新增用户信息 根据版本号和平台

func InitDB

func InitDB(cfg *types.Config)

func InsertAd

func InsertAd(appId, name, url string, duration int, link string, isActive int) (int64, error)

func InsertAdminOperateLog

func InsertAdminOperateLog(tx *mysql.MysqlTx, admin, target string, targetType, optType int, reason string, createTime, effectiveTime int64) error

func InsertFriend

func InsertFriend(userID, friendID, remark, extRemark string, dnd, top int, addTime int64) (err error)

func InsertOpenLog

func InsertOpenLog(userId, appId, device, version string, createTime int64) error

添加埋点

func InsertPacket

func InsertPacket(packetID, userID, toID, tType, size, amount, remark string, cType, coin int, time int64) error

func InsertPraise

func InsertPraise(val *types.Praise) (int64, int64, error)

func InsertPraiseUser

func InsertPraiseUser(val *types.PraiseUser) (int64, int64, error)

func InsertUser

func InsertUser(markId, uid, appId, userName, account, email, area, phone, userLevel, verified, avatar, depositAddress, device, version string, createTime int64) (num int64, userId int64, err error)

insert user info

func IsNeedConfirm

func IsNeedConfirm(userId string, state int) error

修改加好友配置 是否需要验证

func JoinRoomApproveStepChangeState

func JoinRoomApproveStepChangeState(tx *mysql.MysqlTx, logId int64, status int) (int64, int64, error)

入群申请,步骤2 更改状态

func JoinRoomApproveStepInsert

func JoinRoomApproveStepInsert(tx *mysql.MysqlTx, roomId, userId, source string) (int64, int64, error)

入群申请,步骤1 添加user

func LikeOrRewardCount

func LikeOrRewardCount(channelType int, logId string, tp int) ([]map[string]string, error)

func NeedAnswer

func NeedAnswer(userId string, question, answer string) error

需要回答问题

func NotNeedAnswer

func NotNeedAnswer(userId string) error

不需要回答问题

func PersonalVerifyList

func PersonalVerifyList(appId string, search *string, start, end int64, state *int) (int64, []map[string]string, error)

func QueryStr

func QueryStr(src string) string

func RejectFriend

func RejectFriend(userID, friendID string) error

拒绝好友申请

func RoomAddMember

func RoomAddMember(tx *mysql.MysqlTx, userId, roomId string, memberLevel int, createTime int64, source string) (int64, int64, error)

添加群成员

func RoomInviteConfirm

func RoomInviteConfirm(userId string) ([]map[string]string, error)

func RoomVerifyList

func RoomVerifyList(appId string, search *string, start, end int64, state *int) (int64, []map[string]string, error)

func RoomsOrderActiveMember

func RoomsOrderActiveMember(appId string, datetime int64) ([]map[string]string, error)

根据群的发言人数递减排序 查询区间:(datetime,now)

func RoomsOrderActiveMsg

func RoomsOrderActiveMsg(appId string, datetime int64) ([]map[string]string, error)

根据群的发言条数递减排序

func SenderInfo

func SenderInfo(userID string) ([]map[string]string, error)

查找user的名字头像

func SetAdName

func SetAdName(id, name string) error

设置广告名称

func SetCreateRoomsLimit

func SetCreateRoomsLimit(appId string, level, limit int) error

设置用户创建群个数上限

func SetFriendDND

func SetFriendDND(userID, friendID string, DND int) error

设置好友免打扰

func SetFriendExtRemark

func SetFriendExtRemark(userID, friendID, remark string) error

设置好友详细备注

func SetFriendIsBlock

func SetFriendIsBlock(userId, friendId string, state int, alterTime int64) error

修改是否加入黑名单标志

func SetFriendRemark

func SetFriendRemark(userID, friendID, remark string) error

设置好友备注

func SetFriendTop

func SetFriendTop(userID, friendID string, top int) error

设置好友置顶

func SetMemberNickname

func SetMemberNickname(userId, roomId string, nickname string) (int64, int64, error)

群成员设置昵称

func SetNewMaster

func SetNewMaster(master, userId, roomId string, level int) error

转让群主

func SetQuestionandAnswer

func SetQuestionandAnswer(userId, question, answer string) error

设置问题和答案

func SetRecommendRoom

func SetRecommendRoom(id string, recommend int) (int64, int64, error)

设置手动推荐群

func SetRoomInviteConfirm

func SetRoomInviteConfirm(userId string, needConfirm int) (int64, int64, error)

设置邀请入群是否需要验证

func SetRoomMemberLevel

func SetRoomMemberLevel(userId, roomId string, level int) (int64, int64, error)

设置群成员等级

func SetRoomMembersLimit

func SetRoomMembersLimit(appId string, level, limit int) error

设置群的成员数上限

func SetRoomMutedType

func SetRoomMutedType(tx *mysql.MysqlTx, roomId string, mutedType int) (int64, int64, error)

设置群禁言类型

func SetRoomNoDisturbing

func SetRoomNoDisturbing(userId, roomId string, noDisturbing int) (int64, int64, error)

设置群免打扰

func SetRoomOnTop

func SetRoomOnTop(userId, roomId string, onTop int) (int64, int64, error)

设置群置顶

func SetRoomVerifyed

func SetRoomVerifyed(tx *mysql.MysqlTx, roomId, identificationInfo string) (int64, int64, error)

设置为认证群

func SetUserVerifyed

func SetUserVerifyed(tx *mysql.MysqlTx, userId, identificationInfo string) (int64, int64, error)

设置为认证用户

func SetVerifyState

func SetVerifyState(tx *mysql.MysqlTx, id string, state int) error

设置状态

func UpdateApply

func UpdateApply(applyUser, target string, tp int, reason, remark, source string, state int) (int64, error)

更新好友申请数据

func UpdateCodeByUid

func UpdateCodeByUid(uid, code string) error

func UpdateDepositAddress

func UpdateDepositAddress(userId, address string) error

func UpdateDeviceToken

func UpdateDeviceToken(userId, deviceToken, deviceType string) error

func UpdateEmail

func UpdateEmail(id, email string) error

func UpdateInviteCode

func UpdateInviteCode(userId, code string) error

func UpdateIsChain

func UpdateIsChain(userId string, ischain int) error

func UpdateNowVersion

func UpdateNowVersion(userId, version string) error

func UpdatePhone

func UpdatePhone(id, phone string) error

func UpdatePrivateLogContentById

func UpdatePrivateLogContentById(logId, content string) error

func UpdatePrivateLogStateById

func UpdatePrivateLogStateById(logId string, state int) (int64, int64, error)

修改聊天记录状态

func UpdatePublicKey

func UpdatePublicKey(userId, publicKey, privateKey string) error

func UpdateToken

func UpdateToken(userId, token string, createTime int64) error

func UpdateUid

func UpdateUid(markId, userId, uid string) error

func UpdateUserAvatar

func UpdateUserAvatar(id, avatar string) error

func UpdateUsername

func UpdateUsername(userId, username string) error

func UpdateVerifyFeeState

func UpdateVerifyFeeState(id string, feeState int) error

更新 手续费到账信息

func UpdateVersionUsersNumber

func UpdateVersionUsersNumber(appId, nowVersion string) (int64, error)

func VerifyGetFee

func VerifyGetFee(appId string) ([]map[string]string, error)

func VerifySetFee

func VerifySetFee(tx *mysql.MysqlTx, appId string, tp int, currency string, amount float64) error

----------------------------认证-----------------------//

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL