1
This commit is contained in:
parent
49e0ad9a4d
commit
5008b1bf4d
@ -8,6 +8,7 @@ import (
|
||||
"main/model/system"
|
||||
"net/http"
|
||||
"q5"
|
||||
"jccommon"
|
||||
)
|
||||
|
||||
type MailApi struct {
|
||||
@ -42,7 +43,7 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if reqJson.MailType <= constant.MAIL_TYPE_BEGIN || reqJson.MailType >= constant.MAIL_TYPE_END {
|
||||
if reqJson.MailType <= jccommon.MAIL_TYPE_BEGIN || reqJson.MailType >= jccommon.MAIL_TYPE_END {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 2,
|
||||
"message": "mail_type参数错误",
|
||||
@ -65,8 +66,8 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
||||
mail.ModifyTime = nowDaySeconds
|
||||
f5.GetApp().GetOrmDb(constant.MAIL_DB).Create(mail)
|
||||
{
|
||||
e := new(system.MailEvent)
|
||||
e.EventName = constant.EVENT_MAIL_UPDATE
|
||||
e := new(jccommon.MailEvent)
|
||||
e.EventName = jccommon.EVENT_MAIL_UPDATE
|
||||
e.Param1 = q5.ToString(mail.MailId)
|
||||
e.CreateTime = nowDaySeconds
|
||||
e.ModifyTime = nowDaySeconds
|
||||
@ -98,7 +99,7 @@ func (this *MailApi) EditMail(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if reqJson.MailType <= constant.MAIL_TYPE_BEGIN || reqJson.MailType >= constant.MAIL_TYPE_END {
|
||||
if reqJson.MailType <= jccommon.MAIL_TYPE_BEGIN || reqJson.MailType >= jccommon.MAIL_TYPE_END {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 2,
|
||||
"message": "mail_type参数错误",
|
||||
@ -121,8 +122,8 @@ func (this *MailApi) EditMail(c *gin.Context) {
|
||||
mail.ModifyTime = nowDaySeconds
|
||||
f5.GetApp().GetOrmDb(constant.MAIL_DB).Save(mail)
|
||||
{
|
||||
e := new(system.MailEvent)
|
||||
e.EventName = constant.EVENT_MAIL_UPDATE
|
||||
e := new(jccommon.MailEvent)
|
||||
e.EventName = jccommon.EVENT_MAIL_UPDATE
|
||||
e.Param1 = q5.ToString(mail.MailId)
|
||||
e.CreateTime = nowDaySeconds
|
||||
e.ModifyTime = nowDaySeconds
|
||||
|
@ -6,6 +6,8 @@ require q5 v1.0.0
|
||||
|
||||
require f5 v1.0.0
|
||||
|
||||
require jccommon v1.0.0
|
||||
|
||||
require mt v1.0.0
|
||||
|
||||
require mtb v1.0.0 // indirect
|
||||
@ -60,6 +62,8 @@ replace q5 => ../../third_party/q5
|
||||
|
||||
replace f5 => ../../third_party/f5
|
||||
|
||||
replace jccommon => ../jccommon
|
||||
|
||||
replace mt => ./mt
|
||||
|
||||
replace mtb => ./mtb
|
||||
|
@ -1,15 +0,0 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
)
|
||||
|
||||
type MailEvent struct {
|
||||
EventName string `gorm:"column:event_name" json:"event_name"`
|
||||
Param1 string `gorm:"column:param1" json:"param1"`
|
||||
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
|
||||
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
||||
}
|
||||
|
||||
func (MailEvent) TableName() string {
|
||||
return "t_event"
|
||||
}
|
@ -1,13 +1,6 @@
|
||||
package task
|
||||
|
||||
import (
|
||||
"q5"
|
||||
"f5"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
"main/constant"
|
||||
"main/model/system"
|
||||
)
|
||||
|
||||
type taskMgr struct {
|
||||
|
@ -1,15 +0,0 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
)
|
||||
|
||||
type MailEvent struct {
|
||||
EventName string `gorm:"column:event_name" json:"event_name"`
|
||||
Param1 string `gorm:"column:param1" json:"param1"`
|
||||
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
|
||||
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
||||
}
|
||||
|
||||
func (MailEvent) TableName() string {
|
||||
return "t_event"
|
||||
}
|
@ -8,7 +8,6 @@ import (
|
||||
"sync"
|
||||
"jccommon"
|
||||
"main/constant"
|
||||
"main/model"
|
||||
)
|
||||
|
||||
type sysMail struct {
|
||||
@ -133,7 +132,7 @@ func (this *sysMail) writeMail(ds *f5.DataSet) bool {
|
||||
} else {
|
||||
{
|
||||
nowDaySeconds := int32(f5.GetApp().GetRealSeconds())
|
||||
e := new(model.MailEvent)
|
||||
e := new(jccommon.MailEvent)
|
||||
e.EventName = jccommon.EVENT_MAIL_UPDATE
|
||||
e.Param1 = q5.ToString(mailId)
|
||||
e.CreateTime = nowDaySeconds
|
||||
|
@ -47,3 +47,14 @@ type MailConfig struct {
|
||||
Tag1 int32
|
||||
Tag2 int32
|
||||
}
|
||||
|
||||
type MailEvent struct {
|
||||
EventName string `gorm:"column:event_name" json:"event_name"`
|
||||
Param1 string `gorm:"column:param1" json:"param1"`
|
||||
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
|
||||
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
||||
}
|
||||
|
||||
func (MailEvent) TableName() string {
|
||||
return "t_event"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user