123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633 |
- import { request } from 'umi';
- import { api } from '../api';
- import { Paging, SortProps } from './rankingList';
- let wapi = api + '/gameData'
- export interface RoleRechargeRankingProps extends Paging, SortProps {
- createRoleBeginDate?: string, // 角色创建时间(开始)
- createRoleEndDate?: string,
- rechargeBeginDate?: string, // 充值开始时间
- rechargeEndDate?: string,
- customerServerId?: number, // 客服ID
- operatorId?: number // 运营ID
- gsId?: number // GS_ID
- serverIds?: number[] // 区服ID(列表)
- gameId?: number, // 子游戏ID
- parentGameId?: number, // 父游戏ID
- isChange?: number, // 是否转端: 1 -> 转端 ; 0 -> 不转端
- isSendMail?: number // 邮件是否发送: 1 -> 发送 ; 0 -> 不发送
- phone?: number // 客户手机号
- pitcherId?: number // 投手ID
- roleName?: string, // 角色名
- roleId?: string, // 角色ID
- vipLevel?: number // 角色VIP等级
- weChat?: string, // 客户微信号
- weChatCompany?: string, // 企业微信号
- }
- /**
- * 角色充值排行榜
- * @param data
- * @returns
- */
- export async function getRoleRechargeRankingListApi(data: RoleRechargeRankingProps) {
- return request(wapi + `/role/rechargeRanking`, {
- method: 'POST',
- data
- });
- }
- /**
- * 礼包记录新增或者更新
- * @param data
- * @returns
- */
- export async function addOrUpdateGiftApi(data: { giftId: number, ids?: number[], roleInfoList: any[], sendTime: string }) {
- return request(api + `/manage/role/gift/record/add/or/update`, {
- method: 'POST',
- data
- });
- }
- /**
- * 删除礼包记录
- * @param ids
- * @returns
- */
- export async function delSendGiftLogApi(ids: string) {
- return request(api + `/manage/role/gift/record/delete/${ids}`, {
- method: 'DELETE'
- });
- }
- export interface getSendGiftLogProps extends Paging {
- startDateTime?: string,
- endDateTime?: string,
- giftName?: string,
- gameId?: number,
- roleId?: number,
- serverId?: number
- userId?: number
- }
- /**
- * 发送礼包记录接口
- * @param data
- * @returns
- */
- export async function getSendGiftLogListApi(data: getSendGiftLogProps) {
- return request(api + `/manage/role/gift/record/list`, {
- method: 'POST',
- data
- });
- }
- export interface getSendEmailLogProps extends Paging {
- startDateTime?: string,
- endDateTime?: string,
- gameId?: number,
- roleId?: number,
- serverId?: number
- userId?: number
- }
- /**
- * 发送邮件记录接口
- * @param data
- * @returns
- */
- export async function getSendEmailListApi(data: getSendEmailLogProps) {
- return request(api + `/manage/role/mail/record/list`, {
- method: 'POST',
- data
- });
- }
- /**
- * 删除邮件记录
- * @param ids
- * @returns
- */
- export async function delSendEmailLogApi(ids: string) {
- return request(api + `/manage/role/mail/record/delete/${ids}`, {
- method: 'DELETE'
- });
- }
- /**
- * 邮件记录新增或者更新
- * @param data
- * @returns
- */
- export async function addOrUpdateEmailApi(data: { ids?: number[], roleInfoList: any[], sendTime: string }) {
- return request(api + `/manage/role/mail/record/add/or/update`, {
- method: 'POST',
- data
- });
- }
- export interface modifyRoleProps {
- addCorpUserId?: string // 企微号
- isAddCorpWechat?: string
- isChangeGameType?: string
- isRemoveGame?: string
- isWakeUp?: string
- putUserId?: number
- remark?: string
- roleInfoList?: any
- userPhone?: string
- userWechat?: string
- }
- /**
- * 角色信息管理
- * @param data
- * @returns
- */
- export async function modifyRoleDataApi(data: modifyRoleProps) {
- return request(api + `/manage/role/operate/modify`, {
- method: 'POST',
- data
- });
- }
- export interface AssignUserProps {
- startTime: string,
- customerServiceId?: number,
- gsId?: number,
- operUserId?: number,
- remark?: string,
- roleInfoAndAgentParamList: any
- }
- /**
- * 指派
- * @param data
- * @returns
- */
- export async function addAssignUserApi(data: AssignUserProps) {
- return request(api + `/manage/role/assign/record/config/sysUser`, {
- method: 'POST',
- data
- });
- }
- /**
- * 删除
- * @param ids
- * @returns
- */
- export async function delAssignUserApi(ids: string) {
- return request(api + `/manage/role/assign/record/delete/${ids}`, {
- method: 'DELETE'
- });
- }
- export interface GetAssignUser extends Paging {
- customerServiceId?: number,
- gameId?: number,
- gsId?: number,
- operUserId?: number,
- regAgentId?: number,
- remark?: string,
- roleId?: number,
- serverId?: number,
- userId?: number
- }
- /**
- *
- * @param data
- * @returns
- */
- export async function getAssignUserApi(data: GetAssignUser) {
- return request(api + `/manage/role/assign/record/list`, {
- method: 'POST',
- data
- });
- }
- /**
- * 修改
- * @param data
- * @returns
- */
- export async function editAssignUserApi(data: AssignUserProps) {
- return request(api + `/manage/role/assign/record/modify`, {
- method: 'POST',
- data
- });
- }
- export interface GetCombatRankingProps extends Paging, SortProps {
- beginDate?: string, // 开服时间(开始)
- endDate?: string,
- gameId?: number, // 游戏ID
- parentGameId?: number // 主游戏ID
- rankingNum?: number // 排名的范围
- serverIds?: number[], // 区服
- isMergeServer?: boolean
- isParticipateMerge?: boolean
- }
- export async function getCombatRankingListApi(data: GetCombatRankingProps) {
- return request(wapi + `/role/combatRanking`, {
- method: 'POST',
- data
- });
- }
- /**
- * 游戏消息发送
- * @param data
- * @returns
- */
- export async function sendMsgTaskApi(data: { taskName: string, sendContent: string, roleIds: any[], roleRechargeRankingDTO: any }) {
- return request(wapi + `/role/sendMsgTask`, {
- method: 'POST',
- data
- });
- }
- /**
- * 任务列表
- * @param data
- * @returns
- */
- export async function getSendMsgTaskListApi(data: { gameId: number, pageNum: number, pageSize: number }) {
- return request(wapi + '/role/sendMsgTask/list', {
- method: 'POST',
- data
- });
- }
- /**
- * 发送记录
- * @param data
- * @returns
- */
- export async function getSendLogListApi(data: { taskId: number, pageNum: number, pageSize: number }) {
- return request(wapi + '/role/sendMsgTask/resultList', {
- method: 'POST',
- data
- });
- }
- let apiManage = api + '/manage'
- export interface GameServerListProps {
- pageNum: number,
- pageSize: number,
- startTime?: string,
- endTime?: string,
- gameId?: number,
- nickName?: string,
- serverId?: number,
- serverName?: string
- }
- /**
- * 游戏区服列表查询
- * @param data
- * @returns
- */
- export async function getGameServerListApi(data: GameServerListProps) {
- return request(apiManage + '/gameServer/list', {
- method: 'POST',
- data
- });
- }
- interface AeGameServerProps {
- gameId: number, // 游戏id
- serverName: string,// 区服名称
- serverId: string, // 区服id, 必传
- startTime: string, // 开服时间
- id?: number
- nickName?: string // 区服冠名
- }
- /**
- * 新增修改区服
- * @param data
- * @returns
- */
- export async function aeGameServerApi(data: AeGameServerProps) {
- return request(apiManage + '/gameServer/add/or/update', {
- method: 'POST',
- data
- });
- }
- /**
- * 删除游戏区服
- * @param params
- * @returns
- */
- export async function delGameServerApi(params: { id: number }) {
- return request(apiManage + '/gameServer/delete', {
- method: 'DELETE',
- params
- });
- }
- /**
- * 新增合服
- * @param params
- * @returns
- */
- export async function mergeAddOrUpdateApi(data: any) {
- return request(apiManage + '/gameServer/merge/add/or/update', {
- method: 'POST',
- data
- });
- }
- export async function uploadExcelServerApi({ formData, ...params }: any) {
- return request(apiManage + '/gameServer/add/excel', {
- method: 'POST',
- params,
- data: formData
- });
- }
- /**
- * 区服指派
- * @param data
- * @returns
- */
- export async function gameServerAssignApi(data: { assignType: string, assignUserIdList: number[], idList: number[] }) {
- return request(apiManage + '/gameServer/assign', {
- method: 'POST',
- data
- });
- }
- /**
- * 获取合服超父游戏列表
- * @param params
- * @returns
- */
- export async function gameSupperListApi() {
- return request(apiManage + '/gameServer/game/supper/list', {
- method: 'GET',
- });
- }
- /**
- * 获取合服超父游戏列表
- * @param params
- * @returns
- */
- export async function unMergeServerListApi(params: any) {
- return request(apiManage + '/gameServer/unMerge/server/list', {
- method: 'GET',
- params
- });
- }
- export interface PackProps {
- gameId: number,
- giftName: string, // 礼包名字
- id?: number
- }
- /**
- * 新增修改礼包
- * @param params
- * @returns
- */
- export async function addOrUpDatePackApi(params: PackProps) {
- return request(apiManage + '/game/gift/add/or/update', {
- method: 'POST',
- data: params
- })
- }
- /**
- * 删除礼包
- * @param ids
- * @returns
- */
- export async function delPackApi(ids: string) {
- return request(apiManage + `/game/gift/delete/${ids}`, {
- method: 'DELETE'
- })
- }
- export interface GetPackProps {
- pageNum: number,
- pageSize: number,
- giftName?: string,
- gameId?: number
- }
- /**
- * 获取礼包列表
- * @param data
- * @returns
- */
- export async function getPackListApi(data: GetPackProps) {
- return request(apiManage + `/game/gift/listOfPage`, {
- method: 'POST',
- data
- })
- }
- export interface CreateRoleConfigProps {
- pageNum: number,
- pageSize: number,
- gameId?: number
- }
- /**
- * 有效创角配置列表查询
- * @param data
- * @returns
- */
- export async function getCreateRoleConfigListApi(data: CreateRoleConfigProps) {
- // return request(apiManage + '/gameUser/config/list', {
- // method: 'POST',
- // data
- // });
- return request(wapi + '/gameUserConfig/list', {
- method: 'POST',
- data
- });
- }
- interface AeGameServerProps {
- gameId: number, // 游戏id
- roleLevel: number, // 游戏角色等级
- id?: number
- }
- /**
- * 新增或修改有效创角配置
- * @param data
- * @returns
- */
- export async function aeGameUserConfigApi(data: AeGameServerProps) {
- // return request(apiManage + '/gameUser/config/add/or/update', {
- // method: 'POST',
- // data
- // });
- if (data?.id) { // 修改
- return request(wapi + '/gameUserConfig/update', {
- method: 'POST',
- data
- });
- }
- return request(wapi + '/gameUserConfig/create', {
- method: 'POST',
- data
- });
- }
- /**
- * 有效创角配置服删除
- * @param params
- * @returns
- */
- export async function delGameUserConfigApi(params: { id: number }) {
- // return request(apiManage + '/gameUser/config/delete', {
- // method: 'DELETE',
- // params
- // });
- return request(wapi + '/gameUserConfig/delete', {
- method: 'POST',
- params
- });
- }
- export interface GameVipProps {
- pageNum: number,
- pageSize: number,
- parentGameId?: number
- superGameId?: number
- vipLevel?: number
- }
- /**
- * vip档位列表
- * @param data
- * @returns
- */
- export async function getGameVipApi(data: GameVipProps) {
- return request(apiManage + '/game/vip/list', {
- method: 'POST',
- data
- });
- }
- /**
- * 删除vip档位
- * @param ids
- * @returns
- */
- export async function delGameVipApi(ids: string) {
- return request(apiManage + `/game/vip/delete/${ids}`, {
- method: 'DELETE'
- });
- }
- export interface modalGameVipApi {
- parentGameId: number
- superGameId: number
- vipLevel: number
- rechargeMoneyMin: number
- rechargeMoneyMax: number
- id?: number
- }
- /**
- * 新增修改vip档位
- * @param data
- * @returns
- */
- export async function modalGameVipApi(data: modalGameVipApi) {
- return request(apiManage + '/game/vip/add/or/update', {
- method: 'POST',
- data
- });
- }
- export interface ModalGameVipSProps {
- list: {
- rechargeMoneyMax: number
- rechargeMoneyMin: number,
- vipLevel: number
- },
- parentGameId: number[]
- superGameId: number
- }
- /**
- * 批量新增vip挡位
- * @param data
- * @returns
- */
- export async function modalGameVipsApi(data: ModalGameVipSProps) {
- return request(apiManage + '/game/vip/add/batch', {
- method: 'POST',
- data
- });
- }
- export interface StrategyListProps extends Paging {
- superGameId?: number,
- type?: number
- }
- /**
- * 游戏策略配置列表
- * @param data
- * @returns
- */
- export async function getStrategyListApi(data: StrategyListProps) {
- return request(apiManage + '/game/policy/config/listOfPage', {
- method: 'POST',
- data
- });
- }
- /**
- * 删除策略配置
- * @param id
- * @returns
- */
- export async function delStrategyApi(id: number) {
- return request(apiManage + `/game/policy/config/deleteById/${id}`, {
- method: 'DELETE'
- });
- }
- export interface StrategyProps {
- superGameId: number
- amount: number
- configExplain?: string,
- time: number,
- type: number,
- id?: number
- }
- /**
- * 新增修改策略
- * @param data
- * @returns
- */
- export async function modalStrategyApi(data: StrategyProps) {
- return request(apiManage + '/game/policy/config/add/or/update', {
- method: 'POST',
- data
- });
- }
|