|
|
@@ -315,7 +315,7 @@ class BaseLogic
|
|
|
* @param $fields
|
|
|
* @return mixed
|
|
|
*/
|
|
|
- public function trandformListColumn($data, $fields=['site', 'agent', 'game', 'auth', 'media', 'pay_channel', 'game_pay_channel', 'ip']){
|
|
|
+ public function trandformListColumn($data, $fields=['site', 'agent', 'game', 'auth', 'author', 'media', 'pay_channel', 'game_pay_channel', 'ip']){
|
|
|
|
|
|
if(in_array('site', $fields)){
|
|
|
$agentSiteList = Db::connect('db_advert')->table('agent_site')->field('id,name')->select()->toArray();
|
|
|
@@ -337,6 +337,10 @@ class BaseLogic
|
|
|
$authList = array_column($authList, 'username', 'id');
|
|
|
|
|
|
}
|
|
|
+ if(in_array('author', $fields)){
|
|
|
+ $authorList = Db::connect('db_system')->table('sa_system_user')->field('id,username')->select()->toArray();
|
|
|
+ $authorList = array_column($authorList, 'username', 'id');
|
|
|
+ }
|
|
|
if(in_array('media', $fields)){
|
|
|
$mediaList = Db::connect('db_advert')->table('media_list')->field('id,name')->select()->toArray();
|
|
|
$mediaList = array_column($mediaList, 'name', 'id');
|
|
|
@@ -373,6 +377,10 @@ class BaseLogic
|
|
|
$data[$key]['auth_name'] = $authList[$value['auth_id']] ?? '';
|
|
|
}
|
|
|
|
|
|
+ if(!empty($authorList) ){
|
|
|
+ $data[$key]['author_name'] = $authorList[$value['author_id']] ?? '';
|
|
|
+ }
|
|
|
+
|
|
|
if(!empty($mediaList) ){
|
|
|
$data[$key]['media_name'] = $mediaList[$value['media_id']] ?? '';
|
|
|
}
|