feat(wip): 세력장수/암행부 컬럼 모두 등록 완료
This commit is contained in:
@@ -147,7 +147,7 @@ class GeneralList extends \sammo\BaseAPI
|
||||
|
||||
[$queryColumns, $rankColumns] = General::mergeQueryColumn(array_keys(static::$viewColumns), 1);
|
||||
|
||||
$rawGeneralList = Util::convertArrayToDict($db->query('SELECT %l from general WHERE nation = %i', Util::formatListOfBackticks($queryColumns), $nationID), 'no');
|
||||
$rawGeneralList = Util::convertArrayToDict($db->query('SELECT %l from general WHERE nation = %i ORDER BY turntime ASC', Util::formatListOfBackticks($queryColumns), $nationID), 'no');
|
||||
|
||||
$reservedCommand = [];
|
||||
if ($this->permission >= 2) {
|
||||
@@ -200,7 +200,6 @@ class GeneralList extends \sammo\BaseAPI
|
||||
|
||||
$getRankVar = fn ($key) => (fn ($rawGeneral) => (($rankList[$rawGeneral['no']] ?? [])[$key] ?? 0));
|
||||
|
||||
|
||||
$specialViewFilter = [
|
||||
'officerLevel' => fn ($rawGeneral) => $this->getOfficerLevel($rawGeneral),
|
||||
'officerLevelText' => fn ($rawGeneral) => getOfficerLevelText($this->getOfficerLevel($rawGeneral), $nationArr['level']),
|
||||
@@ -262,11 +261,20 @@ class GeneralList extends \sammo\BaseAPI
|
||||
$generalList[] = $item;
|
||||
}
|
||||
|
||||
if($this->permission >= 2){
|
||||
$troops = $db->queryAllLists('SELECT troop_leader,name FROM troop WHERE nation = %i', $nationID);
|
||||
}
|
||||
else{
|
||||
$troops = null;
|
||||
}
|
||||
|
||||
|
||||
$result = [
|
||||
'result' => true,
|
||||
'permission' => $this->permission,
|
||||
'column' => array_keys($resultColumns),
|
||||
'list' => $generalList,
|
||||
'troops' => $troops,
|
||||
'env' => $env,
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user