添加订单编号

main
home.fengxinyhyl 6 months ago
parent 524bd10efb
commit 30bbc98dd2
  1. 7
      app/common/repositories/user/UserAssetsLogRepository.php
  2. 1
      view/admin/src/views/marketing/assets/index.vue

@ -16,6 +16,7 @@ namespace app\common\repositories\user;
use app\common\dao\user\UserAssetsLogDao;
use app\common\repositories\BaseRepository;
use app\common\repositories\store\order\StoreOrderBaseRepository;
use app\common\repositories\store\order\StoreOrderRepository;
use app\common\repositories\store\product\ProductAssistRepository;
use app\common\repositories\store\product\ProductRepository;
use app\common\repositories\system\groupData\GroupDataRepository;
@ -761,6 +762,7 @@ class UserAssetsLogRepository extends BaseRepository
$changeType = $this->getChangeType();
$assetsType = $this->getAssetType();
$userRepository = app(UserRepository::class);
$orderRepository = app(StoreOrderRepository::class);
foreach ($data as $item) {
$item['type'] = $changeType[$item['type']] ?? '未知';
$item['asset_type'] = $assetsType[$item['asset_type']] ?? '未知';
@ -778,6 +780,11 @@ class UserAssetsLogRepository extends BaseRepository
$item['user_nickname'] = '平台';
$item['user_phone'] = '未知';
}
$item['order_sn'] = '';
if($item['order_id']){
$order = $orderRepository->getDetail($item['order_id']);
$item['order_sn'] = $order['order_sn'];
}
$list[] = $item;
}
return compact('count', 'list');

@ -74,6 +74,7 @@
<el-table-column label="用户昵称" prop="user_nickname" min-width="120"/>
<el-table-column label="手机" prop="user_phone" min-width="120"/>
<el-table-column label="货币类型" prop="asset_type" min-width="120"/>
<el-table-column label="订单编号" prop="order_sn" min-width="120"/>
<el-table-column label="分值来源" prop="type" min-width="120"/>
<el-table-column label="变动情况" prop="count" min-width="120"/>
<el-table-column label="变动时间" prop="create_time" min-width="120" />

Loading…
Cancel
Save