Browse Source

新增order_id返回

master
weigang 6 years ago
parent
commit
10ff788c7a
  1. 13
      app/Service/AttachmentService.php
  2. 2
      app/Service/AttachmentServiceInterface.php
  3. 35
      app/Service/OrderListService.php

13
app/Service/AttachmentService.php

@ -70,4 +70,17 @@ class AttachmentService implements AttachmentServiceInterface
$path .= '/'.date('Y').'/'.date('m').'/'.date('d');
return $baseDir.$path;
}
public function switchImgToAliOss($path, $bucket = 'thumbnail_q50')
{
if (strpos($path, 'http') === false || strpos($path, 'https') === false) {
$path = 'https://img.lanzulive.com/' . $path;
} else {
$temp = explode('//', $path);
$temp = explode('/', $temp[1]);
unset($temp[0]);
$path = 'https://img.lanzulive.com/' . implode('/', $temp);
}
return $path . '!' . $bucket;
}
}

2
app/Service/AttachmentServiceInterface.php

@ -20,4 +20,6 @@ interface AttachmentServiceInterface
* @param $filesystem
*/
public function base64Upload($contents, $path, $filesystem);
public function switchImgToAliOss($path, $bucket = '');
}

35
app/Service/OrderListService.php

@ -78,24 +78,25 @@ class OrderListService implements OrderListServiceInterface
['type','=',1],
])
->select(
'id as order_id',
'address',
'box_money',
'delivery_time',
'dn_state',
'money',
'name',
'note',
'order_num',
'order_type',
'pay_time',
'pay_type',
'state',
'dada_fee as ps_money',
'time',
'type',
'yhq_money2',
'tel',
'dada_status'
'box_money',
'delivery_time',
'dn_state',
'money',
'name',
'note',
'order_num',
'order_type',
'pay_time',
'pay_type',
'state',
'dada_fee as ps_money',
'time',
'type',
'yhq_money2',
'tel',
'dada_status'
)
->first();
$order = Db::table('ims_cjdc_order as o')

Loading…
Cancel
Save