[积分商城]兑换订单-优化

This commit is contained in:
2026-03-19 16:29:52 +08:00
parent 20d89089ca
commit f3d65280e7
3 changed files with 11 additions and 2 deletions

View File

@@ -52,7 +52,9 @@ class RedemptionOrder extends Backend
*/ */
list($where, $alias, $limit, $order) = $this->queryBuilder(); list($where, $alias, $limit, $order) = $this->queryBuilder();
$res = $this->model $res = $this->model
->withJoin($this->withJoinTable, $this->withJoinType) ->with(['mallUser' => function ($query) {
$query->field('id,username');
}])
->visible(['mallUser' => ['username'], 'mallItem' => ['title']]) ->visible(['mallUser' => ['username'], 'mallItem' => ['title']])
->alias($alias) ->alias($alias)
->where($where) ->where($where)

View File

@@ -2,6 +2,7 @@
namespace app\common\model; namespace app\common\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model; use support\think\Model;
/** /**
@@ -9,6 +10,8 @@ use support\think\Model;
*/ */
class MallRedemptionOrder extends Model class MallRedemptionOrder extends Model
{ {
use TimestampInteger;
// 表名 // 表名
protected $name = 'mall_redemption_order'; protected $name = 'mall_redemption_order';

View File

@@ -59,6 +59,7 @@ const baTable = new baTableClass(
label: t('mall.redemptionOrder.malluser__username'), label: t('mall.redemptionOrder.malluser__username'),
prop: 'mallUser.username', prop: 'mallUser.username',
align: 'center', align: 'center',
minWidth: 120,
operatorPlaceholder: t('Fuzzy query'), operatorPlaceholder: t('Fuzzy query'),
render: 'tags', render: 'tags',
operator: 'LIKE', operator: 'LIKE',
@@ -68,9 +69,10 @@ const baTable = new baTableClass(
label: t('mall.redemptionOrder.status'), label: t('mall.redemptionOrder.status'),
prop: 'status', prop: 'status',
align: 'center', align: 'center',
custom: { 0: 'info', 1: 'primary' },
operator: 'eq', operator: 'eq',
sortable: false, sortable: false,
render: 'switch', render: 'tag',
replaceValue: { '0': t('mall.redemptionOrder.status 0'), '1': t('mall.redemptionOrder.status 1') }, replaceValue: { '0': t('mall.redemptionOrder.status 0'), '1': t('mall.redemptionOrder.status 1') },
}, },
{ {
@@ -102,6 +104,8 @@ const baTable = new baTableClass(
label: t('mall.redemptionOrder.type'), label: t('mall.redemptionOrder.type'),
prop: 'type', prop: 'type',
align: 'center', align: 'center',
effect: 'dark',
custom: { 1: 'success', 2: 'primary', 3: 'info' },
operator: 'eq', operator: 'eq',
sortable: false, sortable: false,
render: 'tag', render: 'tag',