|
@@ -46,8 +46,8 @@ class BoxHookService extends Service
|
|
|
$box = new Box();
|
|
|
$data['order_no'] = $this->setOrderNo();
|
|
|
if(!isset($data['out_order_no'])) return [false,'out_order_no is not exist'];
|
|
|
- if(!isset($data['top_id'])) return [false,'top_id is not exist'];
|
|
|
- if(!isset($data['num'])) return [false,'num is not exist'];
|
|
|
+// if(!isset($data['top_id'])) return [false,'top_id is not exist'];
|
|
|
+// if(!isset($data['num'])) return [false,'num is not exist'];
|
|
|
list($status,$box) = $this->dealBox($box,$data);
|
|
|
if(!$status) return [false,$box];
|
|
|
$box->save();
|
|
@@ -68,8 +68,8 @@ class BoxHookService extends Service
|
|
|
|
|
|
$box->order_no = $data['order_no'];
|
|
|
$box->out_order_no = $data['out_order_no'];
|
|
|
- $box->top_id = $data['top_id'];
|
|
|
- $box->num = $data['num'];
|
|
|
+// $box->top_id = $data['top_id'];
|
|
|
+// $box->num = $data['num'];
|
|
|
$box->ext_1 = isset($data['ext_1']) ? $data['ext_1'] : '';
|
|
|
$box->ext_2 = isset($data['ext_2']) ? $data['ext_2'] : '';
|
|
|
$box->ext_3 = isset($data['ext_3']) ? $data['ext_3'] : '';
|
|
@@ -112,16 +112,18 @@ class BoxHookService extends Service
|
|
|
$time = time();
|
|
|
foreach ($data as $v){
|
|
|
if(!isset($v['top_id'])) return [false,'top_id is not exist'];
|
|
|
- if(!isset($v['code'])) return [false,'code is not exist'];
|
|
|
- if(!isset($v['title'])) return [false,'title is not exist'];
|
|
|
- if(!isset($v['type'])) return [false,'type is not exist'];
|
|
|
+// if(!isset($v['code'])) return [false,'code is not exist'];
|
|
|
+// if(!isset($v['title'])) return [false,'title is not exist'];
|
|
|
+// if(!isset($v['type'])) return [false,'type is not exist'];
|
|
|
+ if(!isset($v['num'])) return [false,'type is not exist'];
|
|
|
|
|
|
$insert[] = [
|
|
|
'order_no' => $order_no,
|
|
|
'out_order_no' => $out_order_no,
|
|
|
'top_id' => $v['top_id'],
|
|
|
- 'code' => $v['code'],
|
|
|
- 'title' => $v['title'],
|
|
|
+ 'code' => '',
|
|
|
+ 'title' => '',
|
|
|
+ 'num' => $v['num'],
|
|
|
'type' => isset($v['type'])?$v['type'] : 1,
|
|
|
'crt_time' => $time,
|
|
|
'upd_time' => $time,
|
|
@@ -152,7 +154,8 @@ class BoxHookService extends Service
|
|
|
* @return array
|
|
|
*/
|
|
|
public function boxDetail($data){
|
|
|
- $box = new Box();
|
|
|
+ $order_no = $data['order_no'];
|
|
|
+ $box = new BoxDetail(['channel'=>$order_no]);
|
|
|
if(!isset($data['id'])) return [false,'id not found'];
|
|
|
$list = $box->where('top_id',$data['id'])->get()->toArray();
|
|
|
|