调整
This commit is contained in:
parent
198d167e11
commit
1e82e82da3
@ -134,6 +134,18 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if !this.CheckAttachment(reqJson.Attachments, c) {
|
||||
return
|
||||
}
|
||||
|
||||
if data, err := json.Marshal(reqJson.Recipients); err != nil || len(data) > 0xFFFF {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 2,
|
||||
"message": "收件人过多",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
var count int64 = 0
|
||||
if f5.GetApp().GetOrmDb(constant.MAIL_DB).Table("t_mail").Where("unikey = ?", reqJson.UniKey).Count(&count); count > 0 {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
@ -143,10 +155,6 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if !this.CheckAttachment(reqJson.Attachments, c) {
|
||||
return
|
||||
}
|
||||
|
||||
s := c.MustGet("session").(common.Session)
|
||||
acc := s.GetAccountAddress()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user