Documentation
¶
Overview ¶
****************************************************************************** Copyright (c) 2010~2018 charles
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. created at 2018-10-29 16:07:16 *****************************************************************************
Index ¶
- Constants
- Variables
- func AccountTransfer(from, to *Users, fromTid, toTid int64, money float64) (err error)
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func CapVerify(key string, text string) bool
- func CollectFrom168Api()
- func ErrHandler(next echo.HandlerFunc) echo.HandlerFunc
- func FakeBet(gid int64)
- func GetInitCount(bean InitInterface) (count int64)
- func InitDB() (err error)
- func InitLoggers()
- func InsertBeansBlocking(beans interface{}, sns ...*xorm.Session) error
- func MustAsset(name string) []byte
- func NewAntiPool() *antiPool
- func NormalGet(bean interface{}) (err error)
- func NormalGet2(has bool, err error) error
- func NormalUpdate(a int64, err error) error
- func PrizeALL()
- func RestartCollect168Api()
- func RestartCollectApi(c echo.Context) error
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func ReturnJSON(c echo.Context, code int, bean interface{}) error
- func ReturnOK(c echo.Context, bean interface{}) error
- func SnCallBack(fn func(bsn *xorm.Session) error) (err error)
- func UserViewGet(bean UserView) echo.HandlerFunc
- type API168Collector
- type API168Data
- type API168Source
- type AgentTeamReport
- type Amount
- type AuthMiddleware
- func (m *AuthMiddleware) Auth() echo.MiddlewareFunc
- func (m *AuthMiddleware) IsAgent(next echo.HandlerFunc) echo.HandlerFunc
- func (m *AuthMiddleware) IsJustAgent(next echo.HandlerFunc) echo.HandlerFunc
- func (m *AuthMiddleware) IsManager(next echo.HandlerFunc) echo.HandlerFunc
- func (m *AuthMiddleware) IsRoomOwner(next echo.HandlerFunc) echo.HandlerFunc
- func (m *AuthMiddleware) IsSuperManager(next echo.HandlerFunc) echo.HandlerFunc
- func (m *AuthMiddleware) IsVip(next echo.HandlerFunc) echo.HandlerFunc
- type BaseModel
- type BaseModelA
- type BeanRecords
- type BetTotal
- type BuyBind
- type Captcha
- type CaptchaObj
- type CleanWorker
- type Clear
- type ClearConstruction
- type Client
- type CountDownMsg
- type DashBoard
- type DashData
- type Dragon
- type DragonDataSource
- type DragonNature
- type EarnInfo
- type FakeInstance
- type FakeScheme
- type FakeSetting
- type FakeUserSay
- type FlyDataCount
- type FlyRecords
- type FlyRoomAccount
- type FlyRoomSetting
- type FlySplitRecords
- type FlySysTypes
- type FlySysURL
- type FlyTotal
- type GameHelps
- type GameLimitRoom
- type GameLimitView
- type GameLotteries
- func (m *GameLotteries) AfterInsert()
- func (m *GameLotteries) AfterUpdate()
- func (m *GameLotteries) GetByGid(gid int64) (err error)
- func (m *GameLotteries) InitData() (err error)
- func (m *GameLotteries) IsPk10() bool
- func (m *GameLotteries) IsSsc() bool
- func (m *GameLotteries) LoadOrStoreAll() (lts []*GameLotteries, err error)
- func (m *GameLotteries) Request(c echo.Context) (err error)
- type GameLtRoomSet
- type GameOpenData
- func (m *GameOpenData) ClearWorkerDo()
- func (m *GameOpenData) Curl168kaiAPI(lt *GameLotteries) (err error)
- func (m *GameOpenData) GetRealOpenTime() (time.Time, error)
- func (m *GameOpenData) HasOpenNumber(openNumber string) (has bool, err error)
- func (m *GameOpenData) History(c echo.Context) (err error)
- func (m *GameOpenData) SetInfo(info *kaiapisdk.KaiOpenInfo)
- type GamePlaysNormal
- func (m *GamePlaysNormal) DecodeEveType(beans []PlaysInterface) (err error)
- func (m *GamePlaysNormal) EncodeEveType(beans []*GamePlaysNormal) (list []*PlayContent, err error)
- func (m *GamePlaysNormal) GetBaseModel() BaseModel
- func (m *GamePlaysNormal) GetNormalPlays() NormalPlays
- func (m *GamePlaysNormal) InitData() (err error)
- func (m *GamePlaysNormal) Request(c echo.Context) (err error)
- func (m *GamePlaysNormal) SetNormalPlays(nm NormalPlays)
- type GamePlaysRoom
- func (m *GamePlaysRoom) AfterUpdate()
- func (m *GamePlaysRoom) GetBaseModel() BaseModel
- func (m *GamePlaysRoom) GetNormalPlays() NormalPlays
- func (m *GamePlaysRoom) GetPlays(gid, rid int64, playName string) (prize.Plays, error)
- func (m *GamePlaysRoom) InitData() (err error)
- func (m *GamePlaysRoom) Request(c echo.Context) (err error)
- func (m *GamePlaysRoom) SetNormalPlays(nm NormalPlays)
- type GameTimesList
- func (m *GameTimesList) GetCurrentInfo(c echo.Context) (err error)
- func (m *GameTimesList) GetNextOpenInfo(gid int64) (next *NextOpenInfo, err error)
- func (m *GameTimesList) GetNextOpenTime(gid int64) (minInt int64, err error)
- func (m *GameTimesList) GetThisOpenInfo(gid int64) (nowInfo *NextOpenInfo, err error)
- func (m *GameTimesList) GetThisOpenTime(gid int64) (maxInt int64, err error)
- func (m *GameTimesList) InitData() (err error)
- func (m *GameTimesList) LoadAllStoreByGid(gid int64) (list []*GameTimesList, err error)
- type GameTimesPlan
- type Hub
- type HubSendInterface
- type InitInterface
- type ManagerSetting
- type ModStructure
- type NextOpenInfo
- type NormalPlays
- type OrderContent
- type PlayContent
- type PlayName
- type PlaysInterface
- type PointAction
- type PrizeDo
- type PrizeSendData
- type QueryBean
- type Rebate
- type RebateOrders
- type RebatePath1
- type RebatePath1Normal
- type RebatePath1Put
- type RebatePath1Request
- type RebatePathRequest2
- type Recover
- type ReportAccount
- type ReportUserAccount
- type ReportUserOrder
- type Reports
- type Roles
- type RoomAgentRebate
- type RoomClient
- type RoomHub
- type RoomRecorder
- type RoomSetRelation
- type RoomSetting
- type RoomViewInterface
- type SysAdvertising
- type SysAppSlides
- type SysGameLimit
- type SysMsgRecords
- type SysNotice
- type SysRoomNotice
- type SysRooms
- type SysSetting
- type SysSettingRoom
- type TSOrderObj
- type TSOrderRequestObj
- type Test01
- type TimePlan
- type Transfer
- type TransferHandler
- type UserAccount
- type UserAccountChange
- type UserAccountReportOrderSumUnPrize
- type UserAgentRoles
- type UserExtendRebate
- type UserExtendRoles
- type UserLoginList
- type UserOnline
- type UserOrderList
- type UserRelationData
- type UserView
- type UserVipRoles
- type UserWxInfo
- type Users
- func (m *Users) Add(c echo.Context) (err error)
- func (m *Users) AddFakeUser(c echo.Context) (err error)
- func (m *Users) AfterDelete()
- func (m *Users) AfterInsert()
- func (m *Users) AfterUpdate()
- func (m *Users) BeforeInsert()
- func (m *Users) BindWx(c echo.Context) (err error)
- func (m *Users) BindWxLogin(c echo.Context) (err error)
- func (m *Users) ChangePassword(c echo.Context) (err error)
- func (*Users) DeleteUsers() echo.HandlerFunc
- func (*Users) DisableUsers() echo.HandlerFunc
- func (m *Users) Edit(c echo.Context) (err error)
- func (m *Users) GenerateToken() (tokenString string, err error)
- func (m *Users) GetByName(name string) (user *Users, err error)
- func (m *Users) GetByUid(uid int64) (user *Users, err error)
- func (m *Users) GetRobotUser() (robot *Users)
- func (Users) GetRoomOwnerByRid(roomID int64) (user *Users, err error)
- func (m *Users) GetVisitor(c echo.Context) *Users
- func (m *Users) InitData() (err error)
- func (m *Users) InsertPrepare() (err error)
- func (m *Users) IsAgent() bool
- func (m *Users) IsJustAgent() bool
- func (m *Users) IsManager() bool
- func (m *Users) IsRobot() bool
- func (m *Users) IsRoomOwner() bool
- func (m *Users) IsRoomOwnerOrAgent() bool
- func (m *Users) IsSuperManager() bool
- func (m *Users) IsVip() bool
- func (m *Users) Login(c echo.Context) (err error)
- func (m *Users) ReferrerAPP(c echo.Context) (err error)
- func (m *Users) Register(c echo.Context) (err error)
- func (m *Users) ResetPwd(c echo.Context) (err error)
- func (m *Users) Robot(c echo.Context) (err error)
- func (m *Users) SelfRoomOwner() (ru *Users, err error)
- func (m *Users) VerifyRole(queryUser *Users) error
- func (m *Users) VerifyToken(tokenStr string) (err error)
- func (m *Users) WxLogin(c echo.Context) (err error)
- func (m *Users) WxUnBind(unionID string) (err error)
- type VFlyRecords
- type VFlyRoomSetting
- type VGameTimesPlan
- type VLtRoomList
- type VOpenData
- type VOpenDataDetection
- type VReportRoom
- type VSysRooms
- type VUserAccountChange
- type VUserLoginList
- type VUserOrderList
- func (m *VUserOrderList) GetBetMoney() int64
- func (m *VUserOrderList) GetContent() string
- func (m *VUserOrderList) GetID() int64
- func (m *VUserOrderList) GetOpenNumber() string
- func (m *VUserOrderList) GetPlayName() string
- func (m *VUserOrderList) PathIDColumnName() string
- func (m *VUserOrderList) TableName() string
- func (m *VUserOrderList) UidColumnName() string
- type VUsers
- type WebSocket
- type WsBetRemainBetData
- type WsBetRemainPlayContent
- type WsBetRemainSendData
- type WsError
- type WsSearch
- type WsSendJSON
- type WsWinMessageData
- type WsWinMessageSendConstruction
- type WsWinMessageSendData
- type WxUserInfo
Constants ¶
const ( LtTypePk10 LtTypeSsc )
const ( Pk10NumberLen = 10 SscNumberLen = 5 )
const ( RobotName = "robot" Uppercase = "ABCDEFGHJKLMNPQRSTUVWXYZ" //Lowercase = "abcdefghijklmnopqrstuvwxyz" //Alphabetic = Uppercase + Lowercase Numeric = "23456789" )
const ( WsTypeError = "error" WsTypeMessage = "message" WsTypeWinMessage = "WinMessage" WsTypeBet = "bet" WsTypeChangeGid = "ChangeGid" WsTypeChangedGid = "ChangedGid" WsTypeSelfInfo = "SelfInfo" WsTypeSearch = "Search" )
const (
SysSingleName = "single"
)
const (
TimeLayOut = "2006-01-02 15:04:05"
)
Variables ¶
var ( ErrOrmNotFound = errors.New("record not found") ErrOrmNotModified = errors.New("record not modified") ErrOrmZeroResult = errors.New("record zero result") )
var ( FlySysURISHandler = &FlySysTypes{} FlyRoomSettingHandler = &FlyRoomSetting{} FlyRecordsHandler = &FlyRecords{} )
var ( RoomHubHandler = newRoomHub() SecretForRoomWs = "UAOKSPXI4JQ85P93G47FBL6Y2UX174KH" )
var ( RoomSettingHandler = &SysSettingRoom{} DefRoomSetting = RoomSetting{ AllDisableTalk: false, ShieldWords: "操|妈|日|逼", CardinalNumber: 188, CsRCode: "", DisplayVipTotal: true, RebateScale: 0.01, EnableAutoRebate: false, RebateTypeID: 1, FlyEnable: true, BetCancel: true, Extender: echo.Map{}, } )
var ( SysSettingHandler = &SysSetting{Name: SysSingleName} DefManagerSetting = ManagerSetting{ APPName: "天亿软件", APPLogo: "", APPVersion: "v1.0.0", APPDownloadUrl: "", RoomOwnerUserCash: false, EnableRoomHasAgent: false, SearchCode: "AAAA", SaleAESKey: "S4oRnFM2WLAKInt8SE4M6m7XNyn4r0Tu0JVDUoJz5KfILgQg", } )
var ( UserOrderHandler = &UserOrderList{} ErrTimeCancelBet = errors.New("当期已封盘,不允许撤单") ErrRefuseCancelBet = errors.New("当前房间不允许撤单") )
var ( ErrVipRoleID = errors.New("错误的会员级别") ErrRoleNotFound = errors.New("房间不存在角色级别") )
var ( ErrUsersRCodeNotFound = errors.New("无效的推荐码") ErrUsersRepeatUserID = errors.New("用户名/微信号重复") ErrUsersDisabled = errors.New("用户账户已被冻结") )
var ( UserNameErr = errors.New("用户名不能包含除字母和数字之外的字符") UserPasswordErr = errors.New("密码格式错误,支持大写字母+小写字母+数字的组合") )
var (
AccountChangeTypes = map[int64]string{
1: "活动赠送",
2: "会员上分",
3: "奖金派发",
4: "会员退水",
5: "会员下分",
6: "会员投注",
7: "财务核算",
8: "投注撤单",
9: "代理退水",
}
)
var (
AuthHandler = &AuthMiddleware{}
)
var CaptchaHandler echo.HandlerFunc = func(c echo.Context) error { key := c.QueryParam("key") var capN *Captcha if key != "" { capN = NewCapFresh(key) } else { capN = NewCap() } c.Response().Header().Set(echo.HeaderAccessControlExposeHeaders, "Set-Cap-Key") c.Response().Header().Set("Set-Cap-Key", capN.Key) return c.Blob(http.StatusOK, "image/png", capN.Content) }
var (
DashHandler = &DashBoard{}
)
var (
ErrLessMoney = errors.New("账户余额不足")
)
var ErrLoginHasNoLottery = errors.New("房间不存在开放的彩种")
登录前,验证房间是否存在打开的彩种,如果不存在,则拒绝登录
var (
ErrNextIssue = errors.New("获取下期期号失败")
)
var ErrWrongRole = errors.New("用户权限不足")
var (
GameOpenDataHandler = &GameOpenData{}
)
var (
ModHandler = &ModStructure{}
)
var (
RecordsHandler = &BeanRecords{}
)
var (
ReportsHandler = &Reports{}
)
var (
TSOrder = &TSOrderObj{}
)
var (
UserHandler = &Users{}
)
var (
UserOnlineHandler = &UserOnline{}
)
var Ws *wsmsg.ApiWs
var (
WsBucket = new(bucketClass)
)
Functions ¶
func AccountTransfer ¶
AccountTransfer ... 账户转账
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func CollectFrom168Api ¶
func CollectFrom168Api()
func ErrHandler ¶
func ErrHandler(next echo.HandlerFunc) echo.HandlerFunc
func GetInitCount ¶
func GetInitCount(bean InitInterface) (count int64)
func InitLoggers ¶
func InitLoggers()
func InsertBeansBlocking ¶
分块批量插入数据,每块150条
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func NewAntiPool ¶
func NewAntiPool() *antiPool
func NormalGet2 ¶
func NormalUpdate ¶
func RestartCollect168Api ¶
func RestartCollect168Api()
func RestartCollectApi ¶
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
func UserViewGet ¶
func UserViewGet(bean UserView) echo.HandlerFunc
Types ¶
type API168Collector ¶
type API168Collector struct {
// contains filtered or unexported fields
}
func (*API168Collector) AfterGetOpenCode ¶
func (c *API168Collector) AfterGetOpenCode(openData *wsmsg.OpenData)
func (*API168Collector) HasOpenCode ¶
func (c *API168Collector) HasOpenCode(openData *wsmsg.OpenData) bool
func (*API168Collector) LtName ¶
func (c *API168Collector) LtName() string
type API168Data ¶
type API168Source ¶
type API168Source struct { ErrorCode int `json:"errorCode,omitempty"` Message string `json:"message"` Result struct { BusinessCode int `json:"businessCode,omitempty"` Message string `json:"message"` Data *[]API168Data } }
type AgentTeamReport ¶
type AgentTeamReport struct { TotalBet int64 `json:"total_bet"` TotalWin Amount `json:"total_win"` Data []*ReportUserOrder `json:"data"` OrderParam string `json:"order_param,omitempty" query:"order_param" validate:"required"` TimeBetween string `json:"time_between,omitempty" query:"time_between" form:"time_between"` }
type AuthMiddleware ¶
type AuthMiddleware struct{}
func (*AuthMiddleware) Auth ¶
func (m *AuthMiddleware) Auth() echo.MiddlewareFunc
func (*AuthMiddleware) IsAgent ¶
func (m *AuthMiddleware) IsAgent(next echo.HandlerFunc) echo.HandlerFunc
func (*AuthMiddleware) IsJustAgent ¶
func (m *AuthMiddleware) IsJustAgent(next echo.HandlerFunc) echo.HandlerFunc
IsJustAgent 房间代理
func (*AuthMiddleware) IsManager ¶
func (m *AuthMiddleware) IsManager(next echo.HandlerFunc) echo.HandlerFunc
func (*AuthMiddleware) IsRoomOwner ¶
func (m *AuthMiddleware) IsRoomOwner(next echo.HandlerFunc) echo.HandlerFunc
func (*AuthMiddleware) IsSuperManager ¶
func (m *AuthMiddleware) IsSuperManager(next echo.HandlerFunc) echo.HandlerFunc
func (*AuthMiddleware) IsVip ¶
func (m *AuthMiddleware) IsVip(next echo.HandlerFunc) echo.HandlerFunc
IsVip 包含普通代理
type BaseModel ¶
type BaseModel struct { ID int64 `json:"id,omitempty" xorm:"autoincr pk"` Created utils.JSONTime `json:"created,omitempty" xorm:"notnull created index"` Updated utils.JSONTime `json:"updated,omitempty" xorm:"notnull updated index"` Version int64 `json:"version,omitempty" xorm:"notnull version index"` Deleted utils.JSONTime `json:"deleted,omitempty" xorm:"null deleted index"` }
type BaseModelA ¶
type BeanRecords ¶
type BeanRecords struct { Count int64 `json:"count"` Records interface{} `json:"records"` Qb *QueryBean `json:"-"` }
func NewBeanRecords ¶
func NewBeanRecords(rs interface{}, qb *QueryBean) *BeanRecords
func (*BeanRecords) List ¶
func (op *BeanRecords) List(qus ...string) (err error)
func (*BeanRecords) NormalRequest ¶
func (op *BeanRecords) NormalRequest(bean interface{}, queryAndString ...string) echo.HandlerFunc
type BetTotal ¶
type BetTotal struct { BetSum int64 `json:"bet_sum"` Bonus float64 `json:"bonus"` Earn float64 `json:"earn"` BetSlice []*VUserOrderList `json:"bet_slice"` }
本期 投注统计,盈亏统计
type Captcha ¶
func NewCapFresh ¶
type CaptchaObj ¶
type CleanWorker ¶
type CleanWorker interface {
ClearWorkerDo()
}
type ClearConstruction ¶
func (*ClearConstruction) ClearData ¶
func (m *ClearConstruction) ClearData(view RoomViewInterface, delBean interface{}) (err error)
type Client ¶
type Client struct { //client user User *Users CurrentLt *GameLotteries CurrentLogin *UserLoginList // contains filtered or unexported fields }
Client is a middleman between the websocket connection and the hub.
func (*Client) SendToSelf ¶
func (c *Client) SendToSelf(wd *WsSendJSON)
type CountDownMsg ¶
type DashBoard ¶
type DashBoard struct{}
func (*DashBoard) Request ¶
func (m *DashBoard) Request() echo.HandlerFunc
type DashData ¶
type DashData struct { TodayEarn float64 `json:"today_earn"` TodayAddPoint float64 `json:"today_add_point"` TodayMinusPoint float64 `json:"today_minus_point"` TodayBet float64 `json:"today_bet"` TodayPrize float64 `json:"today_prize"` TotalVip int `json:"total_vip"` TotalRooms int `json:"total_rooms"` TotalOnline int `json:"total_online"` TotalAmount float64 `json:"total_amount"` TotalUnPrize float64 `json:"total_un_prize"` // contains filtered or unexported fields }
type DragonDataSource ¶
type DragonDataSource struct { Gid int64 `json:"gid" query:"gid"` LimitDragonSliceLen int `json:"limit_dragon_slice_len" query:"limit_dragon_slice_len"` OpenDataSlice []*DragonNature `json:"open_data_slice"` DragonMap []*Dragon `json:"dragon_map"` NatureSlice [][]string `json:"-"` // contains filtered or unexported fields }
type DragonNature ¶
type DragonNature struct { OpenData *GameOpenData `json:"open_data"` Nature prize.NatureSource `json:"nature"` }
type EarnInfo ¶
type EarnInfo struct { RegTime utils.JSONTime `json:"reg_time"` BetSum float64 `json:"bet_sum"` GiveSum float64 `json:"give_sum"` AddPointSum float64 `json:"add_point_sum"` PrizeSum float64 `json:"prize_sum"` RebateSum float64 `json:"rebate_sum"` AgentRebateSum float64 `json:"agent_rebate_sum"` MinusPointSum float64 `json:"minus_point_sum"` CheckSum float64 `json:"check_sum"` Earn float64 `json:"earn"` UnPrize float64 `json:"un_prize"` }
type FakeInstance ¶
type FakeInstance struct { UserBean *VUsers `xorm:"extends"` Setting *FakeSetting `xorm:"extends"` }
type FakeScheme ¶
type FakeScheme struct { BaseModel `xorm:"extends"` RoomID int64 `json:"room_id" xorm:"notnull index" validate:"required"` Gid int64 `json:"gid" xorm:"notnull index" validate:"required"` Content string `json:"content" xorm:"text" validate:"required"` }
func (*FakeScheme) GetContent ¶
func (m *FakeScheme) GetContent() string
func (*FakeScheme) GetRoomColumn ¶
func (m *FakeScheme) GetRoomColumn() string
func (*FakeScheme) IsPk10 ¶
func (m *FakeScheme) IsPk10() bool
func (*FakeScheme) IsSsc ¶
func (m *FakeScheme) IsSsc() bool
func (*FakeScheme) SetRoomID ¶
func (m *FakeScheme) SetRoomID(roomID int64)
type FakeSetting ¶
type FakeSetting struct { BaseModel `xorm:"extends"` UID int64 `json:"uid" xorm:"notnull unique" validate:"required"` Gid int64 `json:"gid" xorm:"notnull index" validate:"required"` //绑定方案列表 SchemeList []int64 `json:"scheme_list" xorm:"json" validate:"required"` //出现概率 Probability int `json:"probability" validate:"omitempty,min=0,max=100"` //在线时间段 TimeBetween []string `json:"time_between" xorm:"json" validate:"required"` //投注延时秒数 BetDelaySeconds []int `json:"bet_delay_seconds" xorm:"json"` //自动上分系数 AddPoint []int `json:"add_point" xorm:"json"` //自动下分系数 ReducePoint []int `json:"reduce_point" xorm:"json"` //是否自动下分 AutoReducePoint bool `json:"auto_reduce_point"` }
func (FakeSetting) CreateFakesAfterCreateRoom ¶
func (FakeSetting) CreateFakesAfterCreateRoom(room *SysRooms) (err error)
房间添加托 每个彩种添加5个托
func (*FakeSetting) PostMid ¶
func (m *FakeSetting) PostMid(next echo.HandlerFunc) echo.HandlerFunc
type FakeUserSay ¶
type FakeUserSay struct { //begin,end TimestampList []int64 User *Users LtBean *GameLotteries }
func (*FakeUserSay) Say ¶
func (m *FakeUserSay) Say()
type FlyDataCount ¶
type FlyDataCount struct { BaseModel `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull index" query:"gid" validate:"required"` RoomID int64 `json:"room_id" xorm:"notnull index"` Issue string `json:"issue" xorm:"varchar(20) notnull index" query:"issue"` PlayName string `json:"play_name,omitempty" xorm:"varchar(20) notnull index"` PlayContentName string `json:"play_content_name,omitempty" xorm:"varchar(20) notnull index"` //当期投注金额统计 CountBet int64 `json:"count_bet" xorm:"notnull index"` Data []*FlyDataCount `json:"data,omitempty" xorm:"-"` }
type FlyRecords ¶
type FlyRecords struct { BaseModel `xorm:"extends"` OrderID string `json:"order_id" xorm:"notnull varchar(50) unique"` Result bool `json:"result" xorm:"notnull index"` }
飞单记录表
type FlyRoomAccount ¶
type FlyRoomSetting ¶
type FlyRoomSetting struct { BaseModel `xorm:"extends"` FlyRoomAccount `xorm:"extends"` RoomID int64 `json:"room_id" xorm:"notnull index"` //TypeID int64 `json:"type_id" xorm:"notnull index"` HostID int64 `json:"host_id" xorm:"notnull index"` FlyGidList []int64 `json:"fly_gid_list" xorm:"notnull"` UriHostList []string `json:"uri_host_list" xorm:"notnull"` //暂停使用 Disable bool `json:"disable" xorm:"notnull comment(暂停使用)"` }
房主飞单账号设置
func (*FlyRoomSetting) GetList ¶
func (m *FlyRoomSetting) GetList() (list []*VFlyRoomSetting, err error)
type FlySplitRecords ¶
type FlySplitRecords struct { BaseModel `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull index"` RoomID int64 `json:"room_id" xorm:"notnull index"` Issue string `json:"issue" xorm:"varchar(20) notnull index"` BetMoney int64 `json:"bet_money" xorm:"notnull"` PlayName string `json:"play_name" xorm:"varchar(20) notnull index"` Content string `json:"content" xorm:"varchar(300) notnull"` //-1=>待飞单,1=>成功,2=>失败 StatusCode int `json:"status_code" xorm:"notnull index"` }
func (*FlySplitRecords) GetRoomColumn ¶
func (m *FlySplitRecords) GetRoomColumn() string
func (*FlySplitRecords) SetRoomID ¶
func (m *FlySplitRecords) SetRoomID(roomID int64)
func (*FlySplitRecords) Update ¶
func (m *FlySplitRecords) Update() error
type FlySysTypes ¶
type FlySysTypes struct { BaseModel `xorm:"extends"` Type string `json:"type" xorm:"varchar(20) notnull unique"` Enable bool `json:"enable" xorm:"notnull index"` }
func (*FlySysTypes) InitData ¶
func (m *FlySysTypes) InitData() (err error)
type GameLimitRoom ¶
type GameLimitRoom struct { BaseModel `xorm:"extends"` RoomID int64 `json:"room_id" xorm:"notnull index"` Gid int64 `json:"gid" xorm:"notnull index" query:"gid" validate:"required"` GameLimitView `xorm:"extends"` }
func (*GameLimitRoom) AfterUpdate ¶
func (m *GameLimitRoom) AfterUpdate()
func (*GameLimitRoom) GetLimitByGid ¶
func (m *GameLimitRoom) GetLimitByGid(gid int64, playName, playContentName string) (limit *GameLimitView, err error)
type GameLimitView ¶
type GameLimitView struct { Name string `json:"name"` Short string `json:"short" xorm:"notnull varchar(20) index"` MinBet float64 `json:"min_bet"` MaxBet float64 `json:"max_bet"` }
GameLimitView 玩法限额设置
type GameLotteries ¶
type GameLotteries struct { BaseModel `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull unique" validate:"required"` TypeID int `json:"type_id" xorm:"notnull index" validate:"required"` TypeName string `json:"type_name" xorm:"varchar(20) notnull index"` Name string `json:"name" xorm:"varchar(10) notnull unique" validate:"required"` //168采集,需要根据中文名进行筛选彩种 NameCN string `json:"name_cn" xorm:"varchar(100) notnull" validate:"required"` //平台是否开启 Enable bool `json:"enable" xorm:"notnull index default(1)"` //是否是系统彩 IsSys bool `json:"is_sys" xorm:"notnull index default(0)"` //封盘倒计时秒数 NormalRemainSecond int64 `json:"normal_remain_second" validate:"required"` //投注间隔分钟(至少) NormalBetBeforeMt int64 `json:"normal_bet_before_mt" validate:"required"` //彩种图标本地路径 ./assets/ Icon string `json:"icon" xorm:"null text"` //开奖视频地址 VideoURL string `json:"video_url" xorm:"null text"` //期号是否连续+1 IssueAddOne bool `json:"issue_add_one" xorm:"notnull"` }
func (*GameLotteries) AfterInsert ¶
func (m *GameLotteries) AfterInsert()
func (*GameLotteries) AfterUpdate ¶
func (m *GameLotteries) AfterUpdate()
func (*GameLotteries) GetByGid ¶
func (m *GameLotteries) GetByGid(gid int64) (err error)
func (*GameLotteries) InitData ¶
func (m *GameLotteries) InitData() (err error)
func (*GameLotteries) IsPk10 ¶
func (m *GameLotteries) IsPk10() bool
func (*GameLotteries) IsSsc ¶
func (m *GameLotteries) IsSsc() bool
func (*GameLotteries) LoadOrStoreAll ¶
func (m *GameLotteries) LoadOrStoreAll() (lts []*GameLotteries, err error)
type GameLtRoomSet ¶
type GameLtRoomSet struct { BaseModel `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull index" query:"gid" validate:"required"` RoomID int64 `json:"room_id" xorm:"notnull index" query:"room_id" validate:"required"` RoomEnable bool `json:"room_enable" xorm:"notnull index"` LtBean *GameLotteries `json:"lt_bean,omitempty" xorm:"-" validate:"-"` //封盘倒计时秒数 NormalRemainSecond int64 `json:"normal_remain_second" validate:"required"` }
房间彩种设置 覆盖全局设置
func (*GameLtRoomSet) AfterDelete ¶
func (m *GameLtRoomSet) AfterDelete()
func (*GameLtRoomSet) AfterInsert ¶
func (m *GameLtRoomSet) AfterInsert()
func (*GameLtRoomSet) AfterUpdate ¶
func (m *GameLtRoomSet) AfterUpdate()
type GameOpenData ¶
type GameOpenData struct { BaseModel `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull index"` Issue string `json:"issue" xorm:"varchar(20) notnull index"` NextIssue string `json:"next_issue" xorm:"varchar(20) notnull index"` OpenNumber string `json:"open_number" xorm:"varchar(90) notnull index"` OpenTime utils.JSONTime `json:"open_time" xorm:"notnull index"` OpenTimestamp int64 `json:"open_timestamp" xorm:"notnull index"` NextOpenTime utils.JSONTime `json:"next_open_time" xorm:"notnull index"` NextOpenTimestamp int64 `json:"next_open_timestamp" xorm:"notnull index"` GetTime utils.JSONTime `json:"get_time"` GetTimestamp int64 `json:"get_timestamp"` }
func (*GameOpenData) ClearWorkerDo ¶
func (m *GameOpenData) ClearWorkerDo()
func (*GameOpenData) Curl168kaiAPI ¶
func (m *GameOpenData) Curl168kaiAPI(lt *GameLotteries) (err error)
Curl168kaiAPI ... get from 168kai
func (*GameOpenData) GetRealOpenTime ¶
func (m *GameOpenData) GetRealOpenTime() (time.Time, error)
func (*GameOpenData) HasOpenNumber ¶
func (m *GameOpenData) HasOpenNumber(openNumber string) (has bool, err error)
func (*GameOpenData) SetInfo ¶
func (m *GameOpenData) SetInfo(info *kaiapisdk.KaiOpenInfo)
type GamePlaysNormal ¶
type GamePlaysNormal struct { BaseModel `xorm:"extends"` NormalPlays `xorm:"extends"` }
func (*GamePlaysNormal) DecodeEveType ¶
func (m *GamePlaysNormal) DecodeEveType(beans []PlaysInterface) (err error)
func (*GamePlaysNormal) EncodeEveType ¶
func (m *GamePlaysNormal) EncodeEveType(beans []*GamePlaysNormal) (list []*PlayContent, err error)
func (*GamePlaysNormal) GetBaseModel ¶
func (m *GamePlaysNormal) GetBaseModel() BaseModel
func (*GamePlaysNormal) GetNormalPlays ¶
func (m *GamePlaysNormal) GetNormalPlays() NormalPlays
func (*GamePlaysNormal) InitData ¶
func (m *GamePlaysNormal) InitData() (err error)
func (*GamePlaysNormal) Request ¶
func (m *GamePlaysNormal) Request(c echo.Context) (err error)
系统管理员设置基础赔率
func (*GamePlaysNormal) SetNormalPlays ¶
func (m *GamePlaysNormal) SetNormalPlays(nm NormalPlays)
type GamePlaysRoom ¶
type GamePlaysRoom struct { BaseModel `xorm:"extends"` NormalPlays `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull index" query:"gid" validate:"required"` RoomID int64 `json:"room_id" xorm:"notnull index"` Enable bool `json:"enable" xorm:"notnull index"` }
func (*GamePlaysRoom) AfterUpdate ¶
func (m *GamePlaysRoom) AfterUpdate()
func (*GamePlaysRoom) GetBaseModel ¶
func (m *GamePlaysRoom) GetBaseModel() BaseModel
func (*GamePlaysRoom) GetNormalPlays ¶
func (m *GamePlaysRoom) GetNormalPlays() NormalPlays
func (*GamePlaysRoom) InitData ¶
func (m *GamePlaysRoom) InitData() (err error)
func (*GamePlaysRoom) SetNormalPlays ¶
func (m *GamePlaysRoom) SetNormalPlays(nm NormalPlays)
type GameTimesList ¶
type GameTimesList struct { BaseModel `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull index"` Sid int `json:"sid" xorm:"notnull index"` //time string HH:mm:ss TimeString string `json:"time_string" xorm:"varchar(10) notnull index"` }
func (*GameTimesList) GetCurrentInfo ¶
func (m *GameTimesList) GetCurrentInfo(c echo.Context) (err error)
func (*GameTimesList) GetNextOpenInfo ¶
func (m *GameTimesList) GetNextOpenInfo(gid int64) (next *NextOpenInfo, err error)
GetNextOpenInfo 获取下期开奖时间,期号 期号用日期+序号标识 特殊彩种需要单独处理
func (*GameTimesList) GetNextOpenTime ¶
func (m *GameTimesList) GetNextOpenTime(gid int64) (minInt int64, err error)
GetNextOpenTime ... 获取下期开奖时间戳 CST
func (*GameTimesList) GetThisOpenInfo ¶
func (m *GameTimesList) GetThisOpenInfo(gid int64) (nowInfo *NextOpenInfo, err error)
GetThisOpenInfo ...
func (*GameTimesList) GetThisOpenTime ¶
func (m *GameTimesList) GetThisOpenTime(gid int64) (maxInt int64, err error)
GetOpenTime ... 获取当前开奖时间戳, CST
func (*GameTimesList) InitData ¶
func (m *GameTimesList) InitData() (err error)
func (*GameTimesList) LoadAllStoreByGid ¶
func (m *GameTimesList) LoadAllStoreByGid(gid int64) (list []*GameTimesList, err error)
type GameTimesPlan ¶
type GameTimesPlan struct { BaseModel `xorm:"extends"` Gid int64 `json:"gid" xorm:"notnull unique" query:"gid" validate:"required"` //json Plan []TimePlan `json:"plan" xorm:"notnull json"` TotalCount int `json:"total_count" xorm:"notnull" validate:"required"` }
func (*GameTimesPlan) InitData ¶
func (m *GameTimesPlan) InitData() (err error)
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
func (*Hub) KickOutAll ¶
func (h *Hub) KickOutAll()
func (*Hub) KickOutUser ¶
func (*Hub) SendMessage ¶
func (h *Hub) SendMessage(wsData *WsSendJSON)
type HubSendInterface ¶
type HubSendInterface interface { //发送聊天消息 SendMessage(wsData *WsSendJSON) }
通用聊天消息广播 code == ok,type = message, from? to?
type InitInterface ¶
type InitInterface interface { //InitData init data for table InitData() (err error) }
type ManagerSetting ¶
type ManagerSetting struct { APPName string `json:"app_name"` APPLogo string `json:"app_logo"` APPVersion string `json:"app_version"` APPDownloadUrl string `json:"app_download_url"` //房主是否需要购买额度 RoomOwnerUserCash bool `json:"room_owner_user_cash"` //允许房间拥有代理 EnableRoomHasAgent bool `json:"enable_room_has_agent"` //校验搜索码 SearchCode string `json:"search_code"` //接入代理销售系统AESKey SaleAESKey string `json:"sale_aes_key"` }
type ModStructure ¶
type ModStructure struct{}
func (*ModStructure) GetAccountChangeTypes ¶
func (m *ModStructure) GetAccountChangeTypes() echo.HandlerFunc
type NextOpenInfo ¶
type NormalPlays ¶
type NormalPlays struct { TypeID int `json:"type_id" xorm:"notnull index" query:"type_id"` PlayName string `json:"play_name" xorm:"varchar(10) notnull index"` Content []*PlayContent `json:"content" xorm:"BLOB notnull"` }
func (*NormalPlays) GetOdds ¶
func (m *NormalPlays) GetOdds(name string) float64
GetOdds 获取赔率,如果找不到玩法内容,则返回0
type OrderContent ¶
func (*OrderContent) GetRawTxt ¶
func (m *OrderContent) GetRawTxt() string
func (*OrderContent) IsPk10 ¶
func (m *OrderContent) IsPk10() bool
func (*OrderContent) IsSsc ¶
func (m *OrderContent) IsSsc() bool
type PlayContent ¶
type PlaysInterface ¶
type PlaysInterface interface { GetBaseModel() BaseModel GetNormalPlays() NormalPlays SetNormalPlays(nm NormalPlays) }
type PointAction ¶
type PointAction struct { //类型,2:上分;5:下分 TypeID int64 `json:"type_id"` //true:允许,false:拒绝 Action bool `json:"action"` Money float64 `json:"money"` MsgData *SysMsgRecords `json:"msg_data" validate:"required,structonly"` // contains filtered or unexported fields }
上下分操作
type PrizeSendData ¶
type PrizeSendData struct { User VUsers `json:"user"` Data BetTotal `json:"data"` LtBean GameLotteries `json:"ltBean"` }
type QueryBean ¶
type QueryBean struct { Limit string `json:"limit" query:"limit" form:"limit" validate:"required"` OrderParam string `json:"order_param" query:"order_param" form:"order_param"` WhereParam string `json:"where_param" query:"where_param" form:"where_param"` TimeBetween string `json:"time_between" query:"time_between" form:"time_between"` TimeColumnName string `json:"time_column_name" query:"time_column_name" form:"time_column_name"` }
type Rebate ¶
type RebateOrders ¶
type RebateOrders struct { VUserOrderList `xorm:"extends"` SumMoney float64 `json:"sum_money"` }
type RebatePath1 ¶
type RebatePath1Normal ¶
type RebatePath1Put ¶
type RebatePath1Put struct { RebatePath1Normal ExcludeUIDList []int64 `json:"exclude_uid_list" validate:"required"` }
type RebatePath1Request ¶
type RebatePath1Request struct { RebatePath1Normal Limit []int `json:"limit" validate:"required"` }
type RebatePathRequest2 ¶
type RebatePathRequest2 struct { //1,按流水;2,按亏损 RebateMode int `json:"rebate_mode" validate:"required"` TimeBetween []string `json:"time_between" validate:"required"` Limit []int `json:"limit" validate:"required"` ExcludeUIDList []int64 `json:"exclude_uid_list" validate:"required"` //强制退水 Force bool `json:"force"` }
type ReportAccount ¶
type ReportAccount struct { RoomName string `json:"room_name"` SumGive float64 `json:"sum_give"` SumAddPoint float64 `json:"sum_add_point"` SumBonus float64 `json:"sum_bonus"` SumRebate float64 `json:"sum_rebate"` SumAgentRebate float64 `json:"sum_agent_rebate"` SumMinusPoint float64 `json:"sum_minus_point"` SumBet float64 `json:"sum_bet"` SumCheck float64 `json:"sum_check"` Earn float64 `json:"earn"` UnPrize float64 `json:"un_prize"` }
type ReportUserAccount ¶
type ReportUserOrder ¶
type ReportUserOrder struct { UserName string `json:"user_name"` Nick string `json:"nick"` Ico string `json:"ico"` Wx string `json:"wx"` IsDy bool `json:"is_dy"` RoomID int64 `json:"room_id"` RoomName string `json:"room_name"` LtNameCN string `json:"lt_name_cn"` SumBet int64 `json:"sum_bet"` SumBonus float64 `json:"sum_bonus"` SumWin float64 `json:"sum_win"` Unbalanced int64 `json:"unbalanced"` }
type RoomAgentRebate ¶
type RoomAgentRebate struct {
BeanRecords BeanRecords
}
type RoomClient ¶
type RoomClient struct { User *Users // contains filtered or unexported fields }
func (*RoomClient) BindMsg ¶
func (c *RoomClient) BindMsg(msg, bean interface{}) (err error)
type RoomHub ¶
type RoomHub struct {
// contains filtered or unexported fields
}
func (*RoomHub) SendMessage ¶
func (h *RoomHub) SendMessage(wsData *WsSendJSON)
type RoomRecorder ¶
type RoomSetRelation ¶
type RoomSetRelation struct { //模式: //1=>给一个用户(会员/代理)设置上级代理 //2=>给下级用户(列表)设置上级代理 Mode int `json:"mode" validate:"required"` AgentUID int64 `json:"agent_uid" validate:"required"` SetUID int64 `json:"set_uid"` SetUIDSlice []int64 `json:"set_uid_slice"` // contains filtered or unexported fields }
设置上下级关系
func (RoomSetRelation) ResetToRoomOwner ¶
func (RoomSetRelation) ResetToRoomOwner(c echo.Context) (err error)
type RoomSetting ¶
type RoomSetting struct { //全员禁言 AllDisableTalk bool `json:"all_disable_talk,omitempty"` //屏蔽关键字 ShieldWords string `json:"shield_words,omitempty"` //在线人数基数 CardinalNumber int `json:"cardinal_number"` //客服二维码地址,需上传 CsRCode string `json:"cs_r_code"` //开启会员数据统计显示 DisplayVipTotal bool `json:"display_vip_total,omitempty"` //退水比例,百分比值,比如0.01 RebateScale float64 `json:"rebate_scale,omitempty"` //是否开启自动退水,每一次用户派奖结束,按照设置的退水方式和退水比例进行退水 EnableAutoRebate bool `json:"enable_auto_rebate,omitempty"` //设定退水方式, //1=>按投注金额(流水) //2=>按用户亏损 //退水比例由房主设定 RebateTypeID int `json:"rebate_type_id,omitempty"` //开启飞单 FlyEnable bool `json:"fly_enable"` //是否允许撤单 BetCancel bool `json:"bet_cancel"` Extender interface{} `json:"extender"` SscLH1 bool `json:"ssc_lh1"` //房间会员ip日注册限制 LimitRegisterTimesForIP int `json:"limit_register_times_for_ip"` }
type RoomViewInterface ¶
type RoomViewInterface interface {
GetID() int64
}
type SysAdvertising ¶
type SysAppSlides ¶
type SysGameLimit ¶
type SysGameLimit struct { BaseModel `xorm:"extends"` TypeID int `json:"type_id"` GameLimitView `xorm:"extends"` }
func (*SysGameLimit) InitData ¶
func (m *SysGameLimit) InitData() (err error)
type SysMsgRecords ¶
type SysMsgRecords struct { BaseModel `xorm:"extends"` WsSendJSON `xorm:"extends"` }
func NewSysMsgRecords ¶
func NewSysMsgRecords(ws WsSendJSON) *SysMsgRecords
func (*SysMsgRecords) AfterSet ¶
func (m *SysMsgRecords) AfterSet(field string, result xorm.Cell)
test {"type":"message","message":"聊天消息内容文字"}
func (*SysMsgRecords) ClearWorkerDo ¶
func (m *SysMsgRecords) ClearWorkerDo()
func (*SysMsgRecords) GetRoomColumn ¶
func (m *SysMsgRecords) GetRoomColumn() string
func (*SysMsgRecords) SetRoomID ¶
func (m *SysMsgRecords) SetRoomID(roomID int64)
type SysRoomNotice ¶
type SysRoomNotice struct { BaseModel `xorm:"extends"` RoomID int64 `json:"room_id" xorm:"notnull index"` Title string `json:"title" xorm:"varchar(100) notnull index"` Image string `json:"image" xorm:"varchar(200) notnull"` Content string `json:"content" xorm:"longtext notnull"` }
func (*SysRoomNotice) GetRoomColumn ¶
func (m *SysRoomNotice) GetRoomColumn() string
func (*SysRoomNotice) SetRoomID ¶
func (m *SysRoomNotice) SetRoomID(roomID int64)
type SysRooms ¶
type SysRooms struct { BaseModel `xorm:"extends"` Name string `json:"name" xorm:"varchar(50) notnull index" validate:"required"` OwnerID int64 `json:"owner_id" xorm:"notnull unique"` OwnerName string `json:"owner_name,omitempty" xorm:"-" validate:"required,min=3,max=20"` Wx string `json:"wx,omitempty" xorm:"-" validate:"required,min=3"` Expire utils.JSONTime `json:"expire" xorm:"notnull index" validate:"required,gt"` Enable bool `json:"enable" xorm:"notnull index default(1)"` }
func (*SysRooms) AfterDelete ¶
func (m *SysRooms) AfterDelete()
func (*SysRooms) AfterInsert ¶
func (m *SysRooms) AfterInsert()
func (*SysRooms) AfterUpdate ¶
func (m *SysRooms) AfterUpdate()
func (*SysRooms) Create ¶
create a room,need room name need give the room_owner name, default password(123456) upID = visitor's id need give the expire time omit enable,this orm action is must use session + need add wx
func (*SysRooms) EnableOpen ¶
EnableOpen ... 判断房间是否开启,当房间关闭之后,所有人都无法进入该房间
type SysSetting ¶
type SysSetting struct { BaseModel `xorm:"extends"` Name string `json:"name" xorm:"varchar(100) notnull unique"` Setting ManagerSetting `json:"setting" xorm:"notnull json"` }
func (*SysSetting) AfterUpdate ¶
func (m *SysSetting) AfterUpdate()
func (*SysSetting) VerifySearchCode ¶
func (m *SysSetting) VerifySearchCode(c echo.Context) (err error)
搜索码校验
type SysSettingRoom ¶
type SysSettingRoom struct { BaseModel `xorm:"extends"` RoomID int64 `json:"room_id" xorm:"notnull unique"` Setting RoomSetting `json:"setting" xorm:"notnull json"` }
func (*SysSettingRoom) AfterUpdate ¶
func (m *SysSettingRoom) AfterUpdate()
func (*SysSettingRoom) SscLH1 ¶
func (m *SysSettingRoom) SscLH1() bool
type TSOrderObj ¶
type TSOrderObj struct {
UserOrderList
}
func (*TSOrderObj) Back1 ¶
func (m *TSOrderObj) Back1() echo.HandlerFunc
type TSOrderRequestObj ¶
type Test01 ¶
type Test01 struct { }
var TestHandler Test01
func (Test01) CanCancel ¶
func (m Test01) CanCancel() echo.HandlerFunc
func (Test01) NoFly ¶
func (m Test01) NoFly() echo.HandlerFunc
func (Test01) SortOnlineRoom ¶
func (m Test01) SortOnlineRoom() echo.HandlerFunc
type TransferHandler ¶
type UserAccount ¶
type UserAccountChange ¶
type UserAccountChange struct { BaseModelA `xorm:"extends"` UID int64 `json:"uid" xorm:"notnull index"` FromUID int64 `json:"from" xorm:"notnull index"` ToUID int64 `json:"to_uid" xorm:"notnull index"` TypeID int64 `json:"type_id" xorm:"notnull index"` TypeName string `json:"type_name" xorm:"varchar(20) notnull"` ChangeMoney float64 `json:"change_money" xorm:"NUMERIC(19,4) notnull"` ThisAmount float64 `json:"this_amount" xorm:"NUMERIC(19,4) notnull"` }
type UserAgentRoles ¶
type UserAgentRoles struct {
Roles `xorm:"extends"`
}
func (*UserAgentRoles) GetRoomColumn ¶
func (*UserAgentRoles) GetRoomColumn() string
func (*UserAgentRoles) SetRoomID ¶
func (m *UserAgentRoles) SetRoomID(roomID int64)
type UserExtendRebate ¶
type UserExtendRebate struct { UID int64 `json:"uid"` Nick string `json:"nick"` Ico string `json:"ico"` VipRoleName string `json:"vip_role_name"` VipRebateScale float64 `json:"vip_rebate_scale"` AgentRoleName string `json:"agent_role_name"` AgentRebateScale float64 `json:"agent_rebate_scale"` RebateMoney float64 `json:"rebate_money"` Amount float64 `json:"amount"` //如果是会员:个人投注总和;如果是代理:直属下级投注总额 SumBet int64 `json:"sum_bet"` //如果是会员:个人盈利总和;如果是代理:直属下级盈利总和 SumWin float64 `json:"sum_win"` }
type UserExtendRoles ¶
type UserExtendRoles struct { BaseModel `xorm:"extends"` UID int64 `json:"uid" xorm:"notnull unique" validate:"required"` VipRoleID int64 `json:"vip_role_id" xorm:"notnull index"` AgentRoleID int64 `json:"agent_role_id" xorm:"notnull index"` Mode int `json:"mode" xorm:"-" validate:"required"` }
UserExtendRoles 用户角色级别扩展
func (*UserExtendRoles) SetUserRole ¶
func (m *UserExtendRoles) SetUserRole(c echo.Context) (err error)
SetUserAgent post 房主操作会员=>代理/设定用户代理级别
type UserLoginList ¶
type UserLoginList struct { BaseModel `xorm:"extends"` UID int64 `json:"uid" xorm:"notnull index"` IP string `json:"ip" xorm:"varchar(20) index"` Place string `json:"place" xorm:"varchar(50) index"` }
func (*UserLoginList) CheckThisLogin ¶
func (m *UserLoginList) CheckThisLogin() bool
检查本次登录和上次登录place是否一致 webSocket 异地登录处理
type UserOnline ¶
type UserOnline struct{}
func (*UserOnline) OnlineList ¶
func (m *UserOnline) OnlineList() (list []*Users, err error)
type UserOrderList ¶
type UserOrderList struct { BaseModelA `xorm:"extends"` UID int64 `json:"uid" xorm:"notnull index"` Gid int64 `json:"gid" xorm:"notnull index"` Issue string `json:"issue" xorm:"varchar(20) notnull index"` //订单编号,uuid,uid OrderID string `json:"order_id" xorm:"varchar(50) notnull unique"` //注数 BetCount int64 `json:"bet_count" xorm:"notnull"` //投注金额 BetMoney int64 `json:"bet_money" xorm:"notnull"` //中奖金额 Bonus float64 `json:"bonus" xorm:"NUMERIC(19,4) notnull"` //盈利金额 WinMoney float64 `json:"win_money" xorm:"NUMERIC(19,4) notnull"` //投注玩法 PlayName string `json:"play_name" xorm:"varchar(20) notnull index"` //投注内容 Content string `json:"content" xorm:"varchar(300) notnull"` WinContent string `json:"win_content" xorm:"varchar(300) notnull"` //-1=>未开奖,1=>未中奖,2=>已中奖,3=>已撤单 StatusCode int `json:"status_code" xorm:"notnull index"` //是否已退水 HasRebated bool `json:"has_rebated" xorm:"notnull index"` // contains filtered or unexported fields }
func (*UserOrderList) Bet ¶
func (m *UserOrderList) Bet(user *Users, betBean *OrderContent) (betList []*UserOrderList, err error)
投注,rawTxt 原始投注文本
func (*UserOrderList) Cancellation ¶
func (m *UserOrderList) Cancellation(c echo.Context) (err error)
type UserRelationData ¶
type UserVipRoles ¶
type UserVipRoles struct { Roles `xorm:"extends"` //是否是默认级别 IsDefault bool `json:"is_default" xorm:"notnull index"` }
func (*UserVipRoles) GetRoomColumn ¶
func (*UserVipRoles) GetRoomColumn() string
func (*UserVipRoles) SetRoomID ¶
func (m *UserVipRoles) SetRoomID(roomID int64)
type UserWxInfo ¶
type UserWxInfo struct { BaseModel `xorm:"extends"` UnionID string `json:"open_id" xorm:"varchar(50) notnull unique"` Info wchat.WxUserInfo `json:"info" xorm:"notnull json"` // contains filtered or unexported fields }
func (*UserWxInfo) InsertIfNotExists ¶
func (m *UserWxInfo) InsertIfNotExists() (err error)
type Users ¶
type Users struct { BaseModel `xorm:"extends"` //微信登录绑定 unionid UserName string `json:"user_name,omitempty" xorm:"varchar(50) notnull unique" validate:"required,min=3,max=50"` Nick string `json:"nick,omitempty" xorm:"varchar(100) notnull index" validate:"required,min=1,max=50"` RCode string `json:"r_code,omitempty" xorm:"varchar(10) notnull index"` Password string `json:"password,omitempty" xorm:"varchar(200) notnull" validate:"required,min=6,max=20"` RoleID int `json:"role_id,omitempty" xorm:"notnull index"` RoleName string `json:"role_name,omitempty" xorm:"varchar(20) notnull"` RoomID int64 `json:"room_id,omitempty" xorm:"notnull index"` //绑定微信号,不能重复 Wx string `json:"wx,omitempty" xorm:"varchar(50) notnull unique"` Phone string `json:"phone,omitempty" xorm:"varchar(15)"` Ico string `json:"ico,omitempty" xorm:"varchar(200)"` Enable bool `json:"enable" xorm:"notnull index default(1)"` Comment string `json:"comment,omitempty" xorm:"text"` UpID int64 `json:"up_id,omitempty" xorm:"notnull index"` //字符串ups字段删除 //Ups string `json:"ups,omitempty" xorm:"text"` PathID string `json:"path_id,omitempty" xorm:"varchar(190) notnull index"` CaptchaObj `xorm:"-"` //是否是假人,不统计数据 IsDy bool `json:"is_dy,omitempty" xorm:"notnull index"` //是否不飞单,默认0:飞单 NotFlyBet bool `json:"not_fly_bet,omitempty" xorm:"notnull index"` //禁言 NoTalk bool `json:"no_talk,omitempty" xorm:"notnull index"` //代理上次反水时间 //会员转换成代理的时候,初始化这个值 //非代理角色这个值为 (`agent_last_rebate_time` IS NULL OR `agent_last_rebate_time`="0001-01-01 00:00:00") AgentLastRebateTime utils.JSONTime `json:"agent_last_rebate_time" xorm:"DATETIME index"` //注册时 记录ip地址 RegIP string `json:"reg_ip" xorm:"not null varchar(15) index"` }
func (*Users) AfterDelete ¶
func (m *Users) AfterDelete()
func (*Users) AfterInsert ¶
func (m *Users) AfterInsert()
func (*Users) AfterUpdate ¶
func (m *Users) AfterUpdate()
func (*Users) BeforeInsert ¶
func (m *Users) BeforeInsert()
func (*Users) BindWxLogin ¶
接收用户信息,+微信账号,+推荐码
func (*Users) DeleteUsers ¶
func (*Users) DeleteUsers() echo.HandlerFunc
func (*Users) DisableUsers ¶
func (*Users) DisableUsers() echo.HandlerFunc
func (*Users) GenerateToken ¶
GenerateToken 生成令牌
func (*Users) GetRobotUser ¶
func (Users) GetRoomOwnerByRid ¶
func (*Users) InsertPrepare ¶
func (*Users) IsRoomOwner ¶
func (*Users) IsRoomOwnerOrAgent ¶
func (*Users) IsSuperManager ¶
func (*Users) SelfRoomOwner ¶
SelfRoomOwner 获取当前用户房主信息
func (*Users) VerifyRole ¶
验证用户级别 m = requestUser
func (*Users) VerifyToken ¶
VerifyToken 验证token
type VFlyRecords ¶
type VFlyRecords struct { FlySplitRecords `xorm:"extends"` NameCN string `json:"name_cn"` }
func (*VFlyRecords) GetID ¶
func (m *VFlyRecords) GetID() int64
type VFlyRoomSetting ¶
type VFlyRoomSetting struct { FlyRoomSetting `xorm:"extends"` HostName string `json:"host_name"` RoomName string `json:"room_name"` RoomOwnerID int64 `json:"room_owner_id"` Type string `json:"type"` }
type VGameTimesPlan ¶
type VGameTimesPlan struct { GameTimesPlan `xorm:"extends"` LtNameCN string `json:"lt_name_cn"` }
type VLtRoomList ¶
type VLtRoomList struct { GameLtRoomSet `xorm:"extends"` LtBean GameLotteries `xorm:"extends"` }
type VOpenData ¶
type VOpenData struct { GameOpenData `xorm:"extends"` NameCN string `json:"name_cn"` TotalUsers int `json:"total_users"` SumBet int `json:"sum_bet"` SumBonus float64 `json:"sum_bonus"` }
type VOpenDataDetection ¶
type VOpenDataDetection struct { Gid int64 `json:"gid"` Issue string `json:"issue"` NameCN string `json:"name_cn"` TotalPeople int `json:"total_people"` SumBet int `json:"sum_bet"` OpenDateFormat GameOpenData `xorm:"-"` }
func (*VOpenDataDetection) Prize ¶
func (m *VOpenDataDetection) Prize() echo.HandlerFunc
手动开奖,并派奖 全部撤单
type VReportRoom ¶
type VReportRoom struct { ID int64 `json:"id"` RoomName string `json:"room_name"` TotalPeople int64 `json:"total_people"` TotalAmount float64 `json:"total_amount"` ReportAccount `xorm:"extends"` }
type VSysRooms ¶
type VSysRooms struct { SysRooms `xorm:"extends"` UID int64 `json:"uid"` Nick string `json:"nick"` Ico string `json:"ico"` Wx string `json:"wx"` IsDy bool `json:"is_dy"` UserName string `json:"user_name"` UpID int64 `json:"up_id"` PathID string `json:"path_id"` RoleID int64 `json:"role_id"` RoleName string `json:"role_name"` UserAmount float64 `json:"user_amount"` Setting RoomSetting `json:"setting" xorm:"json"` CountOnline int `json:"count_online" xorm:"-"` }
func (*VSysRooms) PathIDColumnName ¶
func (*VSysRooms) UidColumnName ¶
type VUserAccountChange ¶
type VUserAccountChange struct { UserAccountChange `xorm:"extends"` Nick string `json:"nick"` Ico string `json:"ico"` Wx string `json:"wx"` IsDy bool `json:"is_dy"` RoleID int64 `json:"role_id"` UserName string `json:"user_name"` UserUpID int64 `json:"user_up_id"` PathID string `json:"path_id"` RoomID int64 `json:"room_id"` RoomName string `json:"room_name"` FromUserName string `json:"from_user_name"` ToUserName string `json:"to_user_name"` }
func (*VUserAccountChange) GetID ¶
func (m *VUserAccountChange) GetID() int64
func (*VUserAccountChange) PathIDColumnName ¶
func (m *VUserAccountChange) PathIDColumnName() string
func (*VUserAccountChange) TableName ¶
func (m *VUserAccountChange) TableName() string
func (*VUserAccountChange) UidColumnName ¶
func (m *VUserAccountChange) UidColumnName() string
type VUserLoginList ¶
type VUserLoginList struct { UserLoginList `xorm:"extends"` Nick string `json:"nick"` Ico string `json:"ico"` Wx string `json:"wx"` IsDy bool `json:"is_dy"` UserName string `json:"user_name"` UpID int64 `json:"up_id"` PathID string `json:"path_id"` RoleID int64 `json:"role_id"` RoleName string `json:"role_name"` RoomID int64 `json:"room_id"` RoomName string `json:"room_name"` }
func (*VUserLoginList) GetID ¶
func (m *VUserLoginList) GetID() int64
func (*VUserLoginList) PathIDColumnName ¶
func (m *VUserLoginList) PathIDColumnName() string
func (*VUserLoginList) TableName ¶
func (m *VUserLoginList) TableName() string
func (*VUserLoginList) UidColumnName ¶
func (m *VUserLoginList) UidColumnName() string
type VUserOrderList ¶
type VUserOrderList struct { UserOrderList `xorm:"extends"` Nick string `json:"nick"` Ico string `json:"ico"` Wx string `json:"wx"` IsDy bool `json:"is_dy"` RoleID int64 `json:"role_id"` UserName string `json:"user_name"` UserUpID int64 `json:"user_up_id"` PathID string `json:"path_id"` RoomID int64 `json:"room_id"` RoomName string `json:"room_name"` LtNameCN string `json:"lt_name_cn"` LtTypeID int `json:"lt_type_id"` OpenNumber string `json:"open_number"` }
VUserOrderList ... 详情显示: 彩种,期号,开奖号码,状态,投注内容,中奖内容,投注金额,中奖金额,盈利金额 投注时间,派奖时间
func (*VUserOrderList) GetBetMoney ¶
func (m *VUserOrderList) GetBetMoney() int64
func (*VUserOrderList) GetContent ¶
func (m *VUserOrderList) GetContent() string
func (*VUserOrderList) GetID ¶
func (m *VUserOrderList) GetID() int64
func (*VUserOrderList) GetOpenNumber ¶
func (m *VUserOrderList) GetOpenNumber() string
func (*VUserOrderList) GetPlayName ¶
func (m *VUserOrderList) GetPlayName() string
func (*VUserOrderList) PathIDColumnName ¶
func (m *VUserOrderList) PathIDColumnName() string
func (*VUserOrderList) TableName ¶
func (m *VUserOrderList) TableName() string
func (*VUserOrderList) UidColumnName ¶
func (m *VUserOrderList) UidColumnName() string
type VUsers ¶
type VUsers struct { Users `xorm:"extends"` RoomName string `json:"room_name"` RoomEnable string `json:"room_enable"` RoomExpire utils.JSONTime `json:"room_expire"` UserAmount float64 `json:"user_amount"` RoomUser *Users `json:"room_user" xorm:"-"` VipRoleName string `json:"vip_role_name"` VipRebateScale float64 `json:"vip_rebate_scale"` AgentRoleName string `json:"agent_role_name"` AgentRebateScale float64 `json:"agent_rebate_scale"` }
func (*VUsers) PathIDColumnName ¶
func (*VUsers) UidColumnName ¶
type WsBetRemainBetData ¶
type WsBetRemainBetData struct { PlayName PlayName `json:"play_name"` ContentSlice []*WsBetRemainPlayContent `json:"content_slice"` ContentSumMoney int64 `json:"content_sum_money"` }
type WsBetRemainPlayContent ¶
type WsBetRemainSendData ¶
type WsBetRemainSendData struct { UID int64 `json:"uid"` Nick string `json:"nick"` UserAmount Amount `json:"user_amount"` UserBetSum int64 `json:"user_bet_sum"` BetData []*WsBetRemainBetData `json:"bet_data"` }
WsBetRemainSendData 封盘时,房间投注核对数据,以列表的形式发送
type WsSendJSON ¶
type WsSendJSON struct { Type string `json:"type,omitempty" xorm:"varchar(100) notnull index"` Code int `json:"code,omitempty" xorm:"notnull index"` CodeText string `json:"code_text,omitempty" xorm:"varchar(100) notnull"` FromUser *Users `json:"from_user,omitempty" xorm:"-"` FromUserName string `json:"-" xorm:"varchar(100) notnull index"` ToUserName string `json:"to_user_name,omitempty" xorm:"varchar(100) notnull index"` RoomID int64 `json:"room_id,omitempty" xorm:"notnull index"` Gid int64 `json:"gid,omitempty" xorm:"notnull index"` LtBean *GameLotteries `json:"lt_bean" xorm:"-"` Message interface{} `json:"message" xorm:"-"` MessageData string `json:"-" xorm:"notnull text"` }
func NewWsSend ¶
func NewWsSend(typeStr string, code int, msg interface{}) *WsSendJSON
func (*WsSendJSON) SetCode ¶
func (w *WsSendJSON) SetCode(code int)
func (*WsSendJSON) SetMessage ¶
func (w *WsSendJSON) SetMessage(msg string)
type WsWinMessageData ¶
type WsWinMessageSendConstruction ¶
type WsWinMessageSendConstruction struct { Gid int64 `json:"gid"` Issue string `json:"issue"` OpenNumber string `json:"open_number"` Data []*WsWinMessageSendData `json:"data"` }
WsWinMessageSendConstruction 中奖名单
type WsWinMessageSendData ¶
type WsWinMessageSendData struct { UID int64 `json:"uid"` Nick string `json:"nick"` EarnSum Amount `json:"earn_sum"` EarnData []*WsWinMessageData `json:"earn_data"` }
type WxUserInfo ¶
type WxUserInfo struct { wchat.WxUserInfo RCode string `json:"r_code" validate:"required"` Wx string `json:"wx" validate:"required,min=3"` }
Source Files
¶
- base.go
- bindata.go
- captcha.go
- clear.go
- dashboard.go
- fake_setting.go
- fly_data.go
- fly_room_setting.go
- game_helps.go
- game_limit.go
- game_lotteries.go
- game_lt_open_data.go
- game_openDataSource.go
- game_open_data_detection.go
- game_plays_normal.go
- game_plays_room.go
- game_prize.go
- game_room_set.go
- game_times.go
- m_init.go
- mid_auth.go
- middleware.go
- model_handler.go
- normal_request.go
- rebate.go
- rebate_path1.go
- rebate_path2.go
- recover.go
- reports.go
- room_ws.go
- rooms.go
- sys_clear.go
- sys_room_notice.go
- sys_room_setting.go
- sys_setting.go
- sys_slides.go
- t_order.go
- test_01.go
- user_account.go
- user_account_change.go
- user_login_list.go
- user_msg_records.go
- user_online.go
- user_order_list.go
- user_order_list_send.go
- user_relation.go
- user_roles.go
- user_room_agent.go
- users.go
- users_fake.go
- users_handler.go
- v_views.go
- websocket.go
- ws_bucket.go