model

package
v0.0.0-...-593c55d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: BSD-3-Clause Imports: 47 Imported by: 0

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

View Source
const (
	LtTypePk10
	LtTypeSsc
)
View Source
const (
	Pk10NumberLen = 10
	SscNumberLen  = 5
)
View Source
const (
	RobotName = "robot"
	Uppercase = "ABCDEFGHJKLMNPQRSTUVWXYZ"
	//Lowercase    = "abcdefghijklmnopqrstuvwxyz"
	//Alphabetic   = Uppercase + Lowercase
	Numeric = "23456789"
)
View Source
const (
	WsTypeError = "error"

	WsTypeMessage    = "message"
	WsTypeWinMessage = "WinMessage"
	WsTypeBet        = "bet"
	WsTypeChangeGid  = "ChangeGid"
	WsTypeChangedGid = "ChangedGid"
	WsTypeSelfInfo   = "SelfInfo"
	WsTypeSearch     = "Search"
)
View Source
const (
	SysSingleName = "single"
)
View Source
const (
	TimeLayOut = "2006-01-02 15:04:05"
)

Variables

View Source
var (
	ErrOrmNotFound    = errors.New("record not found")
	ErrOrmNotModified = errors.New("record not modified")
	ErrOrmZeroResult  = errors.New("record zero result")
)
View Source
var (
	FlySysURISHandler     = &FlySysTypes{}
	FlyRoomSettingHandler = &FlyRoomSetting{}
	FlyRecordsHandler     = &FlyRecords{}
)
View Source
var (
	RoomHubHandler  = newRoomHub()
	SecretForRoomWs = "UAOKSPXI4JQ85P93G47FBL6Y2UX174KH"
)
View Source
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{},
	}
)
View Source
var (
	SysSettingHandler = &SysSetting{Name: SysSingleName}
	DefManagerSetting = ManagerSetting{
		APPName:            "天亿软件",
		APPLogo:            "",
		APPVersion:         "v1.0.0",
		APPDownloadUrl:     "",
		RoomOwnerUserCash:  false,
		EnableRoomHasAgent: false,
		SearchCode:         "AAAA",
		SaleAESKey:         "S4oRnFM2WLAKInt8SE4M6m7XNyn4r0Tu0JVDUoJz5KfILgQg",
	}
)
View Source
var (
	UserOrderHandler   = &UserOrderList{}
	ErrTimeCancelBet   = errors.New("当期已封盘,不允许撤单")
	ErrRefuseCancelBet = errors.New("当前房间不允许撤单")
)
View Source
var (
	ErrVipRoleID    = errors.New("错误的会员级别")
	ErrRoleNotFound = errors.New("房间不存在角色级别")
)
View Source
var (
	ErrUsersRCodeNotFound = errors.New("无效的推荐码")
	ErrUsersRepeatUserID  = errors.New("用户名/微信号重复")
	ErrUsersDisabled      = errors.New("用户账户已被冻结")
)
View Source
var (
	UserNameErr     = errors.New("用户名不能包含除字母和数字之外的字符")
	UserPasswordErr = errors.New("密码格式错误,支持大写字母+小写字母+数字的组合")
)
View Source
var (
	AccountChangeTypes = map[int64]string{
		1: "活动赠送",
		2: "会员上分",
		3: "奖金派发",
		4: "会员退水",
		5: "会员下分",
		6: "会员投注",
		7: "财务核算",
		8: "投注撤单",
		9: "代理退水",
	}
)
View Source
var (
	AuthHandler = &AuthMiddleware{}
)
View Source
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)
}
View Source
var (
	DashHandler = &DashBoard{}
)
View Source
var (
	ErrLessMoney = errors.New("账户余额不足")
)
View Source
var ErrLoginHasNoLottery = errors.New("房间不存在开放的彩种")

登录前,验证房间是否存在打开的彩种,如果不存在,则拒绝登录

View Source
var (
	ErrNextIssue = errors.New("获取下期期号失败")
)
View Source
var ErrWrongRole = errors.New("用户权限不足")
View Source
var (
	GameOpenDataHandler = &GameOpenData{}
)
View Source
var (
	ModHandler = &ModStructure{}
)
View Source
var (
	RecordsHandler = &BeanRecords{}
)
View Source
var (
	ReportsHandler = &Reports{}
)
View Source
var (
	TSOrder = &TSOrderObj{}
)
View Source
var (
	UserHandler = &Users{}
)
View Source
var (
	UserOnlineHandler = &UserOnline{}
)
View Source
var (
	WsBucket = new(bucketClass)
)

Functions

func AccountTransfer

func AccountTransfer(from, to *Users, fromTid, toTid int64, money float64) (err error)

AccountTransfer ... 账户转账

func Asset

func Asset(name string) ([]byte, error)

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

func AssetDir(name string) ([]string, error)

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

func AssetInfo(name string) (os.FileInfo, error)

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 AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func CapVerify

func CapVerify(key string, text string) bool

func CollectFrom168Api

func CollectFrom168Api()

func ErrHandler

func ErrHandler(next echo.HandlerFunc) echo.HandlerFunc

func FakeBet

func FakeBet(gid int64)

func GetInitCount

func GetInitCount(bean InitInterface) (count int64)

func InitDB

func InitDB() (err error)

func InitLoggers

func InitLoggers()

func InsertBeansBlocking

func InsertBeansBlocking(beans interface{}, sns ...*xorm.Session) error

分块批量插入数据,每块150条

func MustAsset

func MustAsset(name string) []byte

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 NormalGet

func NormalGet(bean interface{}) (err error)

func NormalGet2

func NormalGet2(has bool, err error) error

func NormalUpdate

func NormalUpdate(a int64, err error) error

func PrizeALL

func PrizeALL()

func RestartCollect168Api

func RestartCollect168Api()

func RestartCollectApi

func RestartCollectApi(c echo.Context) error

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func ReturnJSON

func ReturnJSON(c echo.Context, code int, bean interface{}) error

func ReturnOK

func ReturnOK(c echo.Context, bean interface{}) error

func SnCallBack

func SnCallBack(fn func(bsn *xorm.Session) error) (err error)

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 API168Data struct {
	PreDrawCode  string         `json:"preDrawCode"`
	DrawIssue    interface{}    `json:"drawIssue"`
	PreDrawIssue interface{}    `json:"preDrawIssue"`
	DrawTime     utils.JSONTime `json:"drawTime"`
	PreDrawTime  utils.JSONTime `json:"preDrawTime"`
	LotName      string         `json:"lotName"`
}

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 Amount

type Amount float64

func (Amount) Round

func (m Amount) Round(places int) Amount

Round ...

type AuthMiddleware

type AuthMiddleware struct{}

func (*AuthMiddleware) Auth

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

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 BaseModelA struct {
	ID      int64          `json:"id,omitempty" xorm:"autoincr pk"`
	Created utils.JSONTime `json:"created,omitempty" xorm:"created index"`
	Updated utils.JSONTime `json:"updated,omitempty" xorm:"updated"`
	Version int64          `json:"version,omitempty" xorm:"version index"`
}

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 BuyBind

type BuyBind struct {
	AccountName string //账号
	//充值时长
	Hours int
	//管理员账号
	Admin string
	//管理员密码
	Password string
}

type Captcha

type Captcha struct {
	Content []byte
	Text    string
	Key     string
}

func NewCap

func NewCap() *Captcha

func NewCapFresh

func NewCapFresh(key string) *Captcha

type CaptchaObj

type CaptchaObj struct {
	CapKey  string `json:"cap_key,omitempty" validate:"required,uuid"`
	Captcha string `json:"captcha,omitempty" validate:"required"`
}

type CleanWorker

type CleanWorker interface {
	ClearWorkerDo()
}

type Clear

type Clear struct{}

func (*Clear) Cache

func (m *Clear) Cache(c echo.Context) (err error)

type ClearConstruction

type ClearConstruction struct {
	RoomId int64
	Days   int `json:"days" query:"days"`
}

func (*ClearConstruction) ClearData

func (m *ClearConstruction) ClearData(view RoomViewInterface, delBean interface{}) (err error)

func (*ClearConstruction) Request

func (m *ClearConstruction) Request(c echo.Context) (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 CountDownMsg struct {
	Gid               int64  `json:"gid"`
	LtNameCn          string `json:"lt_name_cn"`
	BetRemainSeconds  int64  `json:"bet_remain_seconds"`
	NextRemainSeconds int64  `json:"next_remain_seconds"`
	CanBet            bool   `json:"can_bet"`
	GameOpenData
}

func (*CountDownMsg) FillBase

func (m *CountDownMsg) FillBase(bs *video.Base) (err error)

func (*CountDownMsg) Get

func (m *CountDownMsg) Get(c echo.Context) (err error)

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
}

func (*DashData) GetData

func (m *DashData) GetData() (err error)

type Dragon

type Dragon struct {
	Name       string `json:"name"`
	Continuous int    `json:"continuous"`
	// 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
}

func (*DragonDataSource) Request

func (m *DragonDataSource) Request(c echo.Context) (err error)

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:"-"`
}

func (*FlyDataCount) BetTotal

func (m *FlyDataCount) BetTotal(c echo.Context) (err error)

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"`
}

飞单记录表

func (*FlyRecords) Total

func (m *FlyRecords) Total(c echo.Context) (err error)

type FlyRoomAccount

type FlyRoomAccount struct {
	UserName string  `json:"user_name" xorm:"notnull varchar(20) index"`
	Password string  `json:"password"`
	Balance  float64 `json:"balance"`
}

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)

func (*FlyRoomSetting) Refresh

func (m *FlyRoomSetting) Refresh(c echo.Context) (err error)

func (*FlyRoomSetting) Request

func (m *FlyRoomSetting) Request(c echo.Context) (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 FlySysURL

type FlySysURL struct {
	BaseModel `xorm:"extends"`
	TypeID    int64  `json:"type_id" xorm:"notnull index"`
	Name      string `json:"name"`
}

type FlyTotal

type FlyTotal struct {
	SumAll    int64 `json:"sum_all"`
	SumOk     int64 `json:"sum_ok"`
	SumFailed int64 `json:"sum_failed"`
	SumWait   int64 `json:"sum_wait"`
}

type GameHelps

type GameHelps struct {
	BaseModel `xorm:"extends"`
	Gid       int64 `json:"gid" xorm:"notnull unique"`
	//html 文本
	HelpHtml string `json:"help_html" xorm:"longtext notnull"`
}

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)

func (*GameLimitRoom) Request

func (m *GameLimitRoom) Request(c echo.Context) (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)

func (*GameLotteries) Request

func (m *GameLotteries) Request(c echo.Context) (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()

func (*GameLtRoomSet) Request

func (m *GameLtRoomSet) Request(c echo.Context) (err error)

获取所有房间彩种视图

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) History

func (m *GameOpenData) History(c echo.Context) (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) GetPlays

func (m *GamePlaysRoom) GetPlays(gid, rid int64, playName string) (prize.Plays, error)

GetPlays 获取一个plays接口对象

func (*GamePlaysRoom) InitData

func (m *GamePlaysRoom) InitData() (err error)

func (*GamePlaysRoom) Request

func (m *GamePlaysRoom) Request(c echo.Context) (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)

func (*GameTimesPlan) Request

func (m *GameTimesPlan) Request(c echo.Context) (err error)

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

func (*Hub) KickOutAll

func (h *Hub) KickOutAll()

func (*Hub) KickOutUser

func (h *Hub) KickOutUser(uidList []int64)

func (*Hub) RobotSend

func (h *Hub) RobotSend(Type string, gid, roomID int64, data interface{}, err error)

机器人发消息 sendAll,gid=? roomID=0, Type="CountDown"

func (*Hub) SendMessage

func (h *Hub) SendMessage(wsData *WsSendJSON)

func (*Hub) SendSelfInfo

func (h *Hub) SendSelfInfo(uid int64)

发送个人信息

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"`
	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 NextOpenInfo struct {
	Issue     string         `json:"issue"`
	Time      utils.JSONTime `json:"time"`
	Timestamp int64          `json:"timestamp"`
}

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

type OrderContent struct {
	Gid    int64
	RawStr string
}

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 PlayContent struct {
	Name string  `json:"name"`
	Odds float64 `json:"odds"`
}

type PlayName

type PlayName string

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 PrizeDo

type PrizeDo struct {
	// 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 Rebate struct {
	VSysRooms
	RequestData struct {
		Times []string `json:"times" validate:"required"`
	}
	// contains filtered or unexported fields
}

func (*Rebate) Request

func (m *Rebate) Request(c echo.Context) (err error)

type RebateOrders

type RebateOrders struct {
	VUserOrderList `xorm:"extends"`
	SumMoney       float64 `json:"sum_money"`
}

type RebatePath1

type RebatePath1 struct {
	UID         int64   `json:"uid"`
	Nick        string  `json:"nick"`
	Ico         string  `json:"ico"`
	Amount      float64 `json:"amount"`
	SumBet      int64   `json:"sum_bet"`
	SumWin      float64 `json:"sum_win"`
	RebateMoney float64 `json:"rebate_money"`
}

type RebatePath1Normal

type RebatePath1Normal struct {
	RebateScale float64 `json:"rebate_scale" validate:"required"`
	//1,按流水;2,按亏损
	RebateMode  int      `json:"rebate_mode" validate:"required"`
	TimeBetween []string `json:"time_between" validate:"required"`
}

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"`
}

func (*RebatePath1Request) Request

func (m *RebatePath1Request) Request(c echo.Context) (err error)

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"`
}

func (*RebatePathRequest2) Request

func (m *RebatePathRequest2) Request(c echo.Context) (err error)

type Recover

type Recover struct {
	// contains filtered or unexported fields
}

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 ReportUserAccount struct {
	Uid           int64  `json:"uid"`
	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"`
	ReportAccount `xorm:"extends"`
}

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 Reports

type Reports struct{}

func (*Reports) AgentTeamReport

func (m *Reports) AgentTeamReport(c echo.Context) (err error)

代理直属下级投注报表

func (*Reports) Room

func (m *Reports) Room(c echo.Context) (err error)

func (*Reports) UserAccount

func (m *Reports) UserAccount() echo.HandlerFunc

UserAccount 财务报表

func (*Reports) UserOrder

func (m *Reports) UserOrder() echo.HandlerFunc

UserOrder 投注报表

type Roles

type Roles struct {
	BaseModel   `xorm:"extends"`
	RoomID      int64   `json:"room_id" xorm:"notnull index"`
	RoleName    string  `json:"role_name" xorm:"varchar(50)" validate:"required"`
	RebateScale float64 `json:"rebate_scale" xorm:"NUMERIC(19,4) notnull index"`
}

type RoomAgentRebate

type RoomAgentRebate struct {
	BeanRecords BeanRecords
}

func (RoomAgentRebate) Request

func (RoomAgentRebate) Request(c echo.Context) (err error)

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)

func (*RoomHub) SendRequest

func (h *RoomHub) SendRequest(c echo.Context) (err error)

func (*RoomHub) Serve

func (h *RoomHub) Serve(c echo.Context) (err error)

type RoomRecorder

type RoomRecorder interface {
	GetRoomColumn() string
	SetRoomID(roomID int64)
}

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) Request

func (RoomSetRelation) Request(c echo.Context) (err error)

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 SysAdvertising struct {
	BaseModel `xorm:"extends"`
	Title     string `json:"title" xorm:"varchar(100) notnull index"`
	Image     string `json:"image" xorm:"varchar(200) notnull"`
	LinkURL   string `json:"link_url" xorm:"text"`
	Comment   string `json:"comment" xorm:"varchar(300)"`
}

type SysAppSlides

type SysAppSlides struct {
	BaseModel `xorm:"extends"`
	Title     string `json:"title" xorm:"varchar(100) notnull index"`
	Image     string `json:"image" xorm:"varchar(200) notnull"`
	LinkURL   string `json:"link_url" xorm:"text"`
}

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)

func (*SysGameLimit) Request

func (m *SysGameLimit) Request(c echo.Context) (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) ClearMsg

func (m *SysMsgRecords) ClearMsg() error

ClearRobotMsg 清除信息

func (*SysMsgRecords) ClearWorkerDo

func (m *SysMsgRecords) ClearWorkerDo()

func (*SysMsgRecords) GetRoomColumn

func (m *SysMsgRecords) GetRoomColumn() string

func (*SysMsgRecords) Point

func (m *SysMsgRecords) Point(c echo.Context) (err error)

func (*SysMsgRecords) SetRoomID

func (m *SysMsgRecords) SetRoomID(roomID int64)

type SysNotice

type SysNotice struct {
	BaseModel `xorm:"extends"`
	Title     string `json:"title" xorm:"varchar(100) notnull index"`
	Image     string `json:"image" xorm:"varchar(200) notnull"`
	Content   string `json:"content" xorm:"longtext notnull"`
}

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

func (m *SysRooms) Create(c echo.Context) (err error)

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

func (m *SysRooms) EnableOpen() bool

EnableOpen ... 判断房间是否开启,当房间关闭之后,所有人都无法进入该房间

func (*SysRooms) Recharge

func (m *SysRooms) Recharge() echo.HandlerFunc

自助充值接口

func (*SysRooms) Request

func (m *SysRooms) Request(c echo.Context) (err error)

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) Request

func (m *SysSetting) Request() echo.HandlerFunc

获取,设置系统设置

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) Request

func (m *SysSettingRoom) Request(c echo.Context) (err error)

func (*SysSettingRoom) SscLH1

func (m *SysSettingRoom) SscLH1() bool

type TSOrderObj

type TSOrderObj struct {
	UserOrderList
}

func (*TSOrderObj) Back1

func (m *TSOrderObj) Back1() echo.HandlerFunc

func (*TSOrderObj) Ts1

func (m *TSOrderObj) Ts1(c echo.Context) (err error)

type TSOrderRequestObj

type TSOrderRequestObj struct {
	Gid    int64  `json:"gid" form:"gid"`
	RawTxt string `json:"raw_txt" form:"raw_txt"`
}

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 TimePlan

type TimePlan struct {
	From          string `json:"from"`
	To            string `json:"to"`
	PeriodSeconds int64  `json:"period_seconds"`
}

type Transfer

type Transfer struct {
	// contains filtered or unexported fields
}

type TransferHandler

type TransferHandler struct {
	ToUID    int64   `json:"to_uid" validate:"required"`
	ToTypeID int64   `json:"to_type_id" validate:"required"`
	Money    float64 `json:"money" validate:"required,ne=0"`
}

func (*TransferHandler) Transfer

func (m *TransferHandler) Transfer(c echo.Context) (err error)

type UserAccount

type UserAccount struct {
	BaseModel `xorm:"extends"`
	UID       int64   `json:"uid" xorm:"notnull unique"`
	Amount    float64 `json:"amount" xorm:"NUMERIC(19,4) notnull index"`
	// contains filtered or unexported fields
}

func (*UserAccount) Earn

func (m *UserAccount) Earn(c echo.Context) (err error)

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 UserAccountReportOrderSumUnPrize

type UserAccountReportOrderSumUnPrize struct {
	Uid        int64 `json:"uid"`
	SumUnPrize int64 `json:"sum_un_prize"`
}

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) GetList

func (m *UserOnline) GetList(c echo.Context) (err error)

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 UserRelationData struct {
	Superior     *VUsers   `json:"superior"`
	Me           *VUsers   `json:"me"`
	Subordinates []*VUsers `json:"subordinates"`
	PeopleTotal  int       `json:"people_total"`
	AmountTotal  Amount    `json:"amount_total"`
}

func (UserRelationData) Request

func (UserRelationData) Request(c echo.Context) error

type UserView

type UserView interface {
	PathIDColumnName() string
	UidColumnName() string

	TableName() string
}

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) Add

func (m *Users) Add(c echo.Context) (err error)

添加管理员

func (*Users) AddFakeUser

func (m *Users) AddFakeUser(c echo.Context) (err error)

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) BindWx

func (m *Users) BindWx(c echo.Context) (err error)

绑定微信

func (*Users) BindWxLogin

func (m *Users) BindWxLogin(c echo.Context) (err error)

接收用户信息,+微信账号,+推荐码

func (*Users) ChangePassword

func (m *Users) ChangePassword(c echo.Context) (err error)

修改密码

func (*Users) DeleteUsers

func (*Users) DeleteUsers() echo.HandlerFunc

func (*Users) DisableUsers

func (*Users) DisableUsers() echo.HandlerFunc

func (*Users) Edit

func (m *Users) Edit(c echo.Context) (err error)

修改个人信息

func (*Users) GenerateToken

func (m *Users) GenerateToken() (tokenString string, err error)

GenerateToken 生成令牌

func (*Users) GetByName

func (m *Users) GetByName(name string) (user *Users, err error)

func (*Users) GetByUid

func (m *Users) GetByUid(uid int64) (user *Users, err error)

func (*Users) GetRobotUser

func (m *Users) GetRobotUser() (robot *Users)

func (Users) GetRoomOwnerByRid

func (Users) GetRoomOwnerByRid(roomID int64) (user *Users, err error)

func (*Users) GetVisitor

func (m *Users) GetVisitor(c echo.Context) *Users

func (*Users) InitData

func (m *Users) InitData() (err error)

func (*Users) InsertPrepare

func (m *Users) InsertPrepare() (err error)

func (*Users) IsAgent

func (m *Users) IsAgent() bool

IsAgent 系统管理员/管理员/房主

func (*Users) IsJustAgent

func (m *Users) IsJustAgent() bool

IsJustAgent 所有房主下层

func (*Users) IsManager

func (m *Users) IsManager() bool

func (*Users) IsRobot

func (m *Users) IsRobot() bool

func (*Users) IsRoomOwner

func (m *Users) IsRoomOwner() bool

func (*Users) IsRoomOwnerOrAgent

func (m *Users) IsRoomOwnerOrAgent() bool

func (*Users) IsSuperManager

func (m *Users) IsSuperManager() bool

func (*Users) IsVip

func (m *Users) IsVip() bool

func (*Users) Login

func (m *Users) Login(c echo.Context) (err error)

func (*Users) ReferrerAPP

func (m *Users) ReferrerAPP(c echo.Context) (err error)

func (*Users) Register

func (m *Users) Register(c echo.Context) (err error)

func (*Users) ResetPwd

func (m *Users) ResetPwd(c echo.Context) (err error)

func (*Users) Robot

func (m *Users) Robot(c echo.Context) (err error)

修改机器人头像

func (*Users) SelfRoomOwner

func (m *Users) SelfRoomOwner() (ru *Users, err error)

SelfRoomOwner 获取当前用户房主信息

func (*Users) VerifyRole

func (m *Users) VerifyRole(queryUser *Users) error

验证用户级别 m = requestUser

func (*Users) VerifyToken

func (m *Users) VerifyToken(tokenStr string) (err error)

VerifyToken 验证token

func (*Users) WxLogin

func (m *Users) WxLogin(c echo.Context) (err error)

微信登录

func (*Users) WxUnBind

func (m *Users) WxUnBind(unionID string) (err error)

微信解绑

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 (m *VSysRooms) PathIDColumnName() string

func (*VSysRooms) TableName

func (m *VSysRooms) TableName() string

func (*VSysRooms) UidColumnName

func (m *VSysRooms) UidColumnName() string

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) AfterSet

func (m *VUsers) AfterSet(field string, c xorm.Cell)

func (*VUsers) PathIDColumnName

func (m *VUsers) PathIDColumnName() string

func (*VUsers) TableName

func (m *VUsers) TableName() string

func (*VUsers) UidColumnName

func (m *VUsers) UidColumnName() string

type WebSocket

type WebSocket struct{}

func (*WebSocket) Serve

func (m *WebSocket) Serve(c echo.Context) (err error)

func (*WebSocket) WsHome

func (m *WebSocket) WsHome(c echo.Context) (err error)

type WsBetRemainBetData

type WsBetRemainBetData struct {
	PlayName        PlayName                  `json:"play_name"`
	ContentSlice    []*WsBetRemainPlayContent `json:"content_slice"`
	ContentSumMoney int64                     `json:"content_sum_money"`
}

type WsBetRemainPlayContent

type WsBetRemainPlayContent struct {
	ContentName string `json:"content_name"`
	Money       int64  `json:"money"`
}

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 WsError

type WsError struct {
	WsSendJSON
}

func NewWsError

func NewWsError(code int, msg string) *WsError

func (*WsError) Error

func (w *WsError) Error() string

type WsSearch

type WsSearch struct {
	UID         int64            `json:"uid"`
	Nick        string           `json:"nick"`
	BetList     []*UserOrderList `json:"bet_list"`
	UserAmount  float64          `json:"user_amount"`
	UnPrize     int64            `json:"un_prize"`
	TodayBetSum int64            `json:"today_bet_sum"`
	TodayEarn   float64          `json:"today_earn"`
}

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 WsWinMessageData struct {
	PlayName PlayName `json:"play_name"`
	Content  string   `json:"content"`
	Money    int64    `json:"money"`
	Bonus    Amount   `json:"bonus"`
}

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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