[积分商城]PlayX每日推送数据
This commit is contained in:
61
app/admin/controller/mall/PlayxDailyPush.php
Normal file
61
app/admin/controller/mall/PlayxDailyPush.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller\mall;
|
||||||
|
|
||||||
|
use Throwable;
|
||||||
|
use app\common\controller\Backend;
|
||||||
|
use support\Response;
|
||||||
|
use Webman\Http\Request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PlayX 每日推送数据(后台列表)
|
||||||
|
*/
|
||||||
|
class PlayxDailyPush extends Backend
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var object|null
|
||||||
|
* @phpstan-var \app\common\model\MallPlayxDailyPush|null
|
||||||
|
*/
|
||||||
|
protected ?object $model = null;
|
||||||
|
|
||||||
|
protected array|string $preExcludeFields = ['id', 'create_time', 'update_time'];
|
||||||
|
|
||||||
|
protected string|array $quickSearchField = ['user_id', 'username', 'date'];
|
||||||
|
|
||||||
|
protected string|array $indexField = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'date',
|
||||||
|
'username',
|
||||||
|
'yesterday_win_loss_net',
|
||||||
|
'yesterday_total_deposit',
|
||||||
|
'lifetime_total_deposit',
|
||||||
|
'lifetime_total_withdraw',
|
||||||
|
'create_time',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function initialize(): void
|
||||||
|
{
|
||||||
|
parent::initialize();
|
||||||
|
$this->model = new \app\common\model\MallPlayxDailyPush();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看
|
||||||
|
* @throws Throwable
|
||||||
|
*/
|
||||||
|
public function index(Request $request): Response
|
||||||
|
{
|
||||||
|
$response = $this->initializeBackend($request);
|
||||||
|
if ($response !== null) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->get('select') || $request->post('select')) {
|
||||||
|
return $this->select($request);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->_index();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
23
app/common/model/MallPlayxDailyPush.php
Normal file
23
app/common/model/MallPlayxDailyPush.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace app\common\model;
|
||||||
|
|
||||||
|
use support\think\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PlayX 每日推送数据
|
||||||
|
*/
|
||||||
|
class MallPlayxDailyPush extends Model
|
||||||
|
{
|
||||||
|
protected string $name = 'mall_playx_daily_push';
|
||||||
|
|
||||||
|
protected array $type = [
|
||||||
|
'yesterday_win_loss_net' => 'float',
|
||||||
|
'yesterday_total_deposit' => 'float',
|
||||||
|
'lifetime_total_deposit' => 'float',
|
||||||
|
'lifetime_total_withdraw' => 'float',
|
||||||
|
'create_time' => 'integer',
|
||||||
|
];
|
||||||
|
}
|
||||||
12
web/src/lang/backend/en/mall/playxDailyPush.ts
Normal file
12
web/src/lang/backend/en/mall/playxDailyPush.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
export default {
|
||||||
|
id: 'id',
|
||||||
|
user_id: 'user_id',
|
||||||
|
date: 'date',
|
||||||
|
username: 'username',
|
||||||
|
yesterday_win_loss_net: 'yesterday_win_loss_net',
|
||||||
|
yesterday_total_deposit: 'yesterday_total_deposit',
|
||||||
|
lifetime_total_deposit: 'lifetime_total_deposit',
|
||||||
|
lifetime_total_withdraw: 'lifetime_total_withdraw',
|
||||||
|
create_time: 'create_time',
|
||||||
|
'quick Search Fields': 'id',
|
||||||
|
}
|
||||||
13
web/src/lang/backend/zh-cn/mall/playxDailyPush.ts
Normal file
13
web/src/lang/backend/zh-cn/mall/playxDailyPush.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
export default {
|
||||||
|
id: 'ID',
|
||||||
|
user_id: '用户ID',
|
||||||
|
date: '业务日期',
|
||||||
|
username: '用户名',
|
||||||
|
yesterday_win_loss_net: '昨日净输赢',
|
||||||
|
yesterday_total_deposit: '昨日总充值',
|
||||||
|
lifetime_total_deposit: '历史总充值',
|
||||||
|
lifetime_total_withdraw: '历史总提现',
|
||||||
|
create_time: '创建时间',
|
||||||
|
'quick Search Fields': 'ID',
|
||||||
|
}
|
||||||
|
|
||||||
65
web/src/views/backend/mall/playxDailyPush/index.vue
Normal file
65
web/src/views/backend/mall/playxDailyPush/index.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main ba-table-box">
|
||||||
|
<el-alert class="ba-table-alert" v-if="baTable.table.remark" :title="baTable.table.remark" type="info" show-icon />
|
||||||
|
|
||||||
|
<TableHeader
|
||||||
|
:buttons="['refresh', 'comSearch', 'quickSearch', 'columnDisplay']"
|
||||||
|
:quick-search-placeholder="t('Quick search placeholder', { fields: t('mall.playxDailyPush.quick Search Fields') })"
|
||||||
|
></TableHeader>
|
||||||
|
|
||||||
|
<Table ref="tableRef"></Table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, provide, useTemplateRef } from 'vue'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { baTableApi } from '/@/api/common'
|
||||||
|
import TableHeader from '/@/components/table/header/index.vue'
|
||||||
|
import Table from '/@/components/table/index.vue'
|
||||||
|
import baTableClass from '/@/utils/baTable'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'mall/playxDailyPush',
|
||||||
|
})
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
const tableRef = useTemplateRef('tableRef')
|
||||||
|
|
||||||
|
const baTable = new baTableClass(
|
||||||
|
new baTableApi('/admin/mall.PlayxDailyPush/'),
|
||||||
|
{
|
||||||
|
pk: 'id',
|
||||||
|
column: [
|
||||||
|
{ type: 'selection', align: 'center', operator: false },
|
||||||
|
{ label: t('mall.playxDailyPush.id'), prop: 'id', align: 'center', width: 70, operator: 'RANGE', sortable: 'custom' },
|
||||||
|
{ label: t('mall.playxDailyPush.user_id'), prop: 'user_id', align: 'center', operatorPlaceholder: t('Fuzzy query'), sortable: false, operator: 'LIKE' },
|
||||||
|
{ label: t('mall.playxDailyPush.date'), prop: 'date', align: 'center', render: 'date', operator: 'RANGE', comSearchRender: 'date', sortable: 'custom', width: 120, operatorPlaceholder: t('Fuzzy query') },
|
||||||
|
{ label: t('mall.playxDailyPush.username'), prop: 'username', align: 'center', operatorPlaceholder: t('Fuzzy query'), sortable: false, operator: 'LIKE' },
|
||||||
|
{ label: t('mall.playxDailyPush.yesterday_win_loss_net'), prop: 'yesterday_win_loss_net', align: 'center', operator: 'RANGE', sortable: false },
|
||||||
|
{ label: t('mall.playxDailyPush.yesterday_total_deposit'), prop: 'yesterday_total_deposit', align: 'center', operator: 'RANGE', sortable: false },
|
||||||
|
{ label: t('mall.playxDailyPush.lifetime_total_deposit'), prop: 'lifetime_total_deposit', align: 'center', operator: 'RANGE', sortable: false },
|
||||||
|
{ label: t('mall.playxDailyPush.lifetime_total_withdraw'), prop: 'lifetime_total_withdraw', align: 'center', operator: 'RANGE', sortable: false },
|
||||||
|
{ label: t('mall.playxDailyPush.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', sortable: 'custom', width: 160, timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||||
|
],
|
||||||
|
dblClickNotEditColumn: [undefined],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
defaultItems: {},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
provide('baTable', baTable)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
baTable.table.ref = tableRef.value
|
||||||
|
baTable.mount()
|
||||||
|
baTable.getData()?.then(() => {
|
||||||
|
baTable.initSort()
|
||||||
|
baTable.dragSort()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
Reference in New Issue
Block a user