作者 何书鹏
1 个管道 的构建 通过 耗费 0 秒

bug修改

... ... @@ -2,6 +2,8 @@
namespace app\admin\controller\order;
use app\api\controller\PrivateNumber;
use app\api\model\PrivateNumber as PrivateNumberModel;
use app\common\controller\Backend;
use app\common\controller\Wechat;
use app\admin\model\Third;
... ... @@ -180,7 +182,19 @@ class Dispute extends Backend
(new Wechat)->tmplmsg($openid,$send_data,$templateid,$url);
// 解绑隐私通话
\app\api\controller\Order::unbindPrivateNumber($order['id']);
$has_number = PrivateNumberModel::get(['order_id'=>$row['order_id']]);
if($has_number){
$count = PrivateNumberModel::alias('a')
->join('order b','a.order_id = b.id')
->where('a.subscription_id',$has_number['subscription_id'])
->where('b.status','in','2,3,5')
->count();
if($count > 1){
$has_number->delete();
}else{
(new PrivateNumber)->unbind($has_number['subscription_id']);
}
}
// 修改数据
$result = $row->allowField(true)->save($params);
... ...