Commit 75b324f9 authored by hujun's avatar hujun

回调id判断

parent adbacda5
......@@ -42,14 +42,13 @@ class PrivacyNumber
$call_time = strtotime($post_data[0]['release_time']) - strtotime($post_data[0]['start_time']);
$post_data[0]['time'] = $call_time;
$report = new SecretReport();
$report->allowField(true)->save($post_data[0]);
if ($call_time > 0) {
$date = date('Y-m-d');
$end_date = date('Y-m-d H:i:s', time());
$start_date = date('Y-m-d H:i:s', strtotime("-1 day"));
$num = Db::table('aliyun_secret_report')->where('phone_no', $post_data[0]['phone_no'])
->where('peer_no', $post_data[0]['peer_no'])
->where('create_time','between', [$date .' 00:00:00', $date . ' 23:59:59'])
->where('create_time', 'between', [ $start_date, $end_date ])
->count('id');
if (empty($num)) {
......@@ -57,6 +56,9 @@ class PrivacyNumber
$m_service->saveCallNumByUserId($post_data[0]['users_id']);
}
}
$report = new SecretReport();
$report->allowField(true)->save($post_data[0]);
Log::write(json_encode($post_data[0]), 'AliYunSecretReport'); //记录日志
return json_encode([ 'code' => 0, 'msg' => '接收成功' ]);
}
......@@ -256,7 +258,7 @@ class PrivacyNumber
$where['a.status'] = 1;
$where['a.type'] = 1;
$where['a.expiry_date'] = ['<', date('Y-m-d H:i:s')];
$where['a.expiry_date'] = [ '<', date('Y-m-d H:i:s') ];
$select_data = $m_bind->getBindingPhoneList('a.id,a.aliYun_phone_id,b.phone_x,a.subsId,a.expiry_date', $where);
foreach ($select_data as $k => $v) {
......@@ -272,7 +274,8 @@ class PrivacyNumber
* 号码批量插入
* @throws \Exception
*/
public function insertPhone() {
public function insertPhone()
{
// $phone = [
//
// ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment