正在显示
1 个修改的文件
包含
15 行增加
和
1 行删除
@@ -17,9 +17,16 @@ use think\Db; | @@ -17,9 +17,16 @@ use think\Db; | ||
17 | class LoadController extends HomeBaseController | 17 | class LoadController extends HomeBaseController |
18 | { | 18 | { |
19 | public function index(){ | 19 | public function index(){ |
20 | + $type = $this->request->param('type'); | ||
21 | + if(!$type){ | ||
22 | + $arr['code'] = 40001; | ||
23 | + $arr['msg'] = '缺点参数!'; | ||
24 | + return json_encode($arr); | ||
25 | + } | ||
20 | //查询所有在托管中的保单 | 26 | //查询所有在托管中的保单 |
21 | $orderInfoModel = new OrderInfoModel(); | 27 | $orderInfoModel = new OrderInfoModel(); |
22 | $time = time(); | 28 | $time = time(); |
29 | + if($type == 1){ | ||
23 | $where['o.status'] = ['eq',3]; | 30 | $where['o.status'] = ['eq',3]; |
24 | $where['o.order_about_time'] = array(array('<',$time),array('>',$time-30*24*60*60));//array(array('gt',1),array('lt',10)) | 31 | $where['o.order_about_time'] = array(array('<',$time),array('>',$time-30*24*60*60));//array(array('gt',1),array('lt',10)) |
25 | $whereor = "o.status = 1 and o.order_about_time < $time and o.order_about_time > ".($time-30*24*60*60); | 32 | $whereor = "o.status = 1 and o.order_about_time < $time and o.order_about_time > ".($time-30*24*60*60); |
@@ -38,7 +45,7 @@ class LoadController extends HomeBaseController | @@ -38,7 +45,7 @@ class LoadController extends HomeBaseController | ||
38 | 'keyword4'=>date('Y-m-d',$vo['order_about_time']+30*24*60*60), | 45 | 'keyword4'=>date('Y-m-d',$vo['order_about_time']+30*24*60*60), |
39 | 'remark'=>"请在保障期间内续费", | 46 | 'remark'=>"请在保障期间内续费", |
40 | ); | 47 | ); |
41 | - $url = ''; | 48 | + $url = url('/index/all_guarantee/guarantee_info',array('id'=>$vo['o_id']),'',true); |
42 | $user1 = Db::name('third_party_user')->where('user_id',$vo['user_id'])->find(); | 49 | $user1 = Db::name('third_party_user')->where('user_id',$vo['user_id'])->find(); |
43 | $this->template($templateId,$data1,$url,$user1['openid']); | 50 | $this->template($templateId,$data1,$url,$user1['openid']); |
44 | //短信 | 51 | //短信 |
@@ -48,6 +55,13 @@ class LoadController extends HomeBaseController | @@ -48,6 +55,13 @@ class LoadController extends HomeBaseController | ||
48 | Db::name('send_vice')->insert(array('order_id'=>$vo['o_id'],'collocation_id'=>$vo['id'],'time'=>$vo['order_about_time'],'user_id'=>$vo['user_id'],'create_time'=>time())); | 55 | Db::name('send_vice')->insert(array('order_id'=>$vo['o_id'],'collocation_id'=>$vo['id'],'time'=>$vo['order_about_time'],'user_id'=>$vo['user_id'],'create_time'=>time())); |
49 | } | 56 | } |
50 | } | 57 | } |
58 | + }else if($type == 2){ | ||
59 | + //$data['status'] eq 2 || $data['order_expire_time'] lt time() || ($data['order_about_time']+24*30*60*60) lt time() | ||
60 | + $where = []; | ||
61 | + $whereor = "o.status = 2 or o.order_expire_time < $time or o.order_about_time < ".$time - 24*30*60*60; | ||
62 | + $data = $orderInfoModel->selectData1($where,$whereor); | ||
63 | + dump($data); | ||
64 | + } | ||
51 | } | 65 | } |
52 | public function template($templateId,$data,$url=null,$openid){ | 66 | public function template($templateId,$data,$url=null,$openid){ |
53 | $options=config('wechat_config'); | 67 | $options=config('wechat_config'); |
-
请 注册 或 登录 后发表评论