wjx 1 rok temu
rodzic
commit
cb2ac5f67a

+ 6 - 0
config/routerConfig.ts

@@ -164,6 +164,12 @@ const gameDataStatistics = {
                     name: '游戏策略配置',
                     access: 'strategy',
                     component: './gameDataStatistics/roleOperate/strategy',
+                },
+                {
+                    path: '/gameDataStatistics/roleOperate/msgPush',
+                    name: '游戏内消息推送',
+                    access: 'msgPush',
+                    component: './gameDataStatistics/roleOperate/msgPush',
                 }
             ]
         },

+ 49 - 2
src/components/QueryForm/index.tsx

@@ -1,4 +1,4 @@
-import { Button, Checkbox, Col, DatePicker, Form, Input, InputNumber, Radio, Row, Select, Space } from "antd"
+import { Button, Checkbox, Col, DatePicker, Form, Input, InputNumber, Radio, Row, Select, Space, Tooltip } from "antd"
 import React, { useEffect, useState } from "react"
 import moment from "moment"
 import { useAjax } from "@/Hook/useAjax"
@@ -8,6 +8,7 @@ import { ADSTATUSEnum as ADSTTTATUSEnum } from "@/pages/gameDataStatistics/adlis
 import { ADSTATUSEnum } from "@/pages/gameDataStatistics/adlist/tencentMonitor/const"
 import IntervalTime from "./intervalTime"
 import { RangePickerProps } from "antd/lib/date-picker"
+import { QuestionCircleOutlined } from "@ant-design/icons"
 
 
 interface Props {
@@ -240,6 +241,10 @@ interface Props {
     isUserLastRegAgentId?: boolean
     /** 是否开启 玩家最新染色归因投手 搜索 */
     isUserLastPitcherId?: boolean
+    /** 是否开启 创角24小时内单笔充值金额 搜索 */
+    isRechargeAmountWithin24h?: boolean
+    /** 是否开启 创角24小时以内累计充值金额 搜索 */
+    isRechargeTotalAmountWithin24h?: boolean
 }
 /**
  * 游戏数据系统 请求参数
@@ -254,7 +259,7 @@ const QueryForm: React.FC<Props> = (props) => {
         isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isSysUserIds, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType, isAdTTStatus, isUserEnterType, isServerName, isServerId, isServerDay, isAdTXStatus,
         payTimeDay, placeAnOrderDay, isPayIntervalTime, isActiveTypes, isNickname, isMobile, isRegIp, isIsAuth, isIsBindMobile, isIsRecharge, isUserStatus, isCreateRole, isRoleCount, isVipLevel, isCreateRoleDay, isIsChange, isIsSendMail, isWeChatCompany, isWeChat,
         isCustomerServerId, isOperatorId, isGsId, isServerIds, isRankingNum, isIsMergeServer, isSuperParentGameId, isGameServerName, isIp, isDeviceType, isLoginType, isServerIdUn, isSourceServerName, isProjectId1, isRemoveGame, isRemoveGameForSystem, isOrderLy, isAddCorpWechat,
-        isWakeUp, isBackStatus, isGameDimension, isUserLastRegTime, isUserLastRegAgentId, isUserLastPitcherId
+        isWakeUp, isBackStatus, isGameDimension, isUserLastRegTime, isUserLastRegAgentId, isUserLastPitcherId, isRechargeAmountWithin24h, isRechargeTotalAmountWithin24h
     } = props
     const [form] = Form.useForm()
     const parentId = Form.useWatch('parentId', form)
@@ -1603,6 +1608,48 @@ const QueryForm: React.FC<Props> = (props) => {
             {isRoleCount && <Col><Form.Item name='roleCount'>
                 <IntervalTime {...isRoleCount} />
             </Form.Item></Col>}
+            
+            {/* 创角24小时内单笔充值金额 */}
+            {isRechargeAmountWithin24h && <Col><Form.Item name='roleCount'>
+                <Space size={0}>
+                    <Form.Item name={'rechargeAmountWithin24h'} noStyle>
+                        <Input placeholder="创角24小时内单笔充值金额" allowClear/>
+                    </Form.Item>
+                    <Form.Item name={'rechargeAmountWithin24hUnit'} noStyle>
+                        <Select placeholder="条件" style={{ width: 70 }} allowClear>
+                            <Select.Option value=">=">{`>=`}</Select.Option>
+                            <Select.Option value="<=">{`<=`}</Select.Option>
+                            <Select.Option value="=">{`=`}</Select.Option>
+                            <Select.Option value=">">{`>`}</Select.Option>
+                            <Select.Option value="<">{`<`}</Select.Option>
+                        </Select>
+                    </Form.Item>
+                    <Tooltip title={'创角24小时内单笔充值金额,条件默认">="'}>
+                        <QuestionCircleOutlined style={{ marginLeft: 10 }} />
+                    </Tooltip>
+                </Space>
+            </Form.Item></Col>}
+
+            {/* 创角24小时以内累计充值金额 */}
+            {isRechargeTotalAmountWithin24h && <Col><Form.Item name='roleCount'>
+                <Space size={0}>
+                    <Form.Item name={'rechargeTotalAmountWithin24h'} noStyle>
+                        <Input placeholder="创角24小时以内累计充值金额" allowClear/>
+                    </Form.Item>
+                    <Form.Item name={'rechargeTotalAmountWithin24hUnit '} noStyle>
+                        <Select placeholder="条件" style={{ width: 70 }} allowClear>
+                            <Select.Option value=">=">{`>=`}</Select.Option>
+                            <Select.Option value="<=">{`<=`}</Select.Option>
+                            <Select.Option value="=">{`=`}</Select.Option>
+                            <Select.Option value=">">{`>`}</Select.Option>
+                            <Select.Option value="<">{`<`}</Select.Option>
+                        </Select>
+                    </Form.Item>
+                    <Tooltip title={'创角24小时以内累计充值金额,条件默认">="'}>
+                        <QuestionCircleOutlined style={{ marginLeft: 10 }} />
+                    </Tooltip>
+                </Space>
+            </Form.Item></Col>}
 
             <Col>
                 <Space>

+ 99 - 0
src/pages/gameDataStatistics/roleOperate/msgPush/index.tsx

@@ -0,0 +1,99 @@
+import { Button, Card, Col, Form, Input, Row, Select, Space } from "antd"
+import React, { useState } from "react"
+import style from '../../components/TableData/index.less'
+import { PlusOutlined } from "@ant-design/icons"
+import Tables from "@/components/Tables"
+import columnsPos from "./tableConfig"
+
+/**
+ * 游戏内消息推送
+ * @returns 
+ */
+const MsgPush: React.FC = () => {
+
+    /**************************/
+    const [initialValues, setInitialValues] = useState<any>({})
+    const [queryFrom, setQueryForm] = useState<any>({ pageNum: 1, pageSize: 20 })
+    const [visible, setVisible] = useState<boolean>(false)
+    const [form] = Form.useForm()
+    /**************************/
+
+    const onFinish = (data: any) => {
+        let oldQueryFrom = JSON.parse(JSON.stringify(queryFrom))
+        setQueryForm({ ...oldQueryFrom, ...data, pageNum: 1 })
+    }
+
+    return <Card
+        style={{ borderRadius: 8 }}
+        headStyle={{ textAlign: 'left' }}
+        bodyStyle={{ padding: '5px 10px' }}
+    >
+        <div style={{ textAlign: 'center', fontWeight: 'bold', padding: '4px 6px 6px', fontSize: 16, marginBottom: 4, position: 'relative' }}>
+            游戏内消息推送
+        </div>
+
+        <Space style={{ width: '100%' }} direction="vertical" size={10}>
+            <Form layout="inline" className='queryForm' initialValues={initialValues} name="basicGameVip" form={form} onFinish={onFinish}>
+                <Row gutter={[0, 6]}>
+                    <Col><Form.Item name='superGameId'>
+                        <Select
+                            maxTagCount={1}
+                            showSearch
+                            style={{ minWidth: 140 }}
+                            allowClear
+                            placeholder={'请选择超父游戏'}
+                            filterOption={(input, option) =>
+                                (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                            }
+                        >
+                            <Select.Option value={'1'}>a</Select.Option>
+                        </Select>
+                    </Form.Item></Col>
+                    <Col><Form.Item name='type'>
+                        <Input placeholder="清输入" />
+                    </Form.Item></Col>
+                    <Col>
+                        <Space>
+                            <Button type="primary" htmlType="submit">搜索</Button>
+                            <Button onClick={() => form.resetFields()}>重置</Button>
+                            <Button icon={<PlusOutlined />} type="primary" onClick={() => { setVisible(true); setInitialValues({}) }}>新增游戏内推送</Button>
+                        </Space>
+                    </Col>
+                </Row>
+            </Form>
+
+            <div className={`${style['small']}`}>
+                <Tables
+                    className={`all_table content_table_body`}
+                    bordered
+                    sortDirections={['ascend', 'descend', null]}
+                    current={queryFrom.pageNum}
+                    pageSize={queryFrom.pageSize}
+                    columns={columnsPos()}
+                    dataSource={[]}
+                    scroll={{ x: 1000, y: 600 }}
+                    onChange={(pagination: any, filters: any, sortData: any) => {
+                        let { current, pageSize } = pagination
+                        let newQueryForm = JSON.parse(JSON.stringify(queryFrom))
+                        if (sortData && sortData?.order) {
+                            newQueryForm['sortType'] = sortData?.order === 'ascend' ? 'asc' : 'desc'
+                            newQueryForm['sortFiled'] = sortData?.field
+                        } else {
+                            delete newQueryForm['sortType']
+                            delete newQueryForm['sortFiled']
+                        }
+                        newQueryForm.pageNum = current
+                        newQueryForm.pageSize = pageSize
+                        setQueryForm({ ...newQueryForm })
+                    }}
+                    size="small"
+                    total={0}
+                    loading={false}
+                    defaultPageSize={20}
+                />
+            </div>
+        </Space>
+    </Card>
+}
+
+export default MsgPush

+ 28 - 0
src/pages/gameDataStatistics/roleOperate/msgPush/msgPushModal.tsx

@@ -0,0 +1,28 @@
+import { Modal } from "antd"
+import React from "react"
+
+
+interface Props {
+    visible?: boolean
+    onClose?: () => void
+    onChange?: () => void
+}
+
+/**
+ * 新建游戏内消息推送
+ * @param param0 
+ * @returns 
+ */
+const MsgPushModal: React.FC<Props> = ({  }) => {
+
+
+
+    return <Modal
+        title='新建游戏内消息推送'
+
+    >
+
+    </Modal>
+}
+
+export default React.memo(MsgPushModal)

+ 111 - 0
src/pages/gameDataStatistics/roleOperate/msgPush/tableConfig.tsx

@@ -0,0 +1,111 @@
+
+
+import { Row, Col, Popconfirm, Tag } from "antd"
+import { DeleteOutlined, EditOutlined } from "@ant-design/icons"
+import WidthEllipsis from "@/components/widthEllipsis"
+import React from "react"
+
+function columnsPos(editPack?: (data: any) => void, del?: (id: number) => void) {
+
+    let newArr: any = [
+        {
+            title: '角色',
+            dataIndex: 'superGameId',
+            key: 'superGameId',
+            align: 'center',
+            width: 60
+        },
+        {
+            title: '游戏区服',
+            dataIndex: 'superGameName',
+            key: 'superGameName',
+            align: 'center',
+            width: 90,
+            render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+        },
+        {
+            title: '子游戏',
+            dataIndex: 'type',
+            key: 'type',
+            align: 'center',
+            width: 100,
+            render: (a: number, b: any) => {
+                return { 1: <Tag color="#f50">追踪玩家</Tag>, 2: <Tag color="#2db7f5">玩家流失</Tag>, 3: <Tag color="#87d068">新用户追踪</Tag> }[a]
+            }
+        },
+        {
+            title: '角色相关数据',
+            dataIndex: 'configExplain',
+            key: 'configExplain',
+            width: 150,
+            render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+        },
+        {
+            title: '最新推送消息',
+            dataIndex: 'userNameStr',
+            key: 'userNameStr',
+            align: 'center',
+            width: 110,
+            render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+        },
+        {
+            title: '创建人',
+            dataIndex: 'createName',
+            key: 'createName',
+            align: 'center',
+            width: 80,
+            render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+        },
+        {
+            title: '创建时间',
+            dataIndex: 'createTime',
+            key: 'createTime',
+            align: 'center',
+            width: 135,
+            render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+        },
+        {
+            title: '更新人',
+            dataIndex: 'updateName',
+            key: 'updateName',
+            align: 'center',
+            width: 80,
+            render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+        },
+        {
+            title: '更新时间',
+            dataIndex: 'updateTime',
+            key: 'updateTime',
+            align: 'center',
+            width: 135,
+            render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+        },
+        {
+            title: '操作',
+            dataIndex: 'cz',
+            key: 'cz',
+            align: 'center',
+            width: 100,
+            fixed: 'right',
+            render: (a: string, b: any) => (
+                <Row justify='center' gutter={[10, 0]}>
+                    <Col><a style={{ fontSize: "12px" }} onClick={() => { editPack?.(b) }}><EditOutlined /> 修改</a></Col>
+                    <Col>
+                        <Popconfirm
+                            title="确定删除?"
+                            onConfirm={() => { del?.(b.id) }}
+                            okText="是"
+                            cancelText="否"
+                        >
+                            <a style={{ fontSize: "12px", color: 'red' }}><DeleteOutlined /> 删除</a>
+                        </Popconfirm>
+                    </Col>
+                </Row>
+            )
+        }
+    ]
+    return newArr
+}
+
+
+export default columnsPos

+ 2 - 0
src/pages/gameDataStatistics/roleOperate/roleRechargeRanking/index.tsx

@@ -149,6 +149,8 @@ const RoleRechargeRanking: React.FC = () => {
                 isAddCorpWechat
                 isWakeUp
                 isOs
+                isRechargeAmountWithin24h
+                isRechargeTotalAmountWithin24h
             />}
             scroll={{ x: 1000, y: 600 }}
             isVirtually={false}

+ 2 - 0
src/pages/gameDataStatistics/roleOperate/roleRechargeRanking/tableConfig.tsx

@@ -132,6 +132,8 @@ function columns12(
                 },
                 { title: '角色平均单价', dataIndex: 'avg_amount', label: '角色充值信息', align: 'center', width: 70, default: 13, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '角色累计充值次数', dataIndex: 'amount_count', label: '角色充值信息', align: 'center', width: 70, default: 14, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '24小时内单笔充值金额', dataIndex: 'max_amount', label: '角色充值信息', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '24小时内累计充值总金额', dataIndex: 'role_total_amount', label: '角色充值信息', align: 'center', width: 85, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '角色最近充值时间', dataIndex: 'role_last_pay_time', label: '角色充值信息', align: 'center', width: 140, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 { title: '角色最近活跃时间', dataIndex: 'role_active_time', label: '角色充值信息', align: 'center', width: 140, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
                 {