1
This commit is contained in:
parent
69c0d986a6
commit
1945411d1a
@ -20,6 +20,11 @@ func (this *MailApi) ListMail(c *gin.Context) {
|
||||
orderBy := ""
|
||||
sql := "SELECT * FROM t_mail"
|
||||
subFilters := []f5.DbQueryFilter{}
|
||||
{
|
||||
inSub := `tag1 IN (` + q5.ToString(jccommon.MAIL_TAG1_CUSTOM)
|
||||
inSub += ")"
|
||||
q5.AppendSlice(&subFilters, f5.GetDbFilter().Custom(inSub).And())
|
||||
}
|
||||
mails := []*system.Mail{}
|
||||
f5.GetGoStyleDb().StreamPageQuery(
|
||||
constant.MAIL_DB,
|
||||
@ -72,6 +77,10 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if reqJson.UniKey == "" {
|
||||
f5.RspErr2(c, 101, "unikey param error")
|
||||
return
|
||||
}
|
||||
nowDaySeconds := int32(f5.GetApp().GetRealSeconds())
|
||||
mail := new(system.Mail)
|
||||
mail.MailId = f5.GetApp().NewLockNodeUuid()
|
||||
@ -89,7 +98,8 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
||||
mail.CreateTime = nowDaySeconds
|
||||
mail.ModifyTime = nowDaySeconds
|
||||
if f5.GetApp().GetOrmDb(constant.MAIL_DB).Create(mail).Error == nil {
|
||||
|
||||
f5.RspErr2(c, 500, "server internal error")
|
||||
return
|
||||
}
|
||||
{
|
||||
e := new(jccommon.MailEvent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user