1
This commit is contained in:
parent
de3c55a8c5
commit
00e655d501
@ -69,6 +69,7 @@ CREATE TABLE `t_group` (
|
||||
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`group_id` bigint NOT NULL COMMENT 'group id',
|
||||
`group_name` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT '分组名',
|
||||
`group_desc` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT '描述',
|
||||
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '是否已删除',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
|
@ -38,7 +38,7 @@ exports.Mail = class RspHead {
|
||||
['mail_type', '', '邮件类型'],
|
||||
['subject', '', '邮件标题'],
|
||||
['content', '', '邮件内容'],
|
||||
['reciver', '', '收件人'],
|
||||
['recipients', '', '收件人列表'],
|
||||
['attachments', '', '邮件附件'],
|
||||
['deleted', 0, '是否已删除'],
|
||||
['sendtime', 0, '发送时间'],
|
||||
|
@ -35,7 +35,7 @@ module.exports = class {
|
||||
['mail_type', 0, '邮件类型'],
|
||||
['subject', '', '邮件标题'],
|
||||
['content', '', '邮件内容'],
|
||||
['reciver', '', '收件人'],
|
||||
['recipients', '', '收件人列表'],
|
||||
['attachments', '', '邮件附件'],
|
||||
['sendtime', 0, '发送时间'],
|
||||
['user_reg_start_time', 0, '用户注册开始时间'],
|
||||
|
@ -58,3 +58,13 @@ 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,
|
||||
})
|
||||
}
|
||||
|
@ -29,5 +29,5 @@ const (
|
||||
MAIL_TYPE_BEGIN = 0
|
||||
MAIL_TYPE_GROUP = 1
|
||||
MAIL_TYPE_ALL = 2
|
||||
MAIL_TYPE_END
|
||||
MAIL_TYPE_END = iota
|
||||
)
|
||||
|
@ -1,19 +1,19 @@
|
||||
package system
|
||||
|
||||
type Mail struct {
|
||||
MailId int64 `gorm:unique, "column:mail_id"`
|
||||
MailType int32 `gorm:"column:mail_type"`
|
||||
Subject string `gorm:"column:subject"`
|
||||
Content string `gorm:"column:content"`
|
||||
Recipients string `gorm:"column:recipients"`
|
||||
Attachments string `gorm:"column:attachments"`
|
||||
Deleted int32 `gorm:"column:deleted"`
|
||||
SendTime int32 `gorm:"column:sendtime"`
|
||||
UserRegStartTime int32 `gorm:"column:user_reg_start_time"`
|
||||
UserRegEndTime int32 `gorm:"column:user_reg_end_time"`
|
||||
ExpireTime int32 `gorm:"column:expiretime"`
|
||||
CreateTime int32 `gorm:"column:createtime"`
|
||||
ModifyTime int32 `gorm:"column:modifytime"`
|
||||
MailId int64 `gorm:"unique;column:mail_id" json:"mail_id"`
|
||||
MailType int32 `gorm:"column:mail_type" json:"mail_type"`
|
||||
Subject string `gorm:"column:subject" json:"subject"`
|
||||
Content string `gorm:"column:content" json:"content"`
|
||||
Recipients string `gorm:"column:recipients" json:"recipients"`
|
||||
Attachments string `gorm:"column:attachments" json:"attachments"`
|
||||
Deleted int32 `gorm:"column:deleted" json:"deleted"`
|
||||
SendTime int32 `gorm:"column:sendtime" json:"sendtime"`
|
||||
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
|
||||
UserRegEndTime int32 `gorm:"column:user_reg_end_time" json:"user_reg_end_time"`
|
||||
ExpireTime int32 `gorm:"column:expiretime" json:"expiretime"`
|
||||
CreateTime int32 `gorm:"column:createtime" json:"createtime"`
|
||||
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
||||
}
|
||||
|
||||
func (Mail) TableName() string {
|
||||
|
@ -12,5 +12,6 @@ func (this *MailRoute) InitMailRouter(priRouter *gin.RouterGroup) {
|
||||
mailApi := v1.ApiGroupApp.SystemApiGroup.MailApi
|
||||
{
|
||||
priUserRouter.POST("add", mailApi.AddMail)
|
||||
priUserRouter.GET("list", mailApi.ListMail)
|
||||
}
|
||||
}
|
||||
|
2
third_party/f5
vendored
2
third_party/f5
vendored
@ -1 +1 @@
|
||||
Subproject commit 9c2949041aafd4ceb4ef2e3e10383e33cfe66016
|
||||
Subproject commit 85cacf770e46bd8664279d087e470bd8d262b7af
|
Loading…
x
Reference in New Issue
Block a user