增加商户经纬度
This commit is contained in:
parent
4a3ea8e9ae
commit
0e47065080
@ -43,53 +43,6 @@ class LogisticsController extends BaseAdminController
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/08/07 15:00
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new LogisticsValidate())->post()->goCheck('add');
|
||||
$result = LogisticsLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LogisticsLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/08/07 15:00
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new LogisticsValidate())->post()->goCheck('edit');
|
||||
$result = LogisticsLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LogisticsLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/08/07 15:00
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new LogisticsValidate())->post()->goCheck('delete');
|
||||
LogisticsLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取详情
|
||||
|
@ -74,7 +74,7 @@ class LogisticsLogic extends BaseLogic
|
||||
*/
|
||||
public static function cDetail($id):array {
|
||||
//获取物流信息
|
||||
$logistics = Logistics::field('id,order_id,order_sn,shop_name,shop_phone,shop_address,user_name,user_address,status,create_time')
|
||||
$logistics = Logistics::field('id,order_id,order_sn,shop_name,shop_phone,shop_address,user_name,user_address,shop_long,shop_lat,status,create_time')
|
||||
->where('id', $id)->find();
|
||||
//获取商品信息
|
||||
$product_count = 0;
|
||||
@ -164,7 +164,7 @@ class LogisticsLogic extends BaseLogic
|
||||
//查找订单信息
|
||||
$order = Order::alias('s')
|
||||
->leftjoin('eb_merchant m', 'm.mer_id = s.mer_id')
|
||||
->field('s.real_name, s.user_phone,s.uid, s.user_address,s.user_address_code,m.mer_name, m.mer_phone, m.mer_address')
|
||||
->field('s.real_name, s.user_phone,s.uid, s.user_address,s.user_address_code,m.mer_id,m.mer_name,m.mer_phone,m.mer_address,m.long,m.lat')
|
||||
->where('order_id', $params['order_id'])->where('order_sn', $params['order_sn'])->find();
|
||||
if(empty($order['user_address_code'])) return ['code'=>1, 'msg'=>'用户地址信息错误'];
|
||||
//匹配配送员
|
||||
@ -183,9 +183,12 @@ class LogisticsLogic extends BaseLogic
|
||||
'order_id' => $params['order_id'],
|
||||
'order_sn' => $params['order_sn'],
|
||||
'courier_id' => $courier,
|
||||
'shop_id' => $order['mer_id'],
|
||||
'shop_name' => $order['mer_name'],
|
||||
'shop_phone' => $order['mer_phone'],
|
||||
'shop_address' => $order['mer_address'],
|
||||
'shop_long' => $order['long'],
|
||||
'shop_lat' => $order['lat'],
|
||||
'user_id' => $order['uid'],
|
||||
'user_name' => $order['real_name'],
|
||||
'user_phone' => $order['user_phone'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user