|
|
@@ -25,31 +25,46 @@ class WechatPlanRecord extends Model
|
|
|
} while (self::where(['contract_code' => $orderId])->find());
|
|
|
return $orderId;
|
|
|
}
|
|
|
- public static function plan_lst($where)
|
|
|
+// public static function plan_lst($where)
|
|
|
+// {
|
|
|
+// $model = new self;
|
|
|
+// $xwhere = null;
|
|
|
+// $order = "id desc";
|
|
|
+// if (isset($where['uid']) && $where['uid'] > 0) $xwhere['uid'] = $where['uid'];
|
|
|
+// if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
|
|
|
+// $data = $model->where($xwhere)->where('is_signing',0)->order($order)->field('plan_id')->select();
|
|
|
+// var_dump($data);
|
|
|
+// $plan=new WechatPlan();
|
|
|
+// $data2=$plan->where('plan_id','in',['188873'])->select();
|
|
|
+// var_dump($data2);die();
|
|
|
+//// $count = $plan->where('id','in',$data)->count();
|
|
|
+// return $data2;
|
|
|
+// }
|
|
|
+ public static function record_lst($where)
|
|
|
{
|
|
|
$model = new self;
|
|
|
$xwhere = null;
|
|
|
$order = "id desc";
|
|
|
if (isset($where['uid']) && $where['uid'] > 0) $xwhere['uid'] = $where['uid'];
|
|
|
if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
|
|
|
- $data = $model->where($xwhere)->where('is_signing',0)->order($order)->field('plan_id')->select();
|
|
|
- var_dump($data);
|
|
|
- $plan=new WechatPlan();
|
|
|
- $data2=$plan->where('plan_id','in',['188873'])->select();
|
|
|
- var_dump($data2);die();
|
|
|
-// $count = $plan->where('id','in',$data)->count();
|
|
|
- return $data2;
|
|
|
+ $data = $model->where($xwhere)->where('is_signing',0)->order($order)->select();
|
|
|
+ $count = $model->where($xwhere)->count();
|
|
|
+ return compact('count', 'data');
|
|
|
}
|
|
|
- public static function record_lst($where)
|
|
|
+ public static function record_info($where)
|
|
|
{
|
|
|
$model = new self;
|
|
|
$xwhere = null;
|
|
|
$order = "id desc";
|
|
|
- if (isset($where['uid']) && $where['uid'] > 0) $xwhere['uid'] = $where['uid'];
|
|
|
- if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
|
|
|
- if (isset($where['category_id']) && $where['category_id'] > 0) $xwhere['category_id'] = $where['category_id'];
|
|
|
+ if (isset($where['id']) && $where['id'] > 0) $xwhere['id'] = $where['id'];
|
|
|
+// if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
|
|
|
+// if (isset($where['category_id']) && $where['category_id'] > 0) $xwhere['category_id'] = $where['category_id'];
|
|
|
$data = $model->where($xwhere)->where('is_signing',0)->order($order)->select();
|
|
|
$count = $model->where($xwhere)->count();
|
|
|
+ @file_put_contents("quanju.txt", json_encode($data)."-列表详情\r\n", 8);
|
|
|
+ var_dump($data['order_name']);die();
|
|
|
+// $lave = new Lave();
|
|
|
+// $list = $lave->where('uid', $where['uid'])->where('order_name', $data[0][''])->select();
|
|
|
return compact('count', 'data');
|
|
|
}
|
|
|
}
|