|
@@ -627,10 +627,15 @@ class OrderImport extends Base
|
|
|
|
|
|
$platform_id = $this->request->post('platform_id/d', 0, 'trim');
|
|
|
|
|
|
+ $where=['ps.is_del'=>0];
|
|
|
+ if($platform_id !=0) $where['ps.platform_id']=$platform_id;
|
|
|
+
|
|
|
$list = Db::name('platform_source')
|
|
|
- ->field('id,platform_id,source')
|
|
|
- ->where(['is_del' => 0, 'platform_id' => $platform_id])
|
|
|
- ->order('id', 'desc')
|
|
|
+ ->alias('ps')
|
|
|
+ ->field('ps.id,ps.platform_id,ps.source,p.platform_name')
|
|
|
+ ->leftJoin('platform p','p.id=ps.platform_id AND p.is_del=0')
|
|
|
+ ->where($where)
|
|
|
+ ->order('ps.id', 'desc')
|
|
|
->select()
|
|
|
->toArray();
|
|
|
|