1
This commit is contained in:
parent
18a8d9d32e
commit
e3e9ea64be
@ -4,9 +4,13 @@ namespace services;
|
|||||||
|
|
||||||
class MailApiService extends BaseService {
|
class MailApiService extends BaseService {
|
||||||
|
|
||||||
|
const SELL_UNIKEY_PRE = 'ingame.market.sell:';
|
||||||
|
const BUY_UNIKEY_PRE = 'ingame.market.buy:';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
orderId:订单id
|
orderId:订单id
|
||||||
to:邮件接受方account_id
|
to:邮件接受方account_id
|
||||||
|
subject: 邮件标题
|
||||||
content: 邮件正文
|
content: 邮件正文
|
||||||
attachments: 邮件附件
|
attachments: 邮件附件
|
||||||
[
|
[
|
||||||
@ -16,14 +20,39 @@ class MailApiService extends BaseService {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
public function sendSellMail($orderId, $to, $content, $attachments)
|
public function sendSellMail($orderId, $to, $subject, $content, $attachments)
|
||||||
{
|
{
|
||||||
|
$unikey = self::SELL_UNIKEY_PRE . $oderId;
|
||||||
|
SqlHelper::upsert
|
||||||
|
(myself()->_getMailMysql(),
|
||||||
|
't_used_name',
|
||||||
|
array(
|
||||||
|
'unikey' => $unikey
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'unikey' => $unikey,
|
||||||
|
'subject' => $subject,
|
||||||
|
'content' => $content,
|
||||||
|
'recipients' => array(
|
||||||
|
array(
|
||||||
|
'account_id' => $to,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'attachments' => json_encode($attachments),
|
||||||
|
'sendtime' => myself()->_getNowTime(),
|
||||||
|
'expiretime' => myself()->_getNowTime() + 3600 * 24 * 365 * 10,
|
||||||
|
'createtime' => myself()->_getNowTime(),
|
||||||
|
'modifytime' => myself()->_getNowTime()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
orderId:订单id
|
orderId:订单id
|
||||||
to:邮件接受方account_id
|
to:邮件接受方account_id
|
||||||
|
subject: 邮件标题
|
||||||
content: 邮件正文
|
content: 邮件正文
|
||||||
attachments: 邮件附件
|
attachments: 邮件附件
|
||||||
[
|
[
|
||||||
@ -33,7 +62,7 @@ class MailApiService extends BaseService {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
public function sendBuyMail($orderId, $to, $content, $attachments)
|
public function sendBuyMail($orderId, $to, $subject, $content, $attachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user