|
@@ -9,6 +9,7 @@
|
|
|
|
|
|
namespace app\admin\service\card;
|
|
namespace app\admin\service\card;
|
|
|
|
|
|
|
|
+use app\admin\service\sys_manage\CategoryService;
|
|
use app\model\CardBatch;
|
|
use app\model\CardBatch;
|
|
use support\Db;
|
|
use support\Db;
|
|
use support\exception\BusinessException;
|
|
use support\exception\BusinessException;
|
|
@@ -180,7 +181,12 @@ class CardService
|
|
})
|
|
})
|
|
->count();
|
|
->count();
|
|
if (!empty($rows)) {
|
|
if (!empty($rows)) {
|
|
|
|
+ // 查询所有分类信息
|
|
|
|
+ $category = array_column($rows, 'join_card_category_id');
|
|
|
|
+ $categoryInfos = CategoryService::getCategoryInfos($category) ?? [];
|
|
|
|
+ $categoryInfos && $categoryInfos = array_column($categoryInfos, null, 'category_id');
|
|
foreach ($rows as $key => &$value) {
|
|
foreach ($rows as $key => &$value) {
|
|
|
|
+ $value['category_name'] = $categoryInfos[$value['join_card_category_id']]['category_name'] ?? "";
|
|
$value['card_status_value'] = Card::CARD_STATUS[$value['card_status']];
|
|
$value['card_status_value'] = Card::CARD_STATUS[$value['card_status']];
|
|
!empty($value['card_json']) && $value['card_json'] = json_decode($value['card_json'], true);
|
|
!empty($value['card_json']) && $value['card_json'] = json_decode($value['card_json'], true);
|
|
!empty($value['card_assign_json']) && $value['card_assign_json'] = json_decode($value['card_assign_json'], true);
|
|
!empty($value['card_assign_json']) && $value['card_assign_json'] = json_decode($value['card_assign_json'], true);
|