1
This commit is contained in:
parent
b3ce994c10
commit
a0b94846d0
@ -1,6 +1,41 @@
|
||||
package service
|
||||
|
||||
func SendSysMail(uniKey string, to string, subject string, content string, expireTime int32,
|
||||
import (
|
||||
"q5"
|
||||
"f5"
|
||||
"main/constant"
|
||||
)
|
||||
|
||||
func SendSysMail(uniKey string, to string, subject string, content string, sendTime int32, expireTime int32,
|
||||
tag1 int32, tag2 int32) bool {
|
||||
return true
|
||||
var dbErr error
|
||||
nowTime := f5.GetApp().GetRealSeconds()
|
||||
f5.GetGoStyleDb().Upsert(
|
||||
constant.MAIL_DB,
|
||||
"t_sys_mail",
|
||||
[][]string{
|
||||
{"unikey", uniKey},
|
||||
},
|
||||
[][]string{
|
||||
},
|
||||
[][]string{
|
||||
{"unikey", uniKey},
|
||||
{"subject", subject},
|
||||
{"content", content},
|
||||
{"recipients", q5.EncodeJson([]string{
|
||||
to,
|
||||
})},
|
||||
{"tag1", q5.ToString(tag1)},
|
||||
{"tag2", q5.ToString(tag2)},
|
||||
{"sendtime", q5.ToString(sendTime)},
|
||||
{"expiretime", q5.ToString(expireTime)},
|
||||
{"user_reg_start_time", q5.ToString(0)},
|
||||
{"user_reg_end_time", q5.ToString(nowTime + 3600 * 24 * 365 * 10)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
},
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
dbErr = err
|
||||
})
|
||||
return dbErr == nil
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ func (this* goldBullion) internalSendMail(dbIdx int64, accountAddress string, ma
|
||||
subject,
|
||||
content,
|
||||
q5.ToInt32(nowTime),
|
||||
q5.ToInt32(nowTime),
|
||||
mailCfg.Tag1,
|
||||
mailCfg.Tag2)
|
||||
if sendOk {
|
||||
|
@ -66,6 +66,7 @@ func (this* hero) internalSendMail(dbIdx int64, accountAddress string, mailName
|
||||
subject,
|
||||
content,
|
||||
q5.ToInt32(nowTime),
|
||||
q5.ToInt32(nowTime),
|
||||
mailCfg.Tag1,
|
||||
mailCfg.Tag2)
|
||||
if sendOk {
|
||||
|
Loading…
x
Reference in New Issue
Block a user