改为当天只能领取一次
This commit is contained in:
parent
bb11ed8c20
commit
68b1bc68e5
@ -28,12 +28,6 @@ class KefuController {
|
|||||||
return $conn;
|
return $conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDaySeconds($time_val, $incdays)
|
|
||||||
{
|
|
||||||
$time_zone = 8;
|
|
||||||
return int(($time_val + $time_zone * 3600)/3600/24 + $incdays) * 3600 * 24 - 3600 * $time_zone;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function translateAttachments($config)
|
private function translateAttachments($config)
|
||||||
{
|
{
|
||||||
$attachments = '';
|
$attachments = '';
|
||||||
@ -283,7 +277,7 @@ class KefuController {
|
|||||||
array(
|
array(
|
||||||
':accountid' => $accountid,
|
':accountid' => $accountid,
|
||||||
));
|
));
|
||||||
if ($row && time() - $row['awardtime'] < 3600 * 24) {
|
if ($row && date("y-m-d", time()) == date("y-m-d", $row['awardtime'])) {
|
||||||
$this->sendKefuMsg($accountid, array (
|
$this->sendKefuMsg($accountid, array (
|
||||||
"touser" => $openid,
|
"touser" => $openid,
|
||||||
"msgtype" => "text",
|
"msgtype" => "text",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user