Skip to content

Commit

Permalink
feat: 处理导出的内容的数值格式
Browse files Browse the repository at this point in the history
  • Loading branch information
linkunyuan committed Nov 22, 2024
1 parent 7f7e6ce commit 7721e14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Common/Classes/XlsWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function ouputFileByCursor(string $file, array $header, $data, $rowCall =
$row = [];
// 因为data只能是索引数组,所以这里按顺序十分重要
foreach ($thKeys as $col) {
$row[] = $value[$col] ?? '';
$row[] = isset($value[$col]) ? (is_numeric($value[$col]) ? floatval($value[$col]) : $value[$col]) : '';
}

$row && $newarr[] = $row;
Expand Down
2 changes: 1 addition & 1 deletion src/HttpController/BaseControllerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ protected function actionNotFound(?string $action)
* 接口限流,redis计数
* @param Redis $redis
* @param string $cfgKey
* @param $input
* @param array $input
* @param bool $isWhite 是否白名单,白名单不受限制
* @return \Closure
* @throws HttpParamException
Expand Down

0 comments on commit 7721e14

Please sign in to comment.