...
|
...
|
@@ -415,6 +415,21 @@ class FormController extends WeChatBaseController |
|
|
Db::name('order')->where('id',$result1)->update($update);
|
|
|
}
|
|
|
$orderModel->commit();
|
|
|
//推送模板消息
|
|
|
if($data1['status'] == 1 || $data1['status'] == 3){
|
|
|
$templateId = 'rQSM5XqM4cJEua6nsJC4IGuLfIOYvkNOVKVABILc8Ro';
|
|
|
$data1 = array(
|
|
|
'first'=>"尊敬的用户,您的保单即将生效",
|
|
|
'keyword1'=>$collocation['insurance_num'],
|
|
|
'keyword2'=>$collocation['product_name'],
|
|
|
'keyword3'=>$collocation['insurer'],
|
|
|
'keyword4'=>"$collocation[take_time]至$collocation[expire_time]",
|
|
|
'remark'=>"立即查看保单详情",
|
|
|
);
|
|
|
$url = cmf_url('');
|
|
|
$user1 = Db::name('third_party_user')->where('user_id',$vo['user_id'])->find();
|
|
|
$this->template($templateId,$data1,$url,$user1['openid']);
|
|
|
}
|
|
|
$arr['code'] = 20000;
|
|
|
$arr['msg'] = '操作成功!';
|
|
|
$arr['data'] = $result1;//返回主订单id
|
...
|
...
|
@@ -460,6 +475,19 @@ class FormController extends WeChatBaseController |
|
|
$arr['msg'] = '创建续费订单失败!';
|
|
|
return json_encode($arr);
|
|
|
}
|
|
|
//推送模板消息
|
|
|
// $templateId = 'HVcMt58ic_QhO4yHm4IONQE466ijqQxF0l7rPDcQK1o';
|
|
|
// $data1 = array(
|
|
|
// 'first'=>"尊敬的用户,您有一份保单即将到期需要续费,请在保障截止日期前完成续保,否则保单将失效",
|
|
|
// 'keyword1'=>$vo['insurer'],
|
|
|
// 'keyword2'=>$vo['product_name'],
|
|
|
// 'keyword3'=>$vo['insurance_num'],
|
|
|
// 'keyword4'=>date('Y-m-d',$s['time']+30*24*60*60),
|
|
|
// 'remark'=>"请在保障期间内续费",
|
|
|
// );
|
|
|
// $url = '';
|
|
|
// $user1 = Db::name('third_party_user')->where('user_id',$vo['user_id'])->find();
|
|
|
// $this->template($templateId,$data1,$url,$user1['openid']);
|
|
|
$arr['code'] = 20000;
|
|
|
$arr['msg'] = '创建续费订单成功';
|
|
|
$arr['data'] = $result;
|
...
|
...
|
|