全部
常见问题
产品动态
精选推荐

多商户1.6.1订单快递查询报错问题修复

管理 管理 编辑 删除

订单者查询不出快递信息或查询报错如下:

attachmentId-9218

解决方法 :

1、修改app\common\repositories\store\order\StoreOrderRepository.php直接替换方法即可

attachmentId-9220

public function express(int $orderId,? int $merId)
    {
        $order = $this->dao->get($orderId);
        if ($merId && $order['mer_id']  != $merId)  throw new ValidateException('订单信息不存在');
        if (!in_array($order['delivery_type'],[1,4]))  throw new ValidateException('订单状态错误');
        return ExpressService::express($order->delivery_id, $order->delivery_name, $order->user_phone);
    }

2、修改app\controller\admin\order\Order.php 这里的参数传入,或者直接替换整个方法

attachmentId-9219

public function express($id)
    {
        if (!$this->repository->getWhereCount(['order_id' => $id, 'delivery_type' => 1]))
            return app('json')->fail('订单信息或状态错误');
        return app('json')->success($this->repository->express($id,null));
    }

3、修改移动端app\controller\api\store\order\StoreOrder.php,替换整个方法

attachmentId-9356

public function express($id)
    {
        $order = $this->repository->getWhere(['order_id' => $id, 'is_del' => 0]);
        if (!$order)
            return app('json')->fail('订单不存在');
        if (!$order->delivery_type || !$order->delivery_id)
            return app('json')->fail('订单未发货');
        $express = $this->repository->express($id,null);
        $order->append(['orderProduct']);
        return app('json')->success(compact('express', 'order'));
    }

4、删除crmeb\services\ExpressService.php部分验证代码

attachmentId-9237

5、修改退款查询快递部分 app\common\repositories\store\order\StoreRefundOrderRepository.php,替换整个方法

attachmentId-9359

public function express($ordertId)
    {
        $refundOrder = $this->dao->get($ordertId);
        return ExpressService::express($refundOrder->delivery_id, $refundOrder->delivery_name, $refundOrder->delivery_phone);
    }

然后重启一下swoole服务

被子你放开我 最后编辑于2022-09-05 22:27:34

快捷回复
回复({{post_count}}) {{!is_user ? '我的回复' :'全部回复'}}
回复从新到旧

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}

作者 管理员 企业

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest==1? '取消推荐': '推荐'}}
{{item.floor}}#
{{item.user_info.title}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
{{item.like_count}}
{{item.showReply ? '取消回复' : '回复'}}
删除
回复
回复

{{itemc.user_info.nickname}}

{{itemc.user_name}}

作者 管理员 企业

回复 {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}   {{itemc.ip_address}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回复' : '回复'}}
删除
回复
回复
查看更多
回复
回复
1884
{{like_count}}
{{collect_count}}
添加回复 ({{post_count}})

相关推荐

被子你放开我 管理员
学会提问:说明自己有哪些操作,什么情况下出现的具体问题表现,不行就放截图,别上来就是个什么什么不行怎么办~

回答

2490

发布

46

经验

33572

快速安全登录

使用微信扫码登录
{{item.label}} {{item.label}} {{item.label}} 板块推荐 常见问题 产品动态 精选推荐 首页头条 首页动态 首页推荐
加精
取 消 确 定
回复
回复
问题:
问题自动获取的帖子内容,不准确时需要手动修改. [获取答案]
答案:
提交
bug 需求 取 消 确 定

微信登录/注册

切换手机号登录

{{ bind_phone ? '绑定手机' : '手机登录'}}

{{codeText}}
切换微信登录/注册
暂不绑定
CRMEB客服

CRMEB咨询热线 咨询热线

400-8888-794

微信扫码咨询

CRMEB开源商城下载 开源下载 CRMEB官方论坛 帮助文档
返回顶部 返回顶部
CRMEB客服