bug修改
This commit is contained in:
parent
9a1cb0b712
commit
d607d55792
@ -28,6 +28,16 @@ class KefuController {
|
|||||||
return $conn;
|
return $conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function translateAttachments($config)
|
||||||
|
{
|
||||||
|
$attachments = '';
|
||||||
|
foreach ($config as $attachment) {
|
||||||
|
$attachments .= $attachment['item_id'] . ':' . $attachment['count'] . ';';
|
||||||
|
}
|
||||||
|
return $attachments;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getAwardConfig($gameid, $condition)
|
private function getAwardConfig($gameid, $condition)
|
||||||
{
|
{
|
||||||
$url = '';
|
$url = '';
|
||||||
@ -47,7 +57,6 @@ class KefuController {
|
|||||||
if ($ret['errcode'] == 0) {
|
if ($ret['errcode'] == 0) {
|
||||||
return $ret['items'];
|
return $ret['items'];
|
||||||
} else {
|
} else {
|
||||||
die();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,11 +241,12 @@ class KefuController {
|
|||||||
}
|
}
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$shareInfo = require('../config/kefu.share.config.php');
|
$shareInfo = require('../config/kefu.share.config.php');
|
||||||
|
$gameid = phpcommon/extractGameId($row['accountid']);
|
||||||
$this->sendKefuMsg($userInfo['accountid'],
|
$this->sendKefuMsg($userInfo['accountid'],
|
||||||
array (
|
array (
|
||||||
"touser" => $row['openid'],
|
"touser" => $row['openid'],
|
||||||
"msgtype" => "miniprogrampage",
|
"msgtype" => "miniprogrampage",
|
||||||
"miniprogrampage" =>$shareInfo['1011']
|
"miniprogrampage" =>$shareInfo[$gameid]
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($row['idx'] > $last_idx) {
|
if ($row['idx'] > $last_idx) {
|
||||||
@ -300,8 +310,8 @@ class KefuController {
|
|||||||
$conn = $this->getMysql($accountid);
|
$conn = $this->getMysql($accountid);
|
||||||
$ret = $conn->execScript('INSERT INTO accounts_kefu(accountid, channel, gameid, openid, awardtime) ' .
|
$ret = $conn->execScript('INSERT INTO accounts_kefu(accountid, channel, gameid, openid, awardtime) ' .
|
||||||
'SELECT :accountid, :channel, :gameid, :openid, :awardtime ' .
|
'SELECT :accountid, :channel, :gameid, :openid, :awardtime ' .
|
||||||
'FROM accounts_kefu ' .
|
'FROM DUAL ' .
|
||||||
'WHERE NOT EXISTS(SELECT accountid FROM accounts_kefu WHERE accoutid=:accountid);',
|
'WHERE NOT EXISTS(SELECT accountid FROM accounts_kefu WHERE accountid=:accountid);',
|
||||||
array(
|
array(
|
||||||
':accountid' => $accountid,
|
':accountid' => $accountid,
|
||||||
':channel' => WEIXIN_CHANNEL,
|
':channel' => WEIXIN_CHANNEL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user