This commit is contained in:
aozhiwei 2023-09-14 13:20:36 +08:00
parent bdc86b2a84
commit ef699fe8cd
3 changed files with 44 additions and 0 deletions

View File

@ -1663,6 +1663,8 @@ CREATE TABLE `t_mail` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`mailid` bigint NOT NULL DEFAULT '0' COMMENT '邮件id',
`confirmed` int(11) NOT NULL DEFAULT '0' COMMENT 'confirmed',
`attachments` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '附件',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),

View File

@ -4,6 +4,8 @@ CREATE TABLE `t_mail` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`mailid` bigint NOT NULL DEFAULT '0' COMMENT '邮件id',
`confirmed` int(11) NOT NULL DEFAULT '0' COMMENT 'confirmed',
`attachments` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '附件',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),

View File

@ -3,8 +3,48 @@
class MailController extends BaseAuthedController {
public function getAttachment()
{
$mailIds = getReqVal('mail_ids', '');
$response = '';
{
$params = array(
'c' => 'Mail',
'a' => 'getAttachment',
'account_id' => myself()->_getAccountId(),
'session_id' => myself()->_getSessionId(),
'mail_ids' => $mailIds
);
$url = self::getMailServerUrl();
if (!phpcommon\HttpClient::get
($url,
$params,
$response)) {
myself()->_rspErr(500, 'server internal error 3, url:' . $url);
die();
return;
}
}
$rspObj = json_decode($response, true);
if ($rspObj && $rspObj['errcode'] == 0) {
$this->procAttachments($rspObj['attachments']);
}
echo $response;
}
private function procAttachments($attachments)
{
}
private static function getMailServerUrl()
{
if (SERVER_ENV != _ONLINE) {
return "https://gamemail-test.kingsome.cn/webapp/index.php";
} else {
return "https://gamemail-test.cebggame.com/webapp/index.php";
}
}
}