1
This commit is contained in:
parent
9a89494deb
commit
59b31a0d6d
@ -11,6 +11,15 @@ import (
|
||||
type MailApi struct {
|
||||
}
|
||||
|
||||
func (this *MailApi) ListMail(c *gin.Context) {
|
||||
mails := []system.Mail{}
|
||||
f5.GetApp().GetOrmDb(constant.MAIL_DB).Find(&mails)
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 0,
|
||||
"message": "",
|
||||
"data": mails,
|
||||
})
|
||||
}
|
||||
|
||||
func (this *MailApi) AddMail(c *gin.Context) {
|
||||
reqJson := struct {
|
||||
@ -58,13 +67,3 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
||||
"message": "",
|
||||
})
|
||||
}
|
||||
|
||||
func (this *MailApi) ListMail(c *gin.Context) {
|
||||
mails := []system.Mail{}
|
||||
f5.GetApp().GetOrmDb(constant.MAIL_DB).Find(&mails)
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 0,
|
||||
"message": "",
|
||||
"data": mails,
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"net/http"
|
||||
"main/constant"
|
||||
"main/model/system"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -8,6 +12,13 @@ type UserGroupApi struct {
|
||||
}
|
||||
|
||||
func (this *UserGroupApi) List(c *gin.Context) {
|
||||
groups := []system.UserGroup{}
|
||||
f5.GetApp().GetOrmDb(constant.MAIL_DB).Find(&groups)
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 0,
|
||||
"message": "",
|
||||
"data": groups,
|
||||
})
|
||||
}
|
||||
|
||||
func (this *UserGroupApi) Add(c *gin.Context) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package system
|
||||
|
||||
type Group struct {
|
||||
type UserGroup struct {
|
||||
GroupId int64 `gorm:"unique;column:group_id" json:"group_id"`
|
||||
GroupName string `gorm:"unique;column:group_name" json:"group_name"`
|
||||
GroupDesc string `gorm:"column:group_desc" json:"group_desc"`
|
||||
@ -10,6 +10,6 @@ type Group struct {
|
||||
ModifyTime int32 `gorm:"unique;column:modifytime" json:"modifytime"`
|
||||
}
|
||||
|
||||
func (Group) TableName() string {
|
||||
func (UserGroup) TableName() string {
|
||||
return "t_group"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user