This commit is contained in:
aozhiwei 2024-07-06 16:36:34 +08:00
parent b9a8208c1e
commit 47b1ca0245

View File

@ -297,6 +297,36 @@ func (this *mailMgr) CaSendMail(c *gin.Context) {
return
}
}
{
var dbErr error
found := false
f5.GetGoStyleDb().OrmSelectOne(
constant.MAIL_DB,
"t_mail",
[][]string{
{"unikey", reqJson.UniKey},
},
func (err error, ds *f5.DataSet) {
dbErr = err
if err == nil {
if ds.Next() {
found = true
}
}
});
if dbErr != nil {
rspObj.ErrCode = 500
rspObj.ErrMsg = dbErr.Error()
c.JSON(200, rspObj)
return
}
if found {
rspObj.ErrCode = 3
rspObj.ErrMsg = "mail already exists"
c.JSON(200, rspObj)
return
}
}
mailId := f5.GetApp().NewLockNodeUuid()
nowTime := f5.GetApp().GetRealSeconds()
f5.GetGoStyleDb().Insert(