|
@@ -6,6 +6,7 @@
|
|
|
|
|
|
namespace app\admin\model\many;
|
|
namespace app\admin\model\many;
|
|
|
|
|
|
|
|
+use app\admin\model\user\UserAddress;
|
|
use crmeb\services\PHPExcelService;
|
|
use crmeb\services\PHPExcelService;
|
|
use crmeb\traits\ModelTrait;
|
|
use crmeb\traits\ModelTrait;
|
|
use crmeb\basic\BaseModel;
|
|
use crmeb\basic\BaseModel;
|
|
@@ -37,7 +38,7 @@ class ManyOrder extends BaseModel
|
|
public static function list($where)
|
|
public static function list($where)
|
|
{
|
|
{
|
|
$model = self::alias('a')
|
|
$model = self::alias('a')
|
|
- ->field('a.*,b.name,u.nickname')
|
|
|
|
|
|
+ ->field('a.*,b.name,u.nickname,u.phone')
|
|
->order('a.id DESC')
|
|
->order('a.id DESC')
|
|
->leftJoin('many b', 'b.id = a.many_id')
|
|
->leftJoin('many b', 'b.id = a.many_id')
|
|
->leftJoin('user u', 'u.uid = a.uid');
|
|
->leftJoin('user u', 'u.uid = a.uid');
|
|
@@ -74,6 +75,7 @@ class ManyOrder extends BaseModel
|
|
$list = $model->select()->toArray();
|
|
$list = $model->select()->toArray();
|
|
foreach ($list as &$item)
|
|
foreach ($list as &$item)
|
|
{
|
|
{
|
|
|
|
+ $item['real_name'] = UserAddress::where('uid', $item['uid'])->value('real_name');
|
|
if ($item['return_time'] > 0){
|
|
if ($item['return_time'] > 0){
|
|
$item['return_time'] = date('Y-m-d H:i:s', $item['return_time']);
|
|
$item['return_time'] = date('Y-m-d H:i:s', $item['return_time']);
|
|
}
|
|
}
|