Documentation ¶
Index ¶
- Variables
- func InitDB()
- type Admin
- func (a *Admin) DelByID(Id int64) bool
- func (a *Admin) Edit(Id int64) bool
- func (a *Admin) EditInfo(Id int64) bool
- func (a *Admin) EditPwd(Id int64) bool
- func (a *Admin) GetByAll(RoleId int64, where map[string]string, Page int64, Perpage int64) ([]*Admin, template.HTML)
- func (a *Admin) GetById(Id int64) *Admin
- func (a *Admin) GetByName(name string) *Admin
- func (a *Admin) GetByRealName(name string) *Admin
- func (a *Admin) GetMysqlVer() string
- func (a *Admin) HasEmail() bool
- func (a *Admin) HasName() bool
- func (a *Admin) Save() bool
- func (a *Admin) UpdateLoginTime(Id int64) bool
- func (a *Admin) Validate(v *revel.Validation)
- type Admin_Panel
- func (a *Admin_Panel) AddPanel(Mid int64, Admin_Info *Admin) bool
- func (a *Admin_Panel) DelPanel(Mid int64, Admin_Info *Admin) bool
- func (a *Admin_Panel) GetById(Id int64) *Admin_Panel
- func (a *Admin_Panel) GetByMid(Mid int64, Admin_Info *Admin) *Admin_Panel
- func (a *Admin_Panel) GetPanelList(Admin_Info *Admin) []*Admin_Panel
- func (a *Admin_Panel) IsAdd(Mid int64, Admin_Info *Admin) bool
- type Announce
- type Article
- func (a *Article) DelByID(Id int64) bool
- func (a *Article) Edit(Id int64) bool
- func (a *Article) GetByAll(search string, Cid int64, Page int64, Perpage int64) (article_arr []*Article, html template.HTML, where map[string]interface{})
- func (a *Article) GetByCid(Cid int64) *Article
- func (a *Article) GetById(Id int64) *Article
- func (a *Article) GetByList(Cid int64, Search string, Page int64, Perpage int64) (article_arr []*Article, html template.HTML, where map[string]interface{})
- func (a *Article) HasTitle() bool
- func (a *Article) Remove(Cid int64, ids string) bool
- func (a *Article) Save() bool
- type Category
- func (c *Category) DelByID(Id int64) bool
- func (c *Category) Edit(Id int64) bool
- func (c *Category) GetById(Id int64) *Category
- func (c *Category) GetCateGoryHtml(Admin_Info *Admin) template.HTML
- func (c *Category) GetCateGoryOptionHtml(Id int64) template.HTML
- func (c *Category) GetCateNameHtml(CateName string) string
- func (c *Category) GetLeftHtml() template.HTML
- func (c *Category) GetLeftTree() template.HTML
- func (c *Category) Save() bool
- type Comment
- type Complaints
- type Copyfrom
- type DailyMinutes
- type EveryMinute
- type FiveMinutes
- type Focus
- type FocusCate
- type HourlyMinutes
- type Logs
- type Menu
- func (m *Menu) DelByID(Id int64) bool
- func (m *Menu) Edit(Id int64) bool
- func (m *Menu) GetAdminMenu(Pid int64, Admin_Info *Admin) []*Menu
- func (m *Menu) GetById(Id int64) *Menu
- func (m *Menu) GetLeftMenuHtml(Pid int64, Admin_Info *Admin) template.HTML
- func (m *Menu) GetMenuAll() map[int64][]*Menu
- func (m *Menu) GetMenuHtml(Admin_Info *Admin) template.HTML
- func (m *Menu) GetMenuMap(Admin_Info *Admin) template.HTML
- func (m *Menu) GetMenuOptionHtml(Id int64, Admin_Info *Admin) template.HTML
- func (m *Menu) GetMenuTree(role string, Admin_Info *Admin) template.HTML
- func (m *Menu) GetPos(Id int64, Admin_Info *Admin) string
- func (m *Menu) Save() bool
- func (menu *Menu) Validate(v *revel.Validation)
- type MonthlyMinutes
- type Password
- type Role
- type Task
- type Template
- type Test
- type ThirtyMinutes
- type Upload
- type User
- func (u *User) DelByID(Id int64) bool
- func (u *User) DelByIDS(ids string) bool
- func (u *User) Edit(Id int64) bool
- func (u *User) GetById(Id int64) *User
- func (u *User) GetUserList(search string, Page int64, Perpage int64) (user_arr []*User, html template.HTML, where map[string]interface{})
- func (u *User) HasEmail() bool
- func (u *User) HasName() bool
- func (u *User) Lock(ids string) bool
- func (u *User) Move(groupid int64, ids string) bool
- func (u *User) Save() bool
- func (u *User) Unlock(ids string) bool
- type User_Group
- type WeeklyMinutes
- type YearlyMinutes
Constants ¶
This section is empty.
Variables ¶
View Source
var DB_Read *xorm.Engine
读数据
View Source
var DB_Write *xorm.Engine
写数据
Functions ¶
Types ¶
type Admin ¶
type Admin struct { Id int64 `xorm:"pk autoincr"` Username string `xorm:"unique index varchar(255)"` Password string `xorm:"varchar:(32)"` Roleid int64 `xorm:"index"` Role *Role `xorm:"- <- ->"` Lastloginip string `xorm:"varchar(32)"` LastipAddress map[string]interface{} `xorm:"- <- ->"` Lastlogintime string `xorm:"varchar(32)"` Email string `xorm:"varchar(32)"` Realname string `xorm:"varchar(32)"` Lang string `xorm:"varchar(6)"` Status int64 `xorm:"bool"` Createtime string `xorm:"DateTime"` }
func (*Admin) GetByAll ¶
func (a *Admin) GetByAll(RoleId int64, where map[string]string, Page int64, Perpage int64) ([]*Admin, template.HTML)
获取管理员列表
func (*Admin) Validate ¶
func (a *Admin) Validate(v *revel.Validation)
type Admin_Panel ¶
type Admin_Panel struct { Id int64 `xorm:"pk"` Mid int64 `xorm:"int(11)"` Menu *Menu `xorm:"- <- ->"` Aid int64 `xorm:"int(11)"` Name string `xorm:"varchar(40)"` Url string `xorm:"char(100)"` Createtime string `xorm:"DateTime"` }
func (*Admin_Panel) AddPanel ¶
func (a *Admin_Panel) AddPanel(Mid int64, Admin_Info *Admin) bool
添加快捷方式
func (*Admin_Panel) DelPanel ¶
func (a *Admin_Panel) DelPanel(Mid int64, Admin_Info *Admin) bool
删除快捷方式
func (*Admin_Panel) GetByMid ¶
func (a *Admin_Panel) GetByMid(Mid int64, Admin_Info *Admin) *Admin_Panel
根据mid获取快捷方式
func (*Admin_Panel) GetPanelList ¶
func (a *Admin_Panel) GetPanelList(Admin_Info *Admin) []*Admin_Panel
获取快捷方式列表
type Announce ¶
type Announce struct { Id int64 `xorm:"pk"` Title string `xorm:"varchar(255)"` Content string `xorm:"text"` Starttime string `xorm:"DateTime"` Endtime string `xorm:"DateTime"` Hits int64 `xorm:"int(11)"` Status int64 `xorm:"default 1"` Createtime string `xorm:"DateTime"` }
type Article ¶
type Article struct { Id int64 `xorm:"pk autoincr"` Cid int64 `xorm:"index"` Category *Category `xorm:"- <- ->"` Aid int64 `xorm:"index"` Admin *Admin `xorm:"- <- ->"` Title string `xorm:"varchar(80)"` Color string `xorm:"char(24)"` Font string `xorm:"char(24)"` Thumb string `xorm:"varchar(80)"` Content string `xorm:"text"` Copyfrom string `xorm:"varchar(100)"` Keywords string `xorm:"varchar(255)"` Description string `xorm:"varchar(255)"` Relation string `xorm:"varchar(255)"` RelationList []*Article `xorm:"- <- ->"` Pagetype int64 `xorm:"tynyint(1)"` Maxcharperpage int64 `xorm:"mediumint(6)"` Istop int64 `xorm:"tynyint(1)"` Status int64 `xorm:"tynyint(1)"` Hits int64 `xorm:"tynyint(5)"` Iscomment int64 `xorm:"tynyint(1)"` Createtime string `xorm:"DateTime"` Updatetime string `xorm:"DateTime"` }
func (*Article) GetByAll ¶
func (a *Article) GetByAll(search string, Cid int64, Page int64, Perpage int64) (article_arr []*Article, html template.HTML, where map[string]interface{})
获取内容列表
type Category ¶
type Category struct { Id int64 `xorm:"pk"` Pid int64 `xorm:"int(11)"` Type int64 `xorm:"int(11)"` Name string `xorm:"varchar(255)"` Enname string `xorm:"varchar(255)"` Desc string `xorm:"text"` Url string `xorm:"varchar(100)"` Hits int64 `xorm:"int(11)"` Setting string `xorm:"text"` SettingText map[string]interface{} `xorm:"- <- ->"` Order int64 `xorm:"int(11)"` }
func (*Category) GetCateGoryHtml ¶
获取所有菜单 返回HTML
func (*Category) GetCateGoryOptionHtml ¶
返回菜单Option的HTML
func (*Category) GetCateNameHtml ¶
快速进入 搜索
type Comment ¶
type Comment struct { Id int64 `xorm:"pk autoincr"` Replyid int64 `xorm:"index"` Content string `xorm:"text"` Uid int64 `xorm:"index"` User *User `xorm:"- <- ->"` Agree int64 `xorm:"int(11)"` Against int64 `xorm:"int(11)"` Ip string `xorm:"char(11)"` Createtime string `xorm:"DateTime"` }
type Complaints ¶
type Complaints struct { Id int64 `xorm:"pk"` Type int64 `xorm:"tinyint(1)"` Question string `xorm:"varchar(255)"` Companyname string `xorm:"varchar(255)"` Name string `xorm:"varchar(50)"` Phone string `xorm:"varchar(50)"` Email string `xorm:"varchar(50)"` Qq string `xorm:"varchar(50)"` Createtime string `xorm:"DateTime"` }
func (*Complaints) GetByAll ¶
func (c *Complaints) GetByAll(Page int64, Perpage int64) ([]*Complaints, template.HTML)
获取投诉建议列表
type Copyfrom ¶
type Copyfrom struct { Id int64 `xorm:"pk autoincr"` Sitename string `xorm:"varchar:(30)"` Siteurl string `xorm:"varchar(100)"` Thumb string `xorm:"varchar(100)"` Createtime string `xorm:"DateTime"` }
type DailyMinutes ¶
type DailyMinutes struct { }
每天执行 每天运行一次,午夜
func (DailyMinutes) Run ¶
func (c DailyMinutes) Run()
type EveryMinute ¶
type EveryMinute struct { }
每分钟执行一次
func (EveryMinute) Run ¶
func (c EveryMinute) Run()
type FiveMinutes ¶
type FiveMinutes struct { }
每五分钟执行一次
func (FiveMinutes) Run ¶
func (c FiveMinutes) Run()
type Focus ¶
type Focus struct { Id int64 `xorm:"pk autoincr"` Cid int64 `xorm:"index"` Focuscate *FocusCate `xorm:"- <- ->"` Aid int64 `xorm:"index"` Admin *Admin `xorm:"- <- ->"` Title string `xorm:"varchar(255)"` Url string `xorm:"varchar(255)"` Img string `xorm:"varchar(255)"` Content string `xorm:"text"` Clicks int64 `xorm:"int(10)"` Order int64 `xorm:"tynyint(5)"` Status int64 `xorm:"tynyint(1)"` Createtime string `xorm:"DateTime"` Updatetime string `xorm:"DateTime"` }
type FocusCate ¶
type FocusCate struct { Id int64 `xorm:"pk autoincr"` Name string `xorm:"varchar(255)"` Width int64 `xorm:"int(6)"` Height int64 `xorm:"int(6)"` Createtime string `xorm:"DateTime"` }
type HourlyMinutes ¶
type HourlyMinutes struct { }
每小时执行
func (HourlyMinutes) Run ¶
func (c HourlyMinutes) Run()
type Logs ¶
type Logs struct { Id int64 `xorm:"pk autoincr"` Uid int64 `xorm:"unique"` Admin *Admin `xorm:"- <- ->"` Module string `xorm:"varchar:(50)"` Url string `xorm:"varchar(100)"` Action string `xorm:"varchar(100)"` Ip string `xorm:"varchar(15)"` IpAddress map[string]interface{} `xorm:"- <- ->"` Desc string `xorm:"text"` Createtime string `xorm:"DateTime"` }
func (*Logs) GetByAll ¶
func (L *Logs) GetByAll(search string, Page int64, Perpage int64) (logs_arr []*Logs, html template.HTML, where map[string]interface{})
获取日志列表
func (*Logs) Validate ¶
func (L *Logs) Validate(v *revel.Validation)
type Menu ¶
type Menu struct { Id int64 `xorm:"pk"` Name string `xorm:"char(40)"` Enname string `xorm:"char(40)"` Pid int64 `xorm:"int(11)"` Url string `xorm:"char(100)"` Data string `xorm:"varchar(60)"` Order int64 `xorm:"int(11)"` Display int64 `xorm:"default 1"` }
func (*Menu) GetAdminMenu ¶
按父ID查找菜单子项
func (*Menu) GetLeftMenuHtml ¶
获取左侧导航菜单
func (*Menu) GetMenuHtml ¶
获取所有菜单 返回HTML
func (*Menu) GetMenuOptionHtml ¶
返回菜单Option的HTML
func (*Menu) GetMenuTree ¶
返回菜单树
func (*Menu) Validate ¶
func (menu *Menu) Validate(v *revel.Validation)
type MonthlyMinutes ¶
type MonthlyMinutes struct { }
每月执行 一个月运行一次,半夜,第一个月
func (MonthlyMinutes) Run ¶
func (c MonthlyMinutes) Run()
type Role ¶
type Role struct { Id int64 `xorm:"pk"` Rolename string `xorm:"unique varchar(255)"` Desc string `xorm:"varchar:(255)"` Data string `xorm:"text"` Status int64 `xorm:"bool"` Createtime string `xorm:"DateTime"` }
type Template ¶
type Test ¶
type ThirtyMinutes ¶
type ThirtyMinutes struct { }
每三十分钟执行
func (ThirtyMinutes) Run ¶
func (c ThirtyMinutes) Run()
type User ¶
type User struct { Id int64 `xorm:"pk"` Email string `xorm:"char(32)"` Username string `xorm:"char(20)"` Password string `xorm:"char(32)"` Encrypt string `xorm:"char(6)"` Nickname string `xorm:"char(20)"` Mobile string `xorm:"char(11)"` Birthday string `xorm:"Date"` Regip string `xorm:"char(11)"` Regdate string `xorm:"DateTime"` Lastdate string `xorm:"DateTime"` Lastip string `xorm:"char(11)"` Loginnum int64 `xorm:"int(11)"` Groupid int64 `xorm:"int(11)"` UserGroup *User_Group `xorm:"- <- ->"` Areaid int64 `xorm:"int(11)"` Amount float64 `xorm:"float(8,2)"` Point int64 `xorm:"smallint(5)"` Ismessage int64 `xorm:"bool"` Islock int64 `xorm:"bool"` Vip int64 `xorm:"tinyint(1)"` Overduedate string `xorm:"DateTime"` Status int64 `xorm:"bool"` Createtime string `xorm:"DateTime"` }
type User_Group ¶
type User_Group struct { Id int64 `xorm:"pk"` Name string `xorm:"char(15)"` Issystem int64 `xorm:"bool"` Usernum int64 `xorm:"- <- ->"` Star int64 `xorm:"tinyint(2)"` Point int64 `xorm:"smallint(6)"` Allowmessage int64 `xorm:"tinyint(5)"` Allowvisit int64 `xorm:"bool"` Allowpost int64 `xorm:"bool"` Allowpostverify int64 `xorm:"bool"` Allowsearch int64 `xorm:"bool"` Allowupgrade int64 `xorm:"bool"` Allowsendmessage int64 `xorm:"bool"` Allowpostnum int64 `xorm:"bool"` Allowattachment int64 `xorm:"bool"` Priceyear float64 `xorm:"float(8,2)"` Pricemonth float64 `xorm:"float(8,2)"` Priceday float64 `xorm:"float(8,2)"` Icon string `xorm:"char(100)"` Usernamecolor string `xorm:"char(7)"` Desc string `xorm:"char(100)"` Status int64 `xorm:"bool"` Createtime string `xorm:"DateTime"` }
type WeeklyMinutes ¶
type WeeklyMinutes struct { }
每周执行 每周运行一次,周日午夜
func (WeeklyMinutes) Run ¶
func (c WeeklyMinutes) Run()
type YearlyMinutes ¶
type YearlyMinutes struct { }
每年执行 运行一年一次,1月1日午夜
func (YearlyMinutes) Run ¶
func (c YearlyMinutes) Run()
Click to show internal directories.
Click to hide internal directories.