添加七天签到。产品
This commit is contained in:
parent
bd56952e25
commit
9cb9f95947
16
admin-client/src/services/Apps/App/T_ProductsService.ts
Normal file
16
admin-client/src/services/Apps/App/T_ProductsService.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import Http from "@/core/utils/Http";
|
||||
import BaseService from '@/services/base/BaseService'
|
||||
|
||||
/**
|
||||
* T_Products服务
|
||||
*/
|
||||
export class T_ProductsService extends BaseService {
|
||||
|
||||
constructor() {
|
||||
console.log('执行构造函数');
|
||||
super("/api/v1/admin/Game/T_Products");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new T_ProductsService();
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
import Http from "@/core/utils/Http";
|
||||
import BaseService from '@/services/base/BaseService'
|
||||
|
||||
/**
|
||||
* T_Products_Reward服务
|
||||
*/
|
||||
export class T_Products_RewardService extends BaseService {
|
||||
|
||||
constructor() {
|
||||
console.log('执行构造函数');
|
||||
super("/api/v1/admin/Game/T_Products_Reward");
|
||||
}
|
||||
/**
|
||||
* 获取数据列表
|
||||
* @param productId
|
||||
* @returns
|
||||
*/
|
||||
getList(productId: number) {
|
||||
return Http.get(`${this.urlPrefix}/findList/${productId}`,)
|
||||
}
|
||||
}
|
||||
|
||||
export default new T_Products_RewardService();
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import Http from "@/core/utils/Http";
|
||||
import BaseService from '@/services/base/BaseService'
|
||||
|
||||
/**
|
||||
* T_SevenDaySignIn服务
|
||||
*/
|
||||
export class T_SevenDaySignInService extends BaseService {
|
||||
|
||||
constructor() {
|
||||
console.log('执行构造函数');
|
||||
super("/api/v1/admin/Game/T_SevenDaySignIn");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new T_SevenDaySignInService();
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import Http from "@/core/utils/Http";
|
||||
import BaseService from '@/services/base/BaseService'
|
||||
|
||||
/**
|
||||
* T_SevenDaySignIn_Reward服务
|
||||
*/
|
||||
export class T_SevenDaySignIn_RewardService extends BaseService {
|
||||
|
||||
constructor() {
|
||||
console.log('执行构造函数');
|
||||
super("/api/v1/admin/Game/T_SevenDaySignIn_Reward");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据列表
|
||||
* @param productId
|
||||
* @returns
|
||||
*/
|
||||
getList(productId: number) {
|
||||
return Http.get(`${this.urlPrefix}/findList/${productId}`,)
|
||||
}
|
||||
}
|
||||
|
||||
export default new T_SevenDaySignIn_RewardService();
|
||||
|
|
@ -247,7 +247,7 @@ const gameChanged = (option: any) => {
|
|||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item
|
||||
label="小LOGO(首页最近推出、游玩历史、游戏详情页logo,图片命名:logo_1)"
|
||||
name="ImageIconId"
|
||||
name="imageIconId"
|
||||
>
|
||||
<h-image-btn v-model="state.vm.form.imageIconId" />
|
||||
</a-form-item>
|
||||
|
|
@ -255,32 +255,32 @@ const gameChanged = (option: any) => {
|
|||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item
|
||||
label="中等LOGO(首页体育竞技、搜索,图片命名:logo_2)"
|
||||
name="ImageId_ShouSuo"
|
||||
name="imageId_ShouSuo"
|
||||
>
|
||||
<h-image-btn v-model="state.vm.form.ImageId_ShouSuo" />
|
||||
<h-image-btn v-model="state.vm.form.imageId_ShouSuo" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="大LOGO(首页爆款热门,图片命名:logo_3)" name="ImageId_RM">
|
||||
<h-image-btn v-model="state.vm.form.ImageId_RM" />
|
||||
<a-form-item label="大LOGO(首页爆款热门,图片命名:logo_3)" name="imageId_RM">
|
||||
<h-image-btn v-model="state.vm.form.imageId_RM" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="中方块(游戏库使用,图片命名:youxiku )" name="ImageId_YXK">
|
||||
<h-image-btn v-model="state.vm.form.ImageId_YXK" />
|
||||
<a-form-item label="中方块(游戏库使用,图片命名:youxiku )" name="imageId_YXK">
|
||||
<h-image-btn v-model="state.vm.form.imageId_YXK" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item
|
||||
label="竖形图(首页蘑菇必玩、首页热血格斗、游戏详情页游戏推荐,图片命名:biwan )"
|
||||
name="ImageId_TJ"
|
||||
name="imageId_TJ"
|
||||
>
|
||||
<h-image-btn v-model="state.vm.form.ImageId_TJ" />
|
||||
<h-image-btn v-model="state.vm.form.imageId_TJ" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="大方块(首页GTA系列,图片命名:xilie)" name="ImageId_FK">
|
||||
<h-image-btn v-model="state.vm.form.ImageId_FK" />
|
||||
<a-form-item label="大方块(首页GTA系列,图片命名:xilie)" name="imageId_FK">
|
||||
<h-image-btn v-model="state.vm.form.imageId_FK" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
|
|
|
|||
244
admin-client/src/views/Apps/App/T_Products_Rewards/Index.vue
Normal file
244
admin-client/src/views/Apps/App/T_Products_Rewards/Index.vue
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import { useAuthority } from "@/utils/Authority";
|
||||
import AppIcon from "@/core/components/AppIcon.vue";
|
||||
import Info from "./Info.vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import PageContainerGame from "@/core/components/PageContainerGame.vue";
|
||||
import TableCurdV1 from "@/core/components/curd/TableCurdV1.vue";
|
||||
import T_Products_RewardService from "@/services/apps/App/T_Products_RewardService";
|
||||
|
||||
defineOptions({ name: "t_Products_RewardIndex" });
|
||||
var columns = [
|
||||
|
||||
{
|
||||
dataIndex: "currencyType",
|
||||
title: "奖励类型",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "money",
|
||||
title: "奖励",
|
||||
show: true,
|
||||
width: 40,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "t_ProductId",
|
||||
title: "所属商品",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "firstChargeMoney",
|
||||
title: "首充奖励",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "productId",
|
||||
title: "所属商品",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
const state = reactive({
|
||||
search: {
|
||||
state: true,
|
||||
vm: {
|
||||
},
|
||||
sort: [] as any[],
|
||||
},
|
||||
loading: false,
|
||||
page: 1,
|
||||
size: 50,
|
||||
total: 100,
|
||||
columns: [] as any,
|
||||
data: [] as any,
|
||||
});
|
||||
|
||||
//权限
|
||||
const power = useAuthority();
|
||||
//表格
|
||||
const refTableCurd = ref < InstanceType < typeof TableCurdV1 >> ();
|
||||
//表单操作对象
|
||||
const refInfo = ref<InstanceType<typeof Info>>();
|
||||
//检索表单
|
||||
const refSearchForm = ref<FormInstance>();
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
onMounted(() => {
|
||||
findList();
|
||||
});
|
||||
|
||||
/**
|
||||
*获取数据
|
||||
*/
|
||||
async function findList() {
|
||||
try{
|
||||
state.loading = true;
|
||||
const result = await T_Products_RewardService.findList(state.page, state.size, state.search.vm, state.search.sort);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
state.page = result.data.page;
|
||||
state.size = result.data.size;
|
||||
state.total = result.data.total;
|
||||
state.columns = columns;// result.data.columns;
|
||||
state.data = result.data.dataSource;
|
||||
// state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param id
|
||||
*/
|
||||
async function deleteList(id?: string) {
|
||||
let ids: string[] = [];
|
||||
if (id) {
|
||||
ids.push(id);
|
||||
} else {
|
||||
ids = refTableCurd.value?.getSelectedRowKeys() ?? [];
|
||||
}
|
||||
|
||||
if (ids.length == 0) return Tools.message.error("请选择要删除的行!");
|
||||
|
||||
try{
|
||||
state.loading = true;
|
||||
const result = await T_Products_RewardService.deleteList(ids);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("删除成功!");
|
||||
findList();
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
function exportExcel() {
|
||||
T_Products_RewardService.exportExcel(state.search.vm, state.search.sort);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<PageContainerGame>
|
||||
<TableCurdV1 ref="refTableCurd"
|
||||
:config="state"
|
||||
@change="
|
||||
(changeTable) => {
|
||||
state.page = changeTable.pagination.current ?? 1;
|
||||
state.size = changeTable.pagination.pageSize ?? state.size;
|
||||
state.search.sort = changeTable.sorter instanceof Array ? [...changeTable.sorter] : [changeTable.sorter];
|
||||
findList();
|
||||
}
|
||||
"
|
||||
@show-size-change="
|
||||
({ current, size }) => {
|
||||
state.page = current == 0 ? 1 : current;
|
||||
state.size = size;
|
||||
findList();
|
||||
}
|
||||
"
|
||||
>
|
||||
<!-- search -->
|
||||
<template #search>
|
||||
<a-form ref="refSearchForm" :model="state.search.vm" v-if="power.search">
|
||||
<a-row :gutter="[16, 0]">
|
||||
|
||||
<!--button-->
|
||||
<a-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="text-right">
|
||||
<a-space :size="8">
|
||||
<a-button
|
||||
@click="
|
||||
state.page = 1;
|
||||
refSearchForm?.resetFields();
|
||||
findList();
|
||||
"
|
||||
>
|
||||
重置
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="
|
||||
state.page = 1;
|
||||
findList();
|
||||
"
|
||||
>
|
||||
查询
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
<!-- toolbar-left -->
|
||||
<template #toolbar-left>
|
||||
<!-- <a-button @click="state.search.state = !state.search.state" v-if="power.search">
|
||||
<div v-if="state.search.state"><AppIcon name="UpOutlined" /> 收起</div>
|
||||
<div v-else><AppIcon name="DownOutlined" /> 展开</div>
|
||||
</a-button> -->
|
||||
<a-button type="primary" @click="() => refInfo?.open()" v-if="power.insert">
|
||||
<template #icon>
|
||||
<AppIcon name="PlusOutlined" />
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
<a-popconfirm title="您确定要删除?" @confirm="deleteList()" okText="确定" cancelText="取消" v-if="power.delete">
|
||||
<a-button type="primary" danger>
|
||||
<template #icon>
|
||||
<AppIcon name="DeleteOutlined" />
|
||||
</template>
|
||||
批量删除
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<!-- toolbar-right -->
|
||||
<template #toolbar-right>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="exportExcel()">导出 Excel</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button> 更多 <AppIcon name="ellipsis-outlined" /> </a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!-- table-col -->
|
||||
<template #table-col>
|
||||
<template v-for="item,index in state.columns.filter((w:any) => w.dataIndex !== 'id' && w.show)" :key="item.dataIndex">
|
||||
<a-table-column :title="item.title" :width="item.width" :data-index="item.dataIndex" :sorter="item.sort ? { multiple: index + 1 } : false" />
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<a-table-column title="操作" data-index="id" width="200px" fixed="right" v-if="power.update || power.delete">
|
||||
<template #default="{ record }">
|
||||
<a-button type="link" @click="() => refInfo?.open(record.id)" v-if="power.update">编辑</a-button>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="您确定要删除?" @confirm="deleteList(record.id)" okText="确定" cancelText="取消"
|
||||
v-if="power.delete">
|
||||
<a-button type="link" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</TableCurdV1>
|
||||
<!-- Info -->
|
||||
<Info ref="refInfo" :onSuccess="() => findList()" />
|
||||
</PageContainerGame>
|
||||
</template>
|
||||
102
admin-client/src/views/Apps/App/T_Products_Rewards/Info.vue
Normal file
102
admin-client/src/views/Apps/App/T_Products_Rewards/Info.vue
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_Products_RewardService from "@/services/apps/App/T_Products_RewardService";
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: string = "") => {
|
||||
state.visible = true;
|
||||
if (state.visible) {
|
||||
state.vm.id = key;
|
||||
}
|
||||
refForm.value?.resetFields();
|
||||
//初始化表单数据
|
||||
state.loading = true;
|
||||
T_Products_RewardService.findForm(key).then((res) => {
|
||||
state.loading = false;
|
||||
if (res.code != 200) return;
|
||||
state.vm = res.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
*保存数据
|
||||
*/
|
||||
function save() {
|
||||
refForm.value?.validate().then(async () => {
|
||||
try{
|
||||
state.loading = true;
|
||||
const result = await T_Products_RewardService.saveForm(state.vm.id, state.vm.form);
|
||||
state.loading = false;
|
||||
if (result.code !=200) return;
|
||||
Tools.message.success("操作成功!");
|
||||
props.onSuccess();
|
||||
state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal v-model:open="state.visible" :title="state.vm.id ? '编辑' : '新建'" centered @ok="state.visible = false" :maskClosable="false" :width="900">
|
||||
<template #footer>
|
||||
<a-button type="primary" :loading="state.loading" @click="save()"> 提交</a-button>
|
||||
<a-button @click="state.visible = false">关闭</a-button>
|
||||
</template>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-form ref="refForm" layout="vertical" :model="state.vm.form">
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="奖励类型" name="currencyType" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.currencyType" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="奖励" name="money" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.money" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="所属商品" name="t_ProductId" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.t_ProductId" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="首充奖励" name="firstChargeMoney" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.firstChargeMoney" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="所属商品" name="productId" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.productId" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
469
admin-client/src/views/Apps/App/T_Productss/Index.vue
Normal file
469
admin-client/src/views/Apps/App/T_Productss/Index.vue
Normal file
|
|
@ -0,0 +1,469 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import { useAuthority } from "@/utils/Authority";
|
||||
import AppIcon from "@/core/components/AppIcon.vue";
|
||||
import Info from "./Info.vue";
|
||||
import InfoRawardsList from "./InfoRawardsList.vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import PageContainerGame from "@/core/components/PageContainerGame.vue";
|
||||
import TableCurdV1 from "@/core/components/curd/TableCurdV1.vue";
|
||||
import T_ProductsService from "@/services/apps/App/T_ProductsService";
|
||||
import imageServer from "@/services/apps/Ext/T_App_ImageService";
|
||||
defineOptions({ name: "t_ProductsIndex" });
|
||||
var columns = [
|
||||
{
|
||||
dataIndex: "productId",
|
||||
title: "道具Id",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "productName",
|
||||
title: "道具名称",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "productType",
|
||||
title: "道具类型",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "productDesc",
|
||||
title: "道具描述",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "price",
|
||||
title: "价格",
|
||||
show: true,
|
||||
width: 40,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "imageId",
|
||||
title: "图片",
|
||||
show: true,
|
||||
width: 150,
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "selectImageId",
|
||||
title: "选中图片",
|
||||
show: true,
|
||||
width: 150,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "isEnable",
|
||||
title: "是否启用",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "isFirstCharge",
|
||||
title: "是否有首充",
|
||||
show: true,
|
||||
width: 100,
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "firstChargePrice",
|
||||
title: "首充价格",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "firstChargeImageId",
|
||||
title: "首充图片",
|
||||
show: true,
|
||||
width: 150,
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "selectFirstChargeImageId",
|
||||
title: "选中首充图片",
|
||||
show: true,
|
||||
width: 150,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "createTime",
|
||||
title: "创建时间",
|
||||
show: false,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "updateTime",
|
||||
title: "更新时间",
|
||||
show: false,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "orderById",
|
||||
title: "排序",
|
||||
show: true,
|
||||
width: 40,
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
const state = reactive({
|
||||
search: {
|
||||
state: true,
|
||||
vm: {
|
||||
productid: undefined,
|
||||
productname: undefined,
|
||||
producttype: undefined,
|
||||
},
|
||||
sort: [] as any[],
|
||||
},
|
||||
loading: false,
|
||||
page: 1,
|
||||
size: 50,
|
||||
total: 100,
|
||||
columns: [] as any,
|
||||
data: [] as any,
|
||||
});
|
||||
|
||||
//权限
|
||||
const power = useAuthority();
|
||||
//表格
|
||||
const refTableCurd = ref<InstanceType<typeof TableCurdV1>>();
|
||||
//表单操作对象
|
||||
const refInfo = ref<InstanceType<typeof Info>>();
|
||||
const refInfoRawardsList = ref<InstanceType<typeof InfoRawardsList>>();
|
||||
//检索表单
|
||||
const refSearchForm = ref<FormInstance>();
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
onMounted(() => {
|
||||
findList();
|
||||
});
|
||||
|
||||
/**
|
||||
*获取数据
|
||||
*/
|
||||
async function findList() {
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_ProductsService.findList(
|
||||
state.page,
|
||||
state.size,
|
||||
state.search.vm,
|
||||
state.search.sort
|
||||
);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
state.page = result.data.page;
|
||||
state.size = result.data.size;
|
||||
state.total = result.data.total;
|
||||
state.columns = columns; // result.data.columns;
|
||||
state.data = result.data.dataSource;
|
||||
// state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param id
|
||||
*/
|
||||
async function deleteList(id?: string) {
|
||||
let ids: string[] = [];
|
||||
if (id) {
|
||||
ids.push(id);
|
||||
} else {
|
||||
ids = refTableCurd.value?.getSelectedRowKeys() ?? [];
|
||||
}
|
||||
|
||||
if (ids.length == 0) return Tools.message.error("请选择要删除的行!");
|
||||
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_ProductsService.deleteList(ids);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("删除成功!");
|
||||
findList();
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
function exportExcel() {
|
||||
T_ProductsService.exportExcel(state.search.vm, state.search.sort);
|
||||
}
|
||||
|
||||
let url = (imageId) => {
|
||||
var url = imageServer.getImageUrl("zh", imageId, false);
|
||||
// console.log(url);
|
||||
return url;
|
||||
};
|
||||
|
||||
let url1 = (imageId) => {
|
||||
var url = imageServer.getImageUrl("zh", imageId, true);
|
||||
console.log(url);
|
||||
return url;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<PageContainerGame>
|
||||
<TableCurdV1
|
||||
ref="refTableCurd"
|
||||
:config="state"
|
||||
@change="
|
||||
(changeTable) => {
|
||||
state.page = changeTable.pagination.current ?? 1;
|
||||
state.size = changeTable.pagination.pageSize ?? state.size;
|
||||
state.search.sort =
|
||||
changeTable.sorter instanceof Array
|
||||
? [...changeTable.sorter]
|
||||
: [changeTable.sorter];
|
||||
findList();
|
||||
}
|
||||
"
|
||||
@show-size-change="
|
||||
({ current, size }) => {
|
||||
state.page = current == 0 ? 1 : current;
|
||||
state.size = size;
|
||||
findList();
|
||||
}
|
||||
"
|
||||
>
|
||||
<!-- search -->
|
||||
<template #search>
|
||||
<a-form
|
||||
ref="refSearchForm"
|
||||
:model="state.search.vm"
|
||||
v-if="power.search"
|
||||
>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
|
||||
<a-form-item class="mb-0" name="name" label="道具类型">
|
||||
<h-common-select
|
||||
code="product_type"
|
||||
v-model="state.search.vm.producttype"
|
||||
:ShowAll="true"
|
||||
:defaultValue="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
|
||||
<a-form-item class="mb-0" name="name" label="道具Id">
|
||||
<a-input
|
||||
v-model:value="state.search.vm.productid"
|
||||
placeholder="道具Id"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
|
||||
<a-form-item class="mb-0" name="name" label="道具名称">
|
||||
<a-input
|
||||
v-model:value="state.search.vm.productname"
|
||||
placeholder="道具名称"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<!--button-->
|
||||
<a-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="text-right">
|
||||
<a-space :size="8">
|
||||
<a-button
|
||||
@click="
|
||||
state.page = 1;
|
||||
refSearchForm?.resetFields();
|
||||
findList();
|
||||
"
|
||||
>
|
||||
重置
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="
|
||||
state.page = 1;
|
||||
findList();
|
||||
"
|
||||
>
|
||||
查询
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
<!-- toolbar-left -->
|
||||
<template #toolbar-left>
|
||||
<!-- <a-button @click="state.search.state = !state.search.state" v-if="power.search">
|
||||
<div v-if="state.search.state"><AppIcon name="UpOutlined" /> 收起</div>
|
||||
<div v-else><AppIcon name="DownOutlined" /> 展开</div>
|
||||
</a-button> -->
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="() => refInfo?.open()"
|
||||
v-if="power.insert"
|
||||
>
|
||||
<template #icon>
|
||||
<AppIcon name="PlusOutlined" />
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList()"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
v-if="power.delete"
|
||||
>
|
||||
<a-button type="primary" danger>
|
||||
<template #icon>
|
||||
<AppIcon name="DeleteOutlined" />
|
||||
</template>
|
||||
批量删除
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<!-- toolbar-right -->
|
||||
<template #toolbar-right>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="exportExcel()"
|
||||
>导出 Excel</a-menu-item
|
||||
>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button> 更多 <AppIcon name="ellipsis-outlined" /> </a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!-- table-col -->
|
||||
<template #table-col>
|
||||
<template
|
||||
v-for="item,index in state.columns.filter((w:any) => w.dataIndex !== 'id' && w.show)"
|
||||
:key="item.dataIndex"
|
||||
>
|
||||
<a-table-column
|
||||
:title="item.title"
|
||||
:width="item.width"
|
||||
:data-index="item.dataIndex"
|
||||
:sorter="item.sort ? { multiple: index + 1 } : false"
|
||||
>
|
||||
<template #default="{ record }" v-if="item.dataIndex === 'imageId'">
|
||||
<a-image
|
||||
:width="100"
|
||||
:src="url(record.imageId)"
|
||||
:preview="{ src: url1(record.imageId) }"
|
||||
>
|
||||
</a-image>
|
||||
</template>
|
||||
<template
|
||||
#default="{ record }"
|
||||
v-if="item.dataIndex === 'selectImageId'"
|
||||
>
|
||||
<a-image
|
||||
:width="100"
|
||||
:src="url(record.selectImageId)"
|
||||
:preview="{ src: url1(record.selectImageId) }"
|
||||
>
|
||||
</a-image>
|
||||
</template>
|
||||
<template
|
||||
#default="{ record }"
|
||||
v-if="item.dataIndex === 'firstChargeImageId'"
|
||||
>
|
||||
<a-image
|
||||
:width="100"
|
||||
:src="url(record.firstChargeImageId)"
|
||||
:preview="{ src: url1(record.firstChargeImageId) }"
|
||||
>
|
||||
</a-image>
|
||||
</template>
|
||||
<template
|
||||
#default="{ record }"
|
||||
v-if="item.dataIndex === 'selectFirstChargeImageId'"
|
||||
>
|
||||
<a-image
|
||||
:width="100"
|
||||
:src="url(record.selectFirstChargeImageId)"
|
||||
:preview="{ src: url1(record.selectFirstChargeImageId) }"
|
||||
>
|
||||
</a-image>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<a-table-column
|
||||
title="操作"
|
||||
data-index="id"
|
||||
:width="230"
|
||||
fixed="right"
|
||||
v-if="power.update || power.delete"
|
||||
>
|
||||
<template #default="{ record }">
|
||||
<a-button
|
||||
type="link"
|
||||
@click="
|
||||
() =>
|
||||
refInfoRawardsList?.open(
|
||||
record.id,
|
||||
record.id,
|
||||
record.productId
|
||||
)
|
||||
"
|
||||
v-if="power.update"
|
||||
>设置奖励</a-button
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a-button
|
||||
type="link"
|
||||
@click="() => refInfo?.open(record.id)"
|
||||
v-if="power.update"
|
||||
>编辑</a-button
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList(record.id)"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
v-if="power.delete"
|
||||
>
|
||||
<a-button type="link" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</TableCurdV1>
|
||||
<!-- Info -->
|
||||
<Info ref="refInfo" :onSuccess="() => findList()" />
|
||||
<InfoRawardsList ref="refInfoRawardsList" :onSuccess="() => findList()" />
|
||||
</PageContainerGame>
|
||||
</template>
|
||||
221
admin-client/src/views/Apps/App/T_Productss/Info.vue
Normal file
221
admin-client/src/views/Apps/App/T_Productss/Info.vue
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_ProductsService from "@/services/apps/App/T_ProductsService";
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: string = "") => {
|
||||
state.visible = true;
|
||||
if (state.visible) {
|
||||
state.vm.id = key;
|
||||
}
|
||||
refForm.value?.resetFields();
|
||||
//初始化表单数据
|
||||
state.loading = true;
|
||||
T_ProductsService.findForm(key).then((res) => {
|
||||
state.loading = false;
|
||||
if (res.code != 200) return;
|
||||
if (res.data.form.id == 0) {
|
||||
res.data.form.isEnable = true;
|
||||
}
|
||||
if (res.data.form.isEnable == null) {
|
||||
res.data.form.isEnable = false;
|
||||
}
|
||||
|
||||
if (res.data.form.isFirstCharge == null) {
|
||||
res.data.form.isFirstCharge = false;
|
||||
}
|
||||
|
||||
state.vm = res.data;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
*保存数据
|
||||
*/
|
||||
function save() {
|
||||
refForm.value?.validate().then(async () => {
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_ProductsService.saveForm(
|
||||
state.vm.id,
|
||||
state.vm.form
|
||||
);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("操作成功!");
|
||||
props.onSuccess();
|
||||
state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:open="state.visible"
|
||||
:title="state.vm.id ? '编辑' : '新建'"
|
||||
centered
|
||||
@ok="state.visible = false"
|
||||
:maskClosable="false"
|
||||
:width="900"
|
||||
>
|
||||
<template #footer>
|
||||
<a-button type="primary" :loading="state.loading" @click="save()">
|
||||
提交</a-button
|
||||
>
|
||||
<a-button @click="state.visible = false">关闭</a-button>
|
||||
</template>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-form ref="refForm" layout="vertical" :model="state.vm.form">
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="道具Id"
|
||||
name="productId"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="state.vm.form.productId"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="道具名称"
|
||||
name="productName"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="state.vm.form.productName"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="6" :sm="6" :md="6" :lg="6" :xl="6">
|
||||
<a-form-item
|
||||
label="道具类型"
|
||||
name="productType"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<h-common-select
|
||||
code="product_type"
|
||||
v-model="state.vm.form.productType"
|
||||
:ShowAll="false"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="6" :sm="6" :md="6" :lg="6" :xl="6">
|
||||
<a-form-item label="排序" name="orderById">
|
||||
<a-input-number
|
||||
style="width: 99%"
|
||||
v-model:value="state.vm.form.orderById"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="道具描述" name="productDesc">
|
||||
<a-input
|
||||
v-model:value="state.vm.form.productDesc"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="6" :sm="6" :md="6" :lg="6" :xl="6">
|
||||
<a-form-item label="是否启用" name="isEnable">
|
||||
<a-radio-group
|
||||
v-model:value="state.vm.form.isEnable"
|
||||
name="isEnable"
|
||||
>
|
||||
<a-radio :value="false">否</a-radio>
|
||||
<a-radio :value="true">是</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="6" :sm="6" :md="6" :lg="6" :xl="6">
|
||||
<a-form-item
|
||||
label="价格"
|
||||
name="price"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<a-input-number
|
||||
style="width: 99%"
|
||||
v-model:value="state.vm.form.price"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xs="6" :sm="6" :md="6" :lg="6" :xl="6">
|
||||
<a-form-item label="是否有首充" name="isFirstCharge">
|
||||
<a-radio-group
|
||||
v-model:value="state.vm.form.isFirstCharge"
|
||||
name="isFirstCharge"
|
||||
>
|
||||
<a-radio :value="false">否</a-radio>
|
||||
<a-radio :value="true">是</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="6" :sm="6" :md="6" :lg="6" :xl="6">
|
||||
<a-form-item label="首充价格" name="firstChargePrice">
|
||||
<a-input-number
|
||||
style="width: 99%"
|
||||
v-model:value="state.vm.form.firstChargePrice"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="图片·" name="imageId">
|
||||
<h-image-btn v-model="state.vm.form.imageId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="选中图片" name="selectImageId">
|
||||
<h-image-btn v-model="state.vm.form.selectImageId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="首充图片" name="firstChargeImageId">
|
||||
<h-image-btn v-model="state.vm.form.firstChargeImageId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="选中首充图片" name="selectFirstChargeImageId">
|
||||
<h-image-btn v-model="state.vm.form.selectFirstChargeImageId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
134
admin-client/src/views/Apps/App/T_Productss/InfoRawards.vue
Normal file
134
admin-client/src/views/Apps/App/T_Productss/InfoRawards.vue
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_Products_RewardService from "@/services/apps/App/T_Products_RewardService";
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: string = "", t_productId: any = 0, productId: any = "") => {
|
||||
state.visible = true;
|
||||
if (state.visible) {
|
||||
state.vm.id = key;
|
||||
}
|
||||
refForm.value?.resetFields();
|
||||
console.log(t_productId, productId);
|
||||
//初始化表单数据
|
||||
state.loading = true;
|
||||
T_Products_RewardService.findForm(key).then((res) => {
|
||||
state.loading = false;
|
||||
if (res.code != 200) return;
|
||||
if (res.data.form.id == 0) {
|
||||
res.data.form.t_ProductId = t_productId;
|
||||
res.data.form.productId = productId;
|
||||
}
|
||||
if (res.data.form.t_ProductId == 0) {
|
||||
res.data.form.t_ProductId = t_productId;
|
||||
}
|
||||
if (res.data.form.productId == "") {
|
||||
res.data.form.productId = productId;
|
||||
}
|
||||
state.vm = res.data;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
*保存数据
|
||||
*/
|
||||
function save() {
|
||||
refForm.value?.validate().then(async () => {
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_Products_RewardService.saveForm(
|
||||
state.vm.id,
|
||||
state.vm.form
|
||||
);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("操作成功!");
|
||||
props.onSuccess();
|
||||
state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:open="state.visible"
|
||||
:title="state.vm.id ? '编辑' : '新建'"
|
||||
centered
|
||||
@ok="state.visible = false"
|
||||
:maskClosable="false"
|
||||
:width="900"
|
||||
>
|
||||
<template #footer>
|
||||
<a-button type="primary" :loading="state.loading" @click="save()">
|
||||
提交</a-button
|
||||
>
|
||||
<a-button @click="state.visible = false">关闭</a-button>
|
||||
</template>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-form ref="refForm" layout="vertical" :model="state.vm.form">
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item
|
||||
label="奖励类型"
|
||||
name="currencyType"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<h-common-select
|
||||
code="currency_type"
|
||||
v-model="state.vm.form.currencyType"
|
||||
:ShowAll="false"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item
|
||||
label="数量/时长"
|
||||
name="money"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<a-input-number
|
||||
style="width: 99%"
|
||||
v-model:value="state.vm.form.money"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item label="首充额外赠送数量/时长" name="firstChargeMoney">
|
||||
<a-input-number
|
||||
style="width: 99%"
|
||||
v-model:value="state.vm.form.firstChargeMoney"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
172
admin-client/src/views/Apps/App/T_Productss/InfoRawardsList.vue
Normal file
172
admin-client/src/views/Apps/App/T_Productss/InfoRawardsList.vue
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_Products_RewardService from "@/services/apps/App/T_Products_RewardService";
|
||||
// import T_Products_RewardService from "@/services/apps/T_Products_Rewards/T_Products_RewardService";
|
||||
import AppDictionaryCache from "@/core/utils/AppDictionaryCache";
|
||||
import InfoRawards from "./InfoRawards.vue";
|
||||
import type { TableColumnsType } from "ant-design-vue";
|
||||
|
||||
//表单操作对象
|
||||
const refInfoRawards = ref<InstanceType<typeof InfoRawards>>();
|
||||
var currencyCache = null;
|
||||
AppDictionaryCache.getAppDictionary("currency_type")
|
||||
.getDataListSelect()
|
||||
.then((data) => {
|
||||
currencyCache = data;
|
||||
});
|
||||
// AppDictionaryCache.appDictionaryCurrencyCache.getDataList().then((data) => {
|
||||
// currencyCache = data;
|
||||
// });
|
||||
const columns: TableColumnsType = [
|
||||
{
|
||||
title: "奖励类型",
|
||||
width: 10,
|
||||
dataIndex: "currencyType",
|
||||
key: "currencyType",
|
||||
customRender: ({ text, record, index, column }) => {
|
||||
console.log(record, text, currencyCache);
|
||||
var temp = currencyCache.find((it) => it.value == record.currencyType);
|
||||
return temp?.label;
|
||||
},
|
||||
},
|
||||
{ title: "金额", dataIndex: "money", key: "money", width: 10 },
|
||||
{
|
||||
title: "首充额外赠送",
|
||||
dataIndex: "firstChargeMoney",
|
||||
key: "firstChargeMoney",
|
||||
width: 10,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "operation",
|
||||
|
||||
width: 10,
|
||||
},
|
||||
];
|
||||
|
||||
interface DataItem {
|
||||
id: number;
|
||||
currencyType: string;
|
||||
money: number;
|
||||
firstChargeMoney: number;
|
||||
}
|
||||
|
||||
const data = reactive([]);
|
||||
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
|
||||
let t_productId: any = 0;
|
||||
let productId: any = "";
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: number = 0, _t_productId: any = 0, _productId: any = "") => {
|
||||
t_productId = _t_productId;
|
||||
productId = _productId;
|
||||
loadData();
|
||||
},
|
||||
});
|
||||
const addReward = () => {
|
||||
refInfoRawards?.value.open("0", t_productId, productId);
|
||||
};
|
||||
const loadData = () => {
|
||||
data.splice(0, data.length);
|
||||
state.visible = true;
|
||||
T_Products_RewardService.getList(t_productId).then((res) => {
|
||||
console.log(res);
|
||||
if (res != null && res.data != null) {
|
||||
res.data.forEach((element) => {
|
||||
data.push(element);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param id
|
||||
*/
|
||||
async function deleteList(id?: string) {
|
||||
let ids: string[] = [];
|
||||
if (id) {
|
||||
ids.push(id);
|
||||
}
|
||||
|
||||
if (ids.length == 0) return Tools.message.error("请选择要删除的行!");
|
||||
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_Products_RewardService.deleteList(ids);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("删除成功!");
|
||||
loadData();
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:open="state.visible"
|
||||
:title="state.vm.id ? '编辑奖励' : '新建奖励'"
|
||||
centered
|
||||
@ok="state.visible = false"
|
||||
:width="800"
|
||||
:maskClosable="false"
|
||||
>
|
||||
<div>
|
||||
<a-button type="primary" @click="addReward">添加</a-button>
|
||||
</div>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
:bordered="true"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 700, y: 300 }"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a
|
||||
href="javascript:;"
|
||||
@click="
|
||||
() => refInfoRawards?.open(record.id, t_productId, productId)
|
||||
"
|
||||
>编辑</a
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList(record.id)"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<a class="text-danger">删除</a>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-spin>
|
||||
<InfoRawards ref="refInfoRawards" :onSuccess="() => loadData()" />
|
||||
</a-modal>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,277 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import { useAuthority } from "@/utils/Authority";
|
||||
import AppIcon from "@/core/components/AppIcon.vue";
|
||||
import Info from "./Info.vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import PageContainerGame from "@/core/components/PageContainerGame.vue";
|
||||
import TableCurdV1 from "@/core/components/curd/TableCurdV1.vue";
|
||||
import T_SevenDaySignIn_RewardService from "@/services/apps/App/T_SevenDaySignIn_RewardService";
|
||||
|
||||
defineOptions({ name: "t_SevenDaySignIn_RewardIndex" });
|
||||
var columns = [
|
||||
{
|
||||
dataIndex: "signinId",
|
||||
title: "七天签到id",
|
||||
show: false,
|
||||
width: 120,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "currencyType",
|
||||
title: "奖励类型",
|
||||
show: false,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "awardNum",
|
||||
title: "奖励数量",
|
||||
show: false,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
const state = reactive({
|
||||
search: {
|
||||
state: true,
|
||||
vm: {},
|
||||
sort: [] as any[],
|
||||
},
|
||||
loading: false,
|
||||
page: 1,
|
||||
size: 50,
|
||||
total: 100,
|
||||
columns: [] as any,
|
||||
data: [] as any,
|
||||
});
|
||||
|
||||
//权限
|
||||
const power = useAuthority();
|
||||
//表格
|
||||
const refTableCurd = ref<InstanceType<typeof TableCurdV1>>();
|
||||
//表单操作对象
|
||||
const refInfo = ref<InstanceType<typeof Info>>();
|
||||
//检索表单
|
||||
const refSearchForm = ref<FormInstance>();
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
onMounted(() => {
|
||||
findList();
|
||||
});
|
||||
|
||||
/**
|
||||
*获取数据
|
||||
*/
|
||||
async function findList() {
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignIn_RewardService.findList(
|
||||
state.page,
|
||||
state.size,
|
||||
state.search.vm,
|
||||
state.search.sort
|
||||
);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
state.page = result.data.page;
|
||||
state.size = result.data.size;
|
||||
state.total = result.data.total;
|
||||
state.columns = columns; // result.data.columns;
|
||||
state.data = result.data.dataSource;
|
||||
// state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param id
|
||||
*/
|
||||
async function deleteList(id?: string) {
|
||||
let ids: string[] = [];
|
||||
if (id) {
|
||||
ids.push(id);
|
||||
} else {
|
||||
ids = refTableCurd.value?.getSelectedRowKeys() ?? [];
|
||||
}
|
||||
|
||||
if (ids.length == 0) return Tools.message.error("请选择要删除的行!");
|
||||
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignIn_RewardService.deleteList(ids);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("删除成功!");
|
||||
findList();
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
function exportExcel() {
|
||||
T_SevenDaySignIn_RewardService.exportExcel(
|
||||
state.search.vm,
|
||||
state.search.sort
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<PageContainerGame>
|
||||
<TableCurdV1
|
||||
ref="refTableCurd"
|
||||
:config="state"
|
||||
@change="
|
||||
(changeTable) => {
|
||||
state.page = changeTable.pagination.current ?? 1;
|
||||
state.size = changeTable.pagination.pageSize ?? state.size;
|
||||
state.search.sort =
|
||||
changeTable.sorter instanceof Array
|
||||
? [...changeTable.sorter]
|
||||
: [changeTable.sorter];
|
||||
findList();
|
||||
}
|
||||
"
|
||||
@show-size-change="
|
||||
({ current, size }) => {
|
||||
state.page = current == 0 ? 1 : current;
|
||||
state.size = size;
|
||||
findList();
|
||||
}
|
||||
"
|
||||
>
|
||||
<!-- search -->
|
||||
<template #search>
|
||||
<a-form
|
||||
ref="refSearchForm"
|
||||
:model="state.search.vm"
|
||||
v-if="power.search"
|
||||
>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<!--button-->
|
||||
<a-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="text-right">
|
||||
<a-space :size="8">
|
||||
<a-button
|
||||
@click="
|
||||
state.page = 1;
|
||||
refSearchForm?.resetFields();
|
||||
findList();
|
||||
"
|
||||
>
|
||||
重置
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="
|
||||
state.page = 1;
|
||||
findList();
|
||||
"
|
||||
>
|
||||
查询
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
<!-- toolbar-left -->
|
||||
<template #toolbar-left>
|
||||
<!-- <a-button @click="state.search.state = !state.search.state" v-if="power.search">
|
||||
<div v-if="state.search.state"><AppIcon name="UpOutlined" /> 收起</div>
|
||||
<div v-else><AppIcon name="DownOutlined" /> 展开</div>
|
||||
</a-button> -->
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="() => refInfo?.open()"
|
||||
v-if="power.insert"
|
||||
>
|
||||
<template #icon>
|
||||
<AppIcon name="PlusOutlined" />
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList()"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
v-if="power.delete"
|
||||
>
|
||||
<a-button type="primary" danger>
|
||||
<template #icon>
|
||||
<AppIcon name="DeleteOutlined" />
|
||||
</template>
|
||||
批量删除
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<!-- toolbar-right -->
|
||||
<template #toolbar-right>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="exportExcel()"
|
||||
>导出 Excel</a-menu-item
|
||||
>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button> 更多 <AppIcon name="ellipsis-outlined" /> </a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!-- table-col -->
|
||||
<template #table-col>
|
||||
<template
|
||||
v-for="item,index in state.columns.filter((w:any) => w.dataIndex !== 'id' && w.show)"
|
||||
:key="item.dataIndex"
|
||||
>
|
||||
<a-table-column
|
||||
:title="item.title"
|
||||
:width="item.width"
|
||||
:data-index="item.dataIndex"
|
||||
:sorter="item.sort ? { multiple: index + 1 } : false"
|
||||
/>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<a-table-column
|
||||
title="操作"
|
||||
data-index="id"
|
||||
width="200px"
|
||||
fixed="right"
|
||||
v-if="power.update || power.delete"
|
||||
>
|
||||
<template #default="{ record }">
|
||||
<a-button
|
||||
type="link"
|
||||
@click="() => refInfo?.open(record.id)"
|
||||
v-if="power.update"
|
||||
>编辑</a-button
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList(record.id)"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
v-if="power.delete"
|
||||
>
|
||||
<a-button type="link" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</TableCurdV1>
|
||||
<!-- Info -->
|
||||
<Info ref="refInfo" :onSuccess="() => findList()" />
|
||||
</PageContainerGame>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_SevenDaySignIn_RewardService from "@/services/apps/App/T_SevenDaySignIn_RewardService";
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: string = "") => {
|
||||
state.visible = true;
|
||||
if (state.visible) {
|
||||
state.vm.id = key;
|
||||
}
|
||||
refForm.value?.resetFields();
|
||||
//初始化表单数据
|
||||
state.loading = true;
|
||||
T_SevenDaySignIn_RewardService.findForm(key).then((res) => {
|
||||
state.loading = false;
|
||||
if (res.code != 200) return;
|
||||
state.vm = res.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
*保存数据
|
||||
*/
|
||||
function save() {
|
||||
refForm.value?.validate().then(async () => {
|
||||
try{
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignIn_RewardService.saveForm(state.vm.id, state.vm.form);
|
||||
state.loading = false;
|
||||
if (result.code !=200) return;
|
||||
Tools.message.success("操作成功!");
|
||||
props.onSuccess();
|
||||
state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal v-model:open="state.visible" :title="state.vm.id ? '编辑' : '新建'" centered @ok="state.visible = false" :maskClosable="false" :width="900">
|
||||
<template #footer>
|
||||
<a-button type="primary" :loading="state.loading" @click="save()"> 提交</a-button>
|
||||
<a-button @click="state.visible = false">关闭</a-button>
|
||||
</template>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-form ref="refForm" layout="vertical" :model="state.vm.form">
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="七天签到id" name="signinId" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.signinId" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="奖励类型" name="currencyType" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.currencyType" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item label="奖励数量" name="awardNum" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.awardNum" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
311
admin-client/src/views/Apps/App/T_SevenDaySignIns/Index.vue
Normal file
311
admin-client/src/views/Apps/App/T_SevenDaySignIns/Index.vue
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import { useAuthority } from "@/utils/Authority";
|
||||
import AppIcon from "@/core/components/AppIcon.vue";
|
||||
import Info from "./Info.vue";
|
||||
import SevenRawards from "./SevenRawards.vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import PageContainerGame from "@/core/components/PageContainerGame.vue";
|
||||
import TableCurdV1 from "@/core/components/curd/TableCurdV1.vue";
|
||||
import T_SevenDaySignInService from "@/services/apps/App/T_SevenDaySignInService";
|
||||
|
||||
defineOptions({ name: "t_SevenDaySignInIndex" });
|
||||
var columns = [
|
||||
{
|
||||
dataIndex: "name",
|
||||
title: "名称",
|
||||
show: true,
|
||||
width: 40,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "imageId",
|
||||
title: "签到图片",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "orderId",
|
||||
title: "排序",
|
||||
show: true,
|
||||
width: 40,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "createTime",
|
||||
title: "创建时间",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "updateTime",
|
||||
title: "修改时间",
|
||||
show: true,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: "remark",
|
||||
title: "备注",
|
||||
show: true,
|
||||
width: 40,
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
const state = reactive({
|
||||
search: {
|
||||
state: true,
|
||||
vm: {},
|
||||
sort: [] as any[],
|
||||
},
|
||||
loading: false,
|
||||
page: 1,
|
||||
size: 50,
|
||||
total: 100,
|
||||
columns: [] as any,
|
||||
data: [] as any,
|
||||
});
|
||||
|
||||
//权限
|
||||
const power = useAuthority();
|
||||
//表格
|
||||
const refTableCurd = ref<InstanceType<typeof TableCurdV1>>();
|
||||
//表单操作对象
|
||||
const refInfo = ref<InstanceType<typeof Info>>();
|
||||
const refSevenRawards = ref<InstanceType<typeof SevenRawards>>();
|
||||
//检索表单
|
||||
const refSearchForm = ref<FormInstance>();
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
onMounted(() => {
|
||||
findList();
|
||||
});
|
||||
|
||||
/**
|
||||
*获取数据
|
||||
*/
|
||||
async function findList() {
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignInService.findList(
|
||||
state.page,
|
||||
state.size,
|
||||
state.search.vm,
|
||||
state.search.sort
|
||||
);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
state.page = result.data.page;
|
||||
state.size = result.data.size;
|
||||
state.total = result.data.total;
|
||||
state.columns = columns; // result.data.columns;
|
||||
state.data = result.data.dataSource;
|
||||
// state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param id
|
||||
*/
|
||||
async function deleteList(id?: string) {
|
||||
let ids: string[] = [];
|
||||
if (id) {
|
||||
ids.push(id);
|
||||
} else {
|
||||
ids = refTableCurd.value?.getSelectedRowKeys() ?? [];
|
||||
}
|
||||
|
||||
if (ids.length == 0) return Tools.message.error("请选择要删除的行!");
|
||||
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignInService.deleteList(ids);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("删除成功!");
|
||||
findList();
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
function exportExcel() {
|
||||
T_SevenDaySignInService.exportExcel(state.search.vm, state.search.sort);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<PageContainerGame>
|
||||
<TableCurdV1
|
||||
ref="refTableCurd"
|
||||
:config="state"
|
||||
@change="
|
||||
(changeTable) => {
|
||||
state.page = changeTable.pagination.current ?? 1;
|
||||
state.size = changeTable.pagination.pageSize ?? state.size;
|
||||
state.search.sort =
|
||||
changeTable.sorter instanceof Array
|
||||
? [...changeTable.sorter]
|
||||
: [changeTable.sorter];
|
||||
findList();
|
||||
}
|
||||
"
|
||||
@show-size-change="
|
||||
({ current, size }) => {
|
||||
state.page = current == 0 ? 1 : current;
|
||||
state.size = size;
|
||||
findList();
|
||||
}
|
||||
"
|
||||
>
|
||||
<!-- search -->
|
||||
<template #search>
|
||||
<a-form
|
||||
ref="refSearchForm"
|
||||
:model="state.search.vm"
|
||||
v-if="power.search"
|
||||
>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<!--button-->
|
||||
<a-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="text-right">
|
||||
<a-space :size="8">
|
||||
<a-button
|
||||
@click="
|
||||
state.page = 1;
|
||||
refSearchForm?.resetFields();
|
||||
findList();
|
||||
"
|
||||
>
|
||||
重置
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="
|
||||
state.page = 1;
|
||||
findList();
|
||||
"
|
||||
>
|
||||
查询
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
<!-- toolbar-left -->
|
||||
<template #toolbar-left>
|
||||
<!-- <a-button @click="state.search.state = !state.search.state" v-if="power.search">
|
||||
<div v-if="state.search.state"><AppIcon name="UpOutlined" /> 收起</div>
|
||||
<div v-else><AppIcon name="DownOutlined" /> 展开</div>
|
||||
</a-button> -->
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="() => refInfo?.open()"
|
||||
v-if="power.insert"
|
||||
>
|
||||
<template #icon>
|
||||
<AppIcon name="PlusOutlined" />
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList()"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
v-if="power.delete"
|
||||
>
|
||||
<a-button type="primary" danger>
|
||||
<template #icon>
|
||||
<AppIcon name="DeleteOutlined" />
|
||||
</template>
|
||||
批量删除
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<!-- toolbar-right -->
|
||||
<template #toolbar-right>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="exportExcel()"
|
||||
>导出 Excel</a-menu-item
|
||||
>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button> 更多 <AppIcon name="ellipsis-outlined" /> </a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!-- table-col -->
|
||||
<template #table-col>
|
||||
<template
|
||||
v-for="item,index in state.columns.filter((w:any) => w.dataIndex !== 'id' && w.show)"
|
||||
:key="item.dataIndex"
|
||||
>
|
||||
<a-table-column
|
||||
:title="item.title"
|
||||
:width="item.width"
|
||||
:data-index="item.dataIndex"
|
||||
:sorter="item.sort ? { multiple: index + 1 } : false"
|
||||
/>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<a-table-column
|
||||
title="操作"
|
||||
data-index="id"
|
||||
width="200px"
|
||||
fixed="right"
|
||||
v-if="power.update || power.delete"
|
||||
>
|
||||
<template #default="{ record }">
|
||||
<a-button
|
||||
type="link"
|
||||
@click="() => refSevenRawards?.open(record.id)"
|
||||
v-if="power.update"
|
||||
>设置奖励</a-button
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a-button
|
||||
type="link"
|
||||
@click="() => refInfo?.open(record.id)"
|
||||
v-if="power.update"
|
||||
>编辑</a-button
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList(record.id)"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
v-if="power.delete"
|
||||
>
|
||||
<a-button type="link" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</TableCurdV1>
|
||||
<!-- Info -->
|
||||
<Info ref="refInfo" :onSuccess="() => findList()" />
|
||||
<SevenRawards
|
||||
ref="refSevenRawards"
|
||||
:onSuccess="() => findList()"
|
||||
></SevenRawards>
|
||||
</PageContainerGame>
|
||||
</template>
|
||||
130
admin-client/src/views/Apps/App/T_SevenDaySignIns/Info.vue
Normal file
130
admin-client/src/views/Apps/App/T_SevenDaySignIns/Info.vue
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_SevenDaySignInService from "@/services/apps/App/T_SevenDaySignInService";
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: string = "") => {
|
||||
state.visible = true;
|
||||
if (state.visible) {
|
||||
state.vm.id = key;
|
||||
}
|
||||
refForm.value?.resetFields();
|
||||
//初始化表单数据
|
||||
state.loading = true;
|
||||
T_SevenDaySignInService.findForm(key).then((res) => {
|
||||
state.loading = false;
|
||||
if (res.code != 200) return;
|
||||
state.vm = res.data;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
*保存数据
|
||||
*/
|
||||
function save() {
|
||||
refForm.value?.validate().then(async () => {
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignInService.saveForm(
|
||||
state.vm.id,
|
||||
state.vm.form
|
||||
);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("操作成功!");
|
||||
props.onSuccess();
|
||||
state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:open="state.visible"
|
||||
:title="state.vm.id ? '编辑' : '新建'"
|
||||
centered
|
||||
@ok="state.visible = false"
|
||||
:maskClosable="false"
|
||||
:width="900"
|
||||
>
|
||||
<template #footer>
|
||||
<a-button type="primary" :loading="state.loading" @click="save()">
|
||||
提交</a-button
|
||||
>
|
||||
<a-button @click="state.visible = false">关闭</a-button>
|
||||
</template>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-form ref="refForm" layout="vertical" :model="state.vm.form">
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="名称"
|
||||
name="name"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="state.vm.form.name"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="排序"
|
||||
name="orderId"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<a-input-number style="width: 99%"
|
||||
v-model:value="state.vm.form.orderId"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item
|
||||
label="签到图片"
|
||||
name="imageId"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<h-image-btn v-model="state.vm.form.imageId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="备注" name="remark">
|
||||
<a-input
|
||||
v-model:value="state.vm.form.remark"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_SevenDaySignIn_RewardService from "@/services/apps/App/T_SevenDaySignIn_RewardService";
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: string = "", signinId: any = 0) => {
|
||||
state.visible = true;
|
||||
if (state.visible) {
|
||||
state.vm.id = key;
|
||||
}
|
||||
refForm.value?.resetFields();
|
||||
//初始化表单数据
|
||||
state.loading = true;
|
||||
T_SevenDaySignIn_RewardService.findForm(key).then((res) => {
|
||||
state.loading = false;
|
||||
if (res.code != 200) return;
|
||||
if (res.data.form.signinId == 0) {
|
||||
res.data.form.signinId = signinId;
|
||||
}
|
||||
state.vm = res.data;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
*保存数据
|
||||
*/
|
||||
function save() {
|
||||
refForm.value?.validate().then(async () => {
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignIn_RewardService.saveForm(
|
||||
state.vm.id,
|
||||
state.vm.form
|
||||
);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("操作成功!");
|
||||
props.onSuccess();
|
||||
state.visible = false;
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:open="state.visible"
|
||||
:title="state.vm.id ? '编辑' : '新建'"
|
||||
centered
|
||||
@ok="state.visible = false"
|
||||
:maskClosable="false"
|
||||
:width="900"
|
||||
>
|
||||
<template #footer>
|
||||
<a-button type="primary" :loading="state.loading" @click="save()">
|
||||
提交</a-button
|
||||
>
|
||||
<a-button @click="state.visible = false">关闭</a-button>
|
||||
</template>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-form ref="refForm" layout="vertical" :model="state.vm.form">
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="奖励类型"
|
||||
name="currencyType"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<h-common-select
|
||||
code="currency_type"
|
||||
v-model="state.vm.form.currencyType"
|
||||
:ShowAll="false"
|
||||
/>
|
||||
<!-- <a-input
|
||||
v-model:value="state.vm.form.currencyType"
|
||||
placeholder="请输入"
|
||||
/> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="奖励数量"
|
||||
name="awardNum"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<a-input-number
|
||||
style="width: 99%"
|
||||
v-model:value="state.vm.form.awardNum"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,164 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import T_SevenDaySignIn_RewardService from "@/services/apps/App/T_SevenDaySignIn_RewardService";
|
||||
// import T_Products_RewardService from "@/services/apps/T_Products_Rewards/T_Products_RewardService";
|
||||
import AppDictionaryCache from "@/core/utils/AppDictionaryCache";
|
||||
import InfoRawards from "./InfoRawards.vue";
|
||||
import type { TableColumnsType } from "ant-design-vue";
|
||||
|
||||
//表单操作对象
|
||||
const refInfoRawards = ref<InstanceType<typeof InfoRawards>>();
|
||||
var currencyCache = null;
|
||||
AppDictionaryCache.getAppDictionary("currency_type")
|
||||
.getDataListSelect()
|
||||
.then((data) => {
|
||||
currencyCache = data;
|
||||
});
|
||||
// AppDictionaryCache.appDictionaryCurrencyCache.getDataList().then((data) => {
|
||||
// currencyCache = data;
|
||||
// });
|
||||
const columns: TableColumnsType = [
|
||||
{
|
||||
title: "奖励类型",
|
||||
width: 10,
|
||||
dataIndex: "currencyType",
|
||||
key: "currencyType",
|
||||
customRender: ({ text, record, index, column }) => {
|
||||
console.log(record, text, currencyCache);
|
||||
var temp = currencyCache.find((it) => it.value == record.currencyType);
|
||||
return temp?.label;
|
||||
},
|
||||
},
|
||||
{ title: "赠送金额", dataIndex: "awardNum", key: "awardNum", width: 10 },
|
||||
{
|
||||
title: "操作",
|
||||
key: "operation",
|
||||
|
||||
width: 10,
|
||||
},
|
||||
];
|
||||
|
||||
interface DataItem {
|
||||
id: number;
|
||||
currencyType: string;
|
||||
money: number;
|
||||
firstChargeMoney: number;
|
||||
}
|
||||
|
||||
const data = reactive([]);
|
||||
|
||||
//定义组件事件
|
||||
const props = defineProps<{ onSuccess: () => void }>();
|
||||
|
||||
const state = reactive({
|
||||
vm: {
|
||||
id: "",
|
||||
form: {} as any,
|
||||
},
|
||||
visible: false,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
//表单实例
|
||||
const refForm = ref<FormInstance>();
|
||||
let _data = null;
|
||||
let _key = null;
|
||||
//向父级导出 函数
|
||||
defineExpose({
|
||||
/**
|
||||
* 打开表单初始化
|
||||
* @param key
|
||||
*/
|
||||
open: (key: number = 0, ldata: any) => {
|
||||
_data = ldata;
|
||||
_key = key;
|
||||
loadData();
|
||||
},
|
||||
});
|
||||
const addReward = () => {
|
||||
console.log(_key);
|
||||
refInfoRawards?.value.open("0", _key);
|
||||
};
|
||||
const loadData = () => {
|
||||
data.splice(0, data.length);
|
||||
state.visible = true;
|
||||
T_SevenDaySignIn_RewardService.getList(_key).then((res) => {
|
||||
console.log(res);
|
||||
if (res != null && res.data != null) {
|
||||
res.data.forEach((element) => {
|
||||
data.push(element);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param id
|
||||
*/
|
||||
async function deleteList(id?: string) {
|
||||
let ids: string[] = [];
|
||||
if (id) {
|
||||
ids.push(id);
|
||||
}
|
||||
|
||||
if (ids.length == 0) return Tools.message.error("请选择要删除的行!");
|
||||
|
||||
try {
|
||||
state.loading = true;
|
||||
const result = await T_SevenDaySignIn_RewardService.deleteList(ids);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("删除成功!");
|
||||
loadData();
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:open="state.visible"
|
||||
:title="state.vm.id ? '编辑奖励' : '新建奖励'"
|
||||
centered
|
||||
@ok="state.visible = false"
|
||||
:width="800"
|
||||
:maskClosable="false"
|
||||
>
|
||||
<div>
|
||||
<a-button type="primary" @click="addReward">添加</a-button>
|
||||
</div>
|
||||
<a-spin :spinning="state.loading">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
:bordered="true"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 700, y: 300 }"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a
|
||||
href="javascript:;"
|
||||
@click="() => refInfoRawards?.open(record.id, _data)"
|
||||
>编辑</a
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
title="您确定要删除?"
|
||||
@confirm="deleteList(record.id)"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<a class="text-danger">删除</a>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-spin>
|
||||
<InfoRawards ref="refInfoRawards" :onSuccess="() => loadData()" />
|
||||
</a-modal>
|
||||
</template>
|
||||
|
|
@ -5,7 +5,7 @@ namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
|||
/// 通用弹框配置 服务 T_PopupService
|
||||
/// </summary>
|
||||
public class T_PopupService(IServiceProvider serviceProvider)
|
||||
: ApplicationUserService<T_Popup,int,T_Popup,T_Popup>(serviceProvider)
|
||||
: ApplicationUserService<T_Popup, int, T_Popup, T_Popup>(serviceProvider)
|
||||
{
|
||||
|
||||
|
||||
|
|
@ -21,13 +21,26 @@ public class T_PopupService(IServiceProvider serviceProvider)
|
|||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.Name),
|
||||
w => w.Name.Contains(pagingSearchInput.Search.Name ?? ""))
|
||||
//弹框类型
|
||||
.WhereIf(pagingSearchInput.Search?.Type!=null&&pagingSearchInput.Search?.Type>0,
|
||||
w => w.Type== pagingSearchInput.Search.Type)
|
||||
.OrderByDescending(w => w.Id)
|
||||
.WhereIf(pagingSearchInput.Search?.Type != null && pagingSearchInput.Search?.Type > 0,
|
||||
w => w.Type == pagingSearchInput.Search.Type)
|
||||
.OrderBy(w => w.OrderId)
|
||||
.Select(w => new
|
||||
{
|
||||
w.Id,
|
||||
w.TenantId,w.Type,w.Name,w.Text,w.OrderId,w.BgImageId,w.Btn_OK,w.Btn_Close,w.Desc,w.Channel,w.PlatformId,w.IsOnline,w.CreateTime,w.UpdateTime,
|
||||
w.TenantId,
|
||||
w.Type,
|
||||
w.Name,
|
||||
w.Text,
|
||||
w.OrderId,
|
||||
w.BgImageId,
|
||||
w.Btn_OK,
|
||||
w.Btn_Close,
|
||||
w.Desc,
|
||||
w.Channel,
|
||||
w.PlatformId,
|
||||
w.IsOnline,
|
||||
w.CreateTime,
|
||||
w.UpdateTime,
|
||||
})
|
||||
;
|
||||
var result = await Repository.AsPagingViewAsync(query, pagingSearchInput);
|
||||
|
|
@ -35,12 +48,12 @@ public class T_PopupService(IServiceProvider serviceProvider)
|
|||
// 设置列
|
||||
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
|
||||
//result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!);
|
||||
|
||||
|
||||
result
|
||||
.FormatValue(query, w => w.CreateTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd"))
|
||||
.FormatValue(query, w => w.UpdateTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd"))
|
||||
;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 商城表 服务 T_ProductsService
|
||||
/// </summary>
|
||||
public class T_ProductsService(IServiceProvider serviceProvider)
|
||||
: ApplicationUserService<T_Products, int, T_Products, T_Products>(serviceProvider)
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
public async override Task<PagingView> FindListAsync(PagingSearchInput<T_Products> pagingSearchInput)
|
||||
{
|
||||
var query = this.Repository.Select
|
||||
//道具Id
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.ProductId),
|
||||
w => w.ProductId.Contains(pagingSearchInput.Search.ProductId ?? ""))
|
||||
//道具名称
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.ProductName),
|
||||
w => w.ProductName.Contains(pagingSearchInput.Search.ProductName ?? ""))
|
||||
//道具类型
|
||||
.WhereIf(pagingSearchInput.Search?.ProductType != null && pagingSearchInput.Search?.ProductType > 0,
|
||||
w => w.ProductType == pagingSearchInput.Search.ProductType)
|
||||
.OrderBy(w => w.OrderById)
|
||||
.Select(w => new
|
||||
{
|
||||
w.Id,
|
||||
w.TenantId,
|
||||
w.ProductId,
|
||||
w.ProductName,
|
||||
w.ProductType,
|
||||
w.ProductDesc,
|
||||
w.Price,
|
||||
w.ImageId,
|
||||
w.IsEnable,
|
||||
w.IsFirstCharge,
|
||||
w.FirstChargeImageId,
|
||||
w.FirstChargePrice,
|
||||
w.CreateTime,
|
||||
w.UpdateTime,
|
||||
w.OrderById,
|
||||
w.SelectImageId,
|
||||
w.SelectFirstChargeImageId,
|
||||
})
|
||||
;
|
||||
var result = await Repository.AsPagingViewAsync(query, pagingSearchInput);
|
||||
|
||||
// 设置列
|
||||
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
|
||||
//result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!);
|
||||
|
||||
result
|
||||
.FormatValue(query, w => w.CreateTime, (oldValue) => oldValue.ToString("yyyy-MM-dd"))
|
||||
.FormatValue(query, w => w.UpdateTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd"))
|
||||
;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 产品表奖励 服务 T_Products_RewardService
|
||||
/// </summary>
|
||||
public class T_Products_RewardService(IServiceProvider serviceProvider)
|
||||
: ApplicationUserService<T_Products_Reward, int, T_Products_Reward, T_Products_Reward>(serviceProvider)
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
public async override Task<PagingView> FindListAsync(PagingSearchInput<T_Products_Reward> pagingSearchInput)
|
||||
{
|
||||
var query = this.Repository.Select
|
||||
.OrderByDescending(w => w.Id)
|
||||
.Select(w => new
|
||||
{
|
||||
w.Id,
|
||||
w.CurrencyType,
|
||||
w.Money,
|
||||
w.T_ProductId,
|
||||
w.FirstChargeMoney,
|
||||
w.ProductId,
|
||||
w.TenantId,
|
||||
})
|
||||
;
|
||||
var result = await Repository.AsPagingViewAsync(query, pagingSearchInput);
|
||||
|
||||
// 设置列
|
||||
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
|
||||
//result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// </summary>
|
||||
/// <param name="productId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_Products_Reward>> FindListAsync(int productId)
|
||||
{
|
||||
var query = await this.Repository.SelectNoTracking.Where(it => it.T_ProductId == productId).OrderByDescending(w => w.Id).ToListAsync();
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 七日签到配置表 服务 T_SevenDaySignInService
|
||||
/// </summary>
|
||||
public class T_SevenDaySignInService(IServiceProvider serviceProvider)
|
||||
: ApplicationUserService<T_SevenDaySignIn, int, T_SevenDaySignIn, T_SevenDaySignIn>(serviceProvider)
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
public async override Task<PagingView> FindListAsync(PagingSearchInput<T_SevenDaySignIn> pagingSearchInput)
|
||||
{
|
||||
var query = this.Repository.Select
|
||||
.OrderBy(w => w.OrderId)
|
||||
.Select(w => new
|
||||
{
|
||||
w.Id,
|
||||
w.Name,
|
||||
w.ImageId,
|
||||
w.OrderId,
|
||||
w.CreateTime,
|
||||
w.UpdateTime,
|
||||
w.Remark,
|
||||
w.TenantId,
|
||||
})
|
||||
;
|
||||
var result = await Repository.AsPagingViewAsync(query, pagingSearchInput);
|
||||
|
||||
// 设置列
|
||||
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
|
||||
//result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!);
|
||||
|
||||
result
|
||||
.FormatValue(query, w => w.CreateTime, (oldValue) => oldValue.ToString("yyyy-MM-dd"))
|
||||
.FormatValue(query, w => w.UpdateTime, (oldValue) => oldValue.ToString("yyyy-MM-dd"))
|
||||
;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 七日签到奖励配置表 服务 T_SevenDaySignIn_RewardService
|
||||
/// </summary>
|
||||
public class T_SevenDaySignIn_RewardService(IServiceProvider serviceProvider)
|
||||
: ApplicationUserService<T_SevenDaySignIn_Reward, int, T_SevenDaySignIn_Reward, T_SevenDaySignIn_Reward>(serviceProvider)
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
public async override Task<PagingView> FindListAsync(PagingSearchInput<T_SevenDaySignIn_Reward> pagingSearchInput)
|
||||
{
|
||||
var query = this.Repository.Select
|
||||
.OrderByDescending(w => w.Id)
|
||||
.Select(w => new
|
||||
{
|
||||
w.Id,
|
||||
w.SigninId,
|
||||
w.CurrencyType,
|
||||
w.AwardNum,
|
||||
w.TenantId,
|
||||
})
|
||||
;
|
||||
var result = await Repository.AsPagingViewAsync(query, pagingSearchInput);
|
||||
|
||||
// 设置列
|
||||
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
|
||||
//result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// </summary>
|
||||
/// <param name="productId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_SevenDaySignIn_Reward>> FindListAsync(int signinId)
|
||||
{
|
||||
var query = await this.Repository.SelectNoTracking.Where(it => it.SigninId == signinId).OrderByDescending(w => w.Id).ToListAsync();
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -222,6 +222,88 @@
|
|||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_ProductsService">
|
||||
<summary>
|
||||
商城表 服务 T_ProductsService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_ProductsService.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
商城表 服务 T_ProductsService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_ProductsService.FindListAsync(CloudGaming.Shared.Models.PagingViews.PagingSearchInput{CloudGaming.Repository.Game.Entities.App.T_Products})">
|
||||
<summary>
|
||||
获取列表数据
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_Products_RewardService">
|
||||
<summary>
|
||||
产品表奖励 服务 T_Products_RewardService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_Products_RewardService.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
产品表奖励 服务 T_Products_RewardService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_Products_RewardService.FindListAsync(CloudGaming.Shared.Models.PagingViews.PagingSearchInput{CloudGaming.Repository.Game.Entities.App.T_Products_Reward})">
|
||||
<summary>
|
||||
获取列表数据
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_Products_RewardService.FindListAsync(System.Int32)">
|
||||
<summary>
|
||||
获取列表数据
|
||||
</summary>
|
||||
<param name="productId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_SevenDaySignInService">
|
||||
<summary>
|
||||
七日签到配置表 服务 T_SevenDaySignInService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_SevenDaySignInService.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
七日签到配置表 服务 T_SevenDaySignInService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_SevenDaySignInService.FindListAsync(CloudGaming.Shared.Models.PagingViews.PagingSearchInput{CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn})">
|
||||
<summary>
|
||||
获取列表数据
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_SevenDaySignIn_RewardService">
|
||||
<summary>
|
||||
七日签到奖励配置表 服务 T_SevenDaySignIn_RewardService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_SevenDaySignIn_RewardService.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
七日签到奖励配置表 服务 T_SevenDaySignIn_RewardService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_SevenDaySignIn_RewardService.FindListAsync(CloudGaming.Shared.Models.PagingViews.PagingSearchInput{CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn_Reward})">
|
||||
<summary>
|
||||
获取列表数据
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.ApplicationServices.Apps.App.T_SevenDaySignIn_RewardService.FindListAsync(System.Int32)">
|
||||
<summary>
|
||||
获取列表数据
|
||||
</summary>
|
||||
<param name="productId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.ApplicationServices.Apps.Ext.AlipayConfigService">
|
||||
<summary>
|
||||
服务 WeChatConfigService
|
||||
|
|
@ -1726,6 +1808,60 @@
|
|||
通用弹框配置 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.Controllers.Apps.App.T_ProductsController">
|
||||
<summary>
|
||||
商城表 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.Controllers.Apps.App.T_ProductsController.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
商城表 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.Controllers.Apps.App.T_Products_RewardController">
|
||||
<summary>
|
||||
产品表奖励 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.Controllers.Apps.App.T_Products_RewardController.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
产品表奖励 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.Controllers.Apps.App.T_Products_RewardController.FindListAsync(System.Int32)">
|
||||
<summary>
|
||||
获取列表
|
||||
</summary>
|
||||
<param name="signinId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.Controllers.Apps.App.T_SevenDaySignInController">
|
||||
<summary>
|
||||
七日签到配置表 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.Controllers.Apps.App.T_SevenDaySignInController.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
七日签到配置表 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.Controllers.Apps.App.T_SevenDaySignIn_RewardController">
|
||||
<summary>
|
||||
七日签到奖励配置表 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.Controllers.Apps.App.T_SevenDaySignIn_RewardController.#ctor(System.IServiceProvider)">
|
||||
<summary>
|
||||
七日签到奖励配置表 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:CloudGaming.Api.Admin.Controllers.Apps.App.T_SevenDaySignIn_RewardController.FindListAsync(System.Int32)">
|
||||
<summary>
|
||||
获取列表
|
||||
</summary>
|
||||
<param name="signinId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Api.Admin.Controllers.Apps.Ext.AlipayConfigController">
|
||||
<summary>
|
||||
控制器
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
using CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
namespace CloudGaming.Api.Admin.Controllers.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 商城表 控制器
|
||||
/// </summary>
|
||||
[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "商城表")]
|
||||
public class T_ProductsController(IServiceProvider serviceProvider)
|
||||
: AdminGameControllerBase<T_ProductsService,T_Products,int,T_Products,T_Products>(serviceProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
using CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
namespace CloudGaming.Api.Admin.Controllers.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 产品表奖励 控制器
|
||||
/// </summary>
|
||||
[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "产品表奖励")]
|
||||
public class T_Products_RewardController(IServiceProvider serviceProvider)
|
||||
: AdminGameControllerBase<T_Products_RewardService, T_Products_Reward, int, T_Products_Reward, T_Products_Reward>(serviceProvider)
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取列表
|
||||
/// </summary>
|
||||
/// <param name="signinId"></param>
|
||||
/// <returns></returns>
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Display, DisplayName = "查看数据")]
|
||||
[HttpGet("{productId?}")]
|
||||
public async Task<List<T_Products_Reward>> FindListAsync([FromRoute] int productId)
|
||||
{
|
||||
return await this.Service.FindListAsync(productId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
using CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
namespace CloudGaming.Api.Admin.Controllers.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 七日签到配置表 控制器
|
||||
/// </summary>
|
||||
[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "七日签到配置表")]
|
||||
public class T_SevenDaySignInController(IServiceProvider serviceProvider)
|
||||
: AdminGameControllerBase<T_SevenDaySignInService,T_SevenDaySignIn,int,T_SevenDaySignIn,T_SevenDaySignIn>(serviceProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
using CloudGaming.Repository.Game.Entities.App;
|
||||
using CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
||||
using Org.BouncyCastle.Cms;
|
||||
namespace CloudGaming.Api.Admin.Controllers.Apps.App;
|
||||
|
||||
/// <summary>
|
||||
/// 七日签到奖励配置表 控制器
|
||||
/// </summary>
|
||||
[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "七日签到奖励配置表")]
|
||||
public class T_SevenDaySignIn_RewardController(IServiceProvider serviceProvider)
|
||||
: AdminGameControllerBase<T_SevenDaySignIn_RewardService,T_SevenDaySignIn_Reward,int,T_SevenDaySignIn_Reward,T_SevenDaySignIn_Reward>(serviceProvider)
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表
|
||||
/// </summary>
|
||||
/// <param name="signinId"></param>
|
||||
/// <returns></returns>
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Display, DisplayName = "查看数据")]
|
||||
[HttpGet("{signinId?}")]
|
||||
public async Task<List<T_SevenDaySignIn_Reward>> FindListAsync([FromRoute] int signinId)
|
||||
{
|
||||
return await this.Service.FindListAsync(signinId);
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ public class T_App_ImageController(IServiceProvider serviceProvider)
|
|||
var url = await Service.GetImageUrl(imageId, language);
|
||||
if (process == 0)
|
||||
{
|
||||
url += "?x-oss-process=image/quality,q_1/resize,h_40";
|
||||
url += "?x-oss-process=image/quality,q_1/resize,w_100";
|
||||
}
|
||||
return Redirect(url);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
//是否监控EFCore程序
|
||||
"IsMonitorEFCore": false,
|
||||
// 连接字符串 - mysql
|
||||
"ConnectionString": "Server=192.168.1.17;Database=HZY;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;"
|
||||
"ConnectionString": "Server=192.168.1.18;Database=HZY;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;"
|
||||
//// 连接字符串 - sqlserver
|
||||
//"ConnectionString": "Server=.;Database=hzy_microservices_sqlserver_20230227;User ID=sa;Password=123456;MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;",
|
||||
//// 连接字符串 - postgresql
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ public class BaseDbContext : DbContext, IBaseDbContext
|
|||
{
|
||||
_appConfig = new AppConfig
|
||||
{
|
||||
ExtConnectionString = "Server=192.168.1.17;Database=CloudGamingCBT;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
GameConnectionString = "Server=192.168.1.17;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
PhoneConnectionString = "Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
UserConnectionString = "Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
ExtConnectionString = "Server=192.168.1.18;Database=CloudGamingCBT;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
GameConnectionString = "Server=192.168.1.18;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
PhoneConnectionString = "Server=192.168.1.18;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
UserConnectionString = "Server=192.168.1.18;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
};
|
||||
}
|
||||
_appDataBaseType = appDataBaseType;
|
||||
|
|
|
|||
|
|
@ -459,6 +459,171 @@
|
|||
按钮延迟显示 => 备注: 延迟几秒显示按钮
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Repository.Game.Entities.App.T_Products">
|
||||
<summary>
|
||||
商城表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.ProductId">
|
||||
<summary>
|
||||
道具Id => 备注: 道具Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.ProductName">
|
||||
<summary>
|
||||
道具名称 => 备注: 道具名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.ProductType">
|
||||
<summary>
|
||||
道具类型 => 备注: 道具类型,0我的商城
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.ProductDesc">
|
||||
<summary>
|
||||
道具描述 => 备注: 道具描述
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.Price">
|
||||
<summary>
|
||||
价格 => 备注: 价格
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.ImageId">
|
||||
<summary>
|
||||
图片· => 备注: 道具图片配置 图片id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.IsEnable">
|
||||
<summary>
|
||||
是否启用 => 备注: 是否启用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.IsFirstCharge">
|
||||
<summary>
|
||||
是否有首充 => 备注: 是否有首充
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.FirstChargeImageId">
|
||||
<summary>
|
||||
首充图片 => 备注: 首充图片
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.FirstChargePrice">
|
||||
<summary>
|
||||
首充价格 => 备注: 首充价格
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.CreateTime">
|
||||
<summary>
|
||||
创建时间 => 备注: 创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.UpdateTime">
|
||||
<summary>
|
||||
更新时间 => 备注: 更新时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.OrderById">
|
||||
<summary>
|
||||
排序 => 备注: 排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.SelectImageId">
|
||||
<summary>
|
||||
选中图片 => 备注: 选中图片
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products.SelectFirstChargeImageId">
|
||||
<summary>
|
||||
选中首充图片 => 备注: 选中首充图片
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Repository.Game.Entities.App.T_Products_Reward">
|
||||
<summary>
|
||||
产品表奖励
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products_Reward.CurrencyType">
|
||||
<summary>
|
||||
奖励类型 => 备注: 奖励类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products_Reward.Money">
|
||||
<summary>
|
||||
奖励 => 备注: 奖励
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products_Reward.T_ProductId">
|
||||
<summary>
|
||||
所属商品 => 备注: 所属商品
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products_Reward.FirstChargeMoney">
|
||||
<summary>
|
||||
首充奖励 => 备注: 首充送多少奖励
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_Products_Reward.ProductId">
|
||||
<summary>
|
||||
所属商品 => 备注: 所属商品
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn">
|
||||
<summary>
|
||||
七日签到配置表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn.Name">
|
||||
<summary>
|
||||
名称 => 备注: 名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn.ImageId">
|
||||
<summary>
|
||||
签到图片 => 备注: 签到图片
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn.OrderId">
|
||||
<summary>
|
||||
排序 => 备注: 排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn.CreateTime">
|
||||
<summary>
|
||||
创建时间 => 备注: 创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn.UpdateTime">
|
||||
<summary>
|
||||
修改时间 => 备注: 修改时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn.Remark">
|
||||
<summary>
|
||||
备注 => 备注: 备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn_Reward">
|
||||
<summary>
|
||||
七日签到奖励配置表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn_Reward.SigninId">
|
||||
<summary>
|
||||
七天签到id => 备注: 七天签到id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn_Reward.CurrencyType">
|
||||
<summary>
|
||||
奖励类型 => 备注: 奖励类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CloudGaming.Repository.Game.Entities.App.T_SevenDaySignIn_Reward.AwardNum">
|
||||
<summary>
|
||||
奖励数量 => 备注: 奖励数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CloudGaming.Repository.Game.Entities.Ext.T_App_Image">
|
||||
<summary>
|
||||
图片列表
|
||||
|
|
|
|||
|
|
@ -0,0 +1,102 @@
|
|||
namespace CloudGaming.Repository.Game.Entities.App;
|
||||
|
||||
/// <summary>
|
||||
/// 商城表
|
||||
/// </summary>
|
||||
[Table("T_Products")]
|
||||
[EntityDescription(NameRuleMode = NameRuleMode.TableName, NameRuleType= NameRuleType.UpperSnakeCase)]
|
||||
public class T_Products : DefaultGameAppEntity
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 道具Id => 备注: 道具Id
|
||||
/// </summary>
|
||||
public string? ProductId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 道具名称 => 备注: 道具名称
|
||||
/// </summary>
|
||||
public string? ProductName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 道具类型 => 备注: 道具类型,0我的商城
|
||||
/// </summary>
|
||||
public Int32 ProductType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 道具描述 => 备注: 道具描述
|
||||
/// </summary>
|
||||
public string? ProductDesc { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 价格 => 备注: 价格
|
||||
/// </summary>
|
||||
public Decimal Price { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 图片· => 备注: 道具图片配置 图片id
|
||||
/// </summary>
|
||||
public Int32 ImageId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用 => 备注: 是否启用
|
||||
/// </summary>
|
||||
public Boolean IsEnable { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否有首充 => 备注: 是否有首充
|
||||
/// </summary>
|
||||
public Boolean IsFirstCharge { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 首充图片 => 备注: 首充图片
|
||||
/// </summary>
|
||||
public Int32? FirstChargeImageId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 首充价格 => 备注: 首充价格
|
||||
/// </summary>
|
||||
public Decimal? FirstChargePrice { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间 => 备注: 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间 => 备注: 更新时间
|
||||
/// </summary>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序 => 备注: 排序
|
||||
/// </summary>
|
||||
public Int32? OrderById { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 选中图片 => 备注: 选中图片
|
||||
/// </summary>
|
||||
public Int32? SelectImageId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 选中首充图片 => 备注: 选中首充图片
|
||||
/// </summary>
|
||||
public Int32? SelectFirstChargeImageId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
namespace CloudGaming.Repository.Game.Entities.App;
|
||||
|
||||
/// <summary>
|
||||
/// 产品表奖励
|
||||
/// </summary>
|
||||
[Table("T_Products_Reward")]
|
||||
[EntityDescription(NameRuleMode = NameRuleMode.TableName, NameRuleType= NameRuleType.UpperSnakeCase)]
|
||||
public class T_Products_Reward : DefaultGameAppEntity
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 奖励类型 => 备注: 奖励类型
|
||||
/// </summary>
|
||||
public Int32 CurrencyType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 奖励 => 备注: 奖励
|
||||
/// </summary>
|
||||
public Int32 Money { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属商品 => 备注: 所属商品
|
||||
/// </summary>
|
||||
public Int32? T_ProductId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 首充奖励 => 备注: 首充送多少奖励
|
||||
/// </summary>
|
||||
public Int32? FirstChargeMoney { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属商品 => 备注: 所属商品
|
||||
/// </summary>
|
||||
public string? ProductId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
namespace CloudGaming.Repository.Game.Entities.App;
|
||||
|
||||
/// <summary>
|
||||
/// 七日签到配置表
|
||||
/// </summary>
|
||||
[Table("T_SevenDaySignIn")]
|
||||
[EntityDescription(NameRuleMode = NameRuleMode.TableName, NameRuleType= NameRuleType.UpperSnakeCase)]
|
||||
public class T_SevenDaySignIn : DefaultGameAppEntity
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 名称 => 备注: 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 签到图片 => 备注: 签到图片
|
||||
/// </summary>
|
||||
public Int32 ImageId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序 => 备注: 排序
|
||||
/// </summary>
|
||||
public Int32 OrderId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间 => 备注: 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间 => 备注: 修改时间
|
||||
/// </summary>
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备注 => 备注: 备注
|
||||
/// </summary>
|
||||
public string? Remark { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
namespace CloudGaming.Repository.Game.Entities.App;
|
||||
|
||||
/// <summary>
|
||||
/// 七日签到奖励配置表
|
||||
/// </summary>
|
||||
[Table("T_SevenDaySignIn_Reward")]
|
||||
[EntityDescription(NameRuleMode = NameRuleMode.TableName, NameRuleType= NameRuleType.UpperSnakeCase)]
|
||||
public class T_SevenDaySignIn_Reward : DefaultGameAppEntity
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 七天签到id => 备注: 七天签到id
|
||||
/// </summary>
|
||||
public Int32 SigninId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 奖励类型 => 备注: 奖励类型
|
||||
/// </summary>
|
||||
public Int32 CurrencyType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 奖励数量 => 备注: 奖励数量
|
||||
/// </summary>
|
||||
public Int32 AwardNum { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -25,10 +25,10 @@ public class GameRepositoryStartup : StartupModule<GameRepositoryStartup>
|
|||
var webHostEnvironment = webApplicationBuilder.Environment;
|
||||
var _appConfig = new AppConfig
|
||||
{
|
||||
ExtConnectionString = "Server=192.168.1.17;Database=CloudGamingCBT;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
GameConnectionString = "Server=192.168.1.17;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
PhoneConnectionString = "Server=192.168.1.17;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
UserConnectionString = "Server=192.168.1.17;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
ExtConnectionString = "Server=192.168.1.18;Database=CloudGamingCBT;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
GameConnectionString = "Server=192.168.1.18;Database=CloudGamingGame;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
PhoneConnectionString = "Server=192.168.1.18;Database=CloudGamingPhone;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
UserConnectionString = "Server=192.168.1.18;Database=CloudGamingUser;User Id=sa;Password=Dbt@com@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;",
|
||||
};
|
||||
|
||||
AddDbContextAndRepositories<GameDbContext>(services, _appConfig, AppDataBaseType.Game);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user