提交代码
This commit is contained in:
parent
a6a156f4be
commit
7a0ee081cb
|
|
@ -21,11 +21,18 @@
|
|||
@change="handleChange"
|
||||
></a-select>
|
||||
</a-col>
|
||||
|
||||
<a-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4" >
|
||||
|
||||
<a-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
|
||||
<a-button type="primary" @click="fileupload">上传</a-button>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="margin-top:10px">
|
||||
<a-col
|
||||
:xs="24"
|
||||
:sm="24"
|
||||
:md="24"
|
||||
:lg="24"
|
||||
:xl="24"
|
||||
style="margin-top: 10px"
|
||||
>
|
||||
<a-collapse>
|
||||
<a-collapse-panel key="1" header="预览图片">
|
||||
<p>
|
||||
|
|
@ -47,6 +54,7 @@ import Tools from "@/core/utils/Tools";
|
|||
// 使用 withDefaults 添加默认值
|
||||
const props = defineProps<{
|
||||
modelValue: number;
|
||||
tenantId: string | undefined;
|
||||
}>();
|
||||
console.log(props.modelValue);
|
||||
|
||||
|
|
@ -70,16 +78,13 @@ function updateValue(event: any) {
|
|||
}
|
||||
|
||||
function updateValueNumber(event: number) {
|
||||
|
||||
|
||||
emits("update:modelValue", event);
|
||||
}
|
||||
|
||||
async function fileupload() {
|
||||
const response = await Tools.imageFileUpload(0, 0);
|
||||
const response = await Tools.imageFileUpload(0, 0, "", props.tenantId);
|
||||
console.log(response);
|
||||
updateValueNumber(response.imageId);
|
||||
|
||||
}
|
||||
let timeout: any;
|
||||
let currentValue = "";
|
||||
|
|
@ -119,7 +124,7 @@ const handleSearch = (val: string) => {
|
|||
const handleChange = (val: number) => {
|
||||
console.log(val);
|
||||
updateValueNumber(val);
|
||||
// emits("update:modelValue", val);
|
||||
// emits("update:modelValue", val);
|
||||
// props.modelValue = 1;
|
||||
// value.value = "";
|
||||
// fetch(val, (d: any[]) => (data.value = d));
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import Cookies from "universal-cookie";
|
|||
import AppConsts from "../../utils/AppConsts";
|
||||
import TImageConfigService from "@/services/apps/T_Image_Configs/TImageConfigService";
|
||||
import COS from "cos-js-sdk-v5";
|
||||
import { log } from "@antv/g2plot/lib/utils";
|
||||
/**
|
||||
* 程序工具类
|
||||
*
|
||||
|
|
@ -337,12 +338,12 @@ class Tools {
|
|||
* @returns
|
||||
*/
|
||||
static generateGUID() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||
var r = Math.random() * 16 | 0,
|
||||
v = c == 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||
var r = Math.random() * 16 | 0,
|
||||
v = c == 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 uuid guid
|
||||
|
|
@ -419,7 +420,7 @@ class Tools {
|
|||
Key: _tempFilePaht,
|
||||
Body: file,
|
||||
SliceSize: 1024 * 1024, // 大于1mb才进行分块上传
|
||||
onTaskReady: function (tid) {},
|
||||
onTaskReady: function (tid) { },
|
||||
onProgress: function (progressData) {
|
||||
console.log("上传中", JSON.stringify(progressData));
|
||||
},
|
||||
|
|
@ -486,14 +487,15 @@ class Tools {
|
|||
static async imageFileUpload(
|
||||
imgaeId: number,
|
||||
imageType: number,
|
||||
modelName?: string
|
||||
modelName?: string,
|
||||
tenantId?: string,
|
||||
): Promise<any> {
|
||||
//#region 创建文件选择器
|
||||
const file = await this.selectFile();
|
||||
if (file == null) {
|
||||
return null;
|
||||
}
|
||||
return await this.imageUpdate(file, imgaeId, imageType, modelName);
|
||||
return await this.imageUpdate(file, imgaeId, imageType, modelName, tenantId);
|
||||
//#endregion
|
||||
}
|
||||
/**
|
||||
|
|
@ -508,7 +510,8 @@ class Tools {
|
|||
file: File,
|
||||
imgaeId: number,
|
||||
imageType: number,
|
||||
modelName?: string
|
||||
modelName?: string,
|
||||
tenantId?: string,
|
||||
): Promise<any> {
|
||||
const key = "updatable";
|
||||
AntdvMessage.loading({ content: "上传图片中", key });
|
||||
|
|
@ -535,6 +538,11 @@ class Tools {
|
|||
_data.form.region = fileInfo._cosData.bucket;
|
||||
// _data.form.imageId = imgaeId;
|
||||
_data.form.imageType = imageType;
|
||||
if (tenantId != null) {
|
||||
console.log('租户==》', tenantId);
|
||||
|
||||
_data.form.tenantId = tenantId;
|
||||
}
|
||||
//#endregion
|
||||
const result = await TImageConfigService.saveForm(_data.id, _data.form);
|
||||
AntdvMessage.success({ content: "上传成功", key, duration: 2 });
|
||||
|
|
|
|||
74
admin-client/src/services/apps/M_Songss/M_SongsService.ts
Normal file
74
admin-client/src/services/apps/M_Songss/M_SongsService.ts
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
import Http from "@/core/utils/Http";
|
||||
|
||||
/**
|
||||
* M_Songs服务
|
||||
*/
|
||||
export default class M_SongsService {
|
||||
|
||||
static urlPrefix = "/api/v1/admin/M_Songs";
|
||||
|
||||
/**
|
||||
* 获取数据列表
|
||||
* @param current
|
||||
* @param pageSize
|
||||
* @param search
|
||||
* @param searchSort
|
||||
* @returns
|
||||
*/
|
||||
static findList(current: number, pageSize: number, search: any = {}, searchSort: any[] = []) {
|
||||
return Http.post(`${this.urlPrefix}/findList`, {
|
||||
page: current,
|
||||
size: pageSize,
|
||||
search,
|
||||
searchSort
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除集合数据
|
||||
*
|
||||
* @param ids
|
||||
* @returns
|
||||
*/
|
||||
static deleteList(ids: string[]) {
|
||||
return Http.post(`${this.urlPrefix}/deleteList`, ids)
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询表单
|
||||
*
|
||||
* @param id
|
||||
* @returns
|
||||
*/
|
||||
static findForm(id?: string | undefined) {
|
||||
return Http.get(`${this.urlPrefix}/findForm${(id ? '/' + id : '')}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存表单数据
|
||||
*
|
||||
* @param id
|
||||
* @param formData
|
||||
* @returns
|
||||
*/
|
||||
static saveForm(id: string | undefined, formData: any) {
|
||||
return Http.post(`${this.urlPrefix}/${id ? 'update' : 'create'}`, formData)
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出 excel
|
||||
*
|
||||
* @param search
|
||||
* @param searchSort
|
||||
* @returns
|
||||
*/
|
||||
static exportExcel(search: any = {}, searchSort: any[] = []) {
|
||||
return Http.download(`${this.urlPrefix}/exportExcel`, {
|
||||
page: -1,
|
||||
size: -1,
|
||||
search,
|
||||
searchSort
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
232
admin-client/src/views/apps/M_Songss/Index.vue
Normal file
232
admin-client/src/views/apps/M_Songss/Index.vue
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
<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 PageContainer from "@/core/components/PageContainer.vue";
|
||||
import TableCurd from "@/core/components/curd/TableCurd.vue";
|
||||
import M_SongsService from "@/services/apps/M_Songss/M_SongsService";
|
||||
|
||||
defineOptions({ name: "M_SongsIndex" });
|
||||
|
||||
const state = reactive({
|
||||
search: {
|
||||
state: false,
|
||||
vm: {
|
||||
name: 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 TableCurd>>();
|
||||
//表单操作对象
|
||||
const refInfo = ref<InstanceType<typeof Info>>();
|
||||
//检索表单
|
||||
const refSearchForm = ref<FormInstance>();
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
onMounted(() => {
|
||||
findList();
|
||||
});
|
||||
|
||||
/**
|
||||
*获取数据
|
||||
*/
|
||||
async function findList() {
|
||||
try{
|
||||
state.loading = true;
|
||||
let keys = Object.keys(state.search.vm);
|
||||
keys.map(k => {
|
||||
if (state.search.vm[k] == null || state.search.vm[k] == "") {
|
||||
delete state.search.vm[k];
|
||||
}
|
||||
});
|
||||
const result = await M_SongsService.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 = 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 M_SongsService.deleteList(ids);
|
||||
state.loading = false;
|
||||
if (result.code != 200) return;
|
||||
Tools.message.success("删除成功!");
|
||||
findList();
|
||||
} catch (error) {
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
function exportExcel() {
|
||||
M_SongsService.exportExcel(state.search.vm, state.search.sort);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<PageContainer>
|
||||
<TableCurd
|
||||
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="24" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
<a-form-item class="mb-0" name="name" label="名称">
|
||||
<a-input v-model:value="state.search.vm.name" placeholder="名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
-->
|
||||
<a-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
<a-form-item class="mb-0" name="tenantId" label="项目">
|
||||
<hm-tenant-select v-model:value="state.search.vm.tenantId" :ShowAll="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--button-->
|
||||
<a-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" 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>
|
||||
<!-- 列设置 -->
|
||||
<a-popover>
|
||||
<template #content>
|
||||
<div v-for="item in state.columns.filter((w:any) => w.fieldName.substr(0, 1) != '_')">
|
||||
<a-checkbox v-model:checked="item.show">{{ item.title }}</a-checkbox>
|
||||
</div>
|
||||
</template>
|
||||
<a-button type="text">
|
||||
<template #icon><AppIcon name="setting-outlined" /> </template>
|
||||
</a-button>
|
||||
</a-popover>
|
||||
</template>
|
||||
<!-- table-col -->
|
||||
<template #table-col>
|
||||
<template v-for="item,index in state.columns.filter((w:any) => w.fieldName !== 'id' && w.show)" :key="item.fieldName">
|
||||
<a-table-column :title="item.title" :data-index="item.fieldName" :sorter="item.sort ? { multiple: index + 1 } : false" />
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<a-table-column title="操作" data-index="id" v-if="power.update || power.delete" width="200px" fixed="right">
|
||||
<template #default="{ record }">
|
||||
<a href="javascript:;" @click="() => refInfo?.open(record.id)" v-if="power.update">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="您确定要删除?" @confirm="deleteList(record.id)" okText="确定" cancelText="取消" v-if="power.delete">
|
||||
<a class="text-danger">删除</a>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</TableCurd>
|
||||
<!-- Info -->
|
||||
<Info ref="refInfo" :onSuccess="() => findList()" />
|
||||
</PageContainer>
|
||||
</template>
|
||||
147
admin-client/src/views/apps/M_Songss/Info.vue
Normal file
147
admin-client/src/views/apps/M_Songss/Info.vue
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
<script lang="ts" setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { FormInstance } from "ant-design-vue";
|
||||
import Tools from "@/core/utils/Tools";
|
||||
import M_SongsService from "@/services/apps/M_Songss/M_SongsService";
|
||||
|
||||
//定义组件事件
|
||||
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;
|
||||
M_SongsService.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 M_SongsService.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" :width="800">
|
||||
<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="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="项目" name="tenantId">
|
||||
<hm-tenant-select v-model:value="state.vm.form.tenantId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="歌曲名称" name="title" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.title" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="用户Id" name="authorId" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.authorId" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="音乐风格" name="genre" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.genre" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="歌词内容" name="lyrics" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.lyrics" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="歌曲是否公开展示" name="isPublic" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.isPublic" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="歌曲创建时间" name="creationTimestamp" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.creationTimestamp" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="歌曲时长" name="duration" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.duration" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="播放次数" name="playCount" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.playCount" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="点赞次数" name="likeCount" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.likeCount" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="下载次数" name="downloadCount" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.downloadCount" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="音乐下载地址" name="musicAddress" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.musicAddress" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="封面图" name="coverImage" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.coverImage" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="音乐风格Id" name="genreId" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<a-input v-model:value="state.vm.form.genreId" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
|
@ -70,7 +70,8 @@ function save() {
|
|||
:title="state.vm.id ? '编辑' : '新建'"
|
||||
centered
|
||||
@ok="state.visible = false"
|
||||
:width="800" :maskClosable="false"
|
||||
:width="800"
|
||||
:maskClosable="false"
|
||||
>
|
||||
<template #footer>
|
||||
<a-button type="primary" :loading="state.loading" @click="save()">
|
||||
|
|
@ -104,7 +105,9 @@ function save() {
|
|||
name="productType"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<hm-product-type-select v-model:value="state.vm.form.productType" ></hm-product-type-select>
|
||||
<hm-product-type-select
|
||||
v-model:value="state.vm.form.productType"
|
||||
></hm-product-type-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
|
|
@ -120,10 +123,7 @@ function save() {
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="排序"
|
||||
name="orderById"
|
||||
>
|
||||
<a-form-item label="排序" name="orderById">
|
||||
<a-input
|
||||
v-model:value="state.vm.form.orderById"
|
||||
placeholder="请输入"
|
||||
|
|
@ -131,11 +131,7 @@ function save() {
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<a-form-item
|
||||
label="道具描述"
|
||||
name="productDesc"
|
||||
|
||||
>
|
||||
<a-form-item label="道具描述" name="productDesc">
|
||||
<a-input
|
||||
v-model:value="state.vm.form.productDesc"
|
||||
placeholder="请输入"
|
||||
|
|
@ -189,12 +185,18 @@ function save() {
|
|||
name="productImgId"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<hm-image v-model="state.vm.form.productImgId" />
|
||||
<hm-image
|
||||
v-model="state.vm.form.productImgId"
|
||||
:tenantId="state.vm.form.tenantId"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<a-form-item label="首充图片" name="firstChargeImgId">
|
||||
<hm-image v-model="state.vm.form.firstChargeImgId" />
|
||||
<hm-image
|
||||
v-model="state.vm.form.firstChargeImgId"
|
||||
:tenantId="state.vm.form.tenantId"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,109 @@
|
|||
using MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
namespace MiaoYu.Api.Admin.ApplicationServices.Apps;
|
||||
|
||||
/// <summary>
|
||||
/// 存储所有生成的歌曲的信息。 服务 M_SongsService
|
||||
/// </summary>
|
||||
public class M_SongsService : ApplicationService<IRepository<M_Songs>>
|
||||
{
|
||||
public M_SongsService(IRepository<M_Songs> defaultRepository)
|
||||
: base(defaultRepository)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<PagingView> FindListAsync(PagingSearchInput<M_Songs> pagingSearchInput)
|
||||
{
|
||||
var query = this._defaultRepository.Select
|
||||
|
||||
//项目
|
||||
.WhereIf(pagingSearchInput.Search?.TenantId!=null,
|
||||
w => w.TenantId==pagingSearchInput.Search.TenantId)
|
||||
|
||||
|
||||
|
||||
.OrderByDescending(w => w.Id)
|
||||
.Select(w => new
|
||||
{
|
||||
w.Id,
|
||||
w.TenantId,w.Title,w.AuthorId,w.Genre,w.Lyrics,w.IsPublic,w.CreationTimestamp,w.Duration,w.PlayCount,w.LikeCount,w.DownloadCount,w.MusicAddress,w.CoverImage,w.GenreId,
|
||||
// w.LastModificationTime,
|
||||
// w.CreationTime
|
||||
})
|
||||
;
|
||||
|
||||
var result = await _defaultRepository.AsPagingViewAsync(query, pagingSearchInput);
|
||||
// result
|
||||
// .FormatValue(query, w => w.CreationTime, (oldValue) => oldValue.ToString("yyyy-MM-dd"))
|
||||
// .FormatValue(query, w => w.LastModificationTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd"))
|
||||
// ;
|
||||
// 设置列
|
||||
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
|
||||
//result.GetColumn(query, w => w.OperatorName!).SetColumn<SysUser>(w => w.Name!);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据id数组删除
|
||||
/// </summary>
|
||||
/// <param name="ids">ids</param>
|
||||
/// <returns></returns>
|
||||
public async Task DeleteListAsync(List<int> ids)
|
||||
{
|
||||
await this._defaultRepository.DeleteByIdsAsync(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询表单数据
|
||||
/// </summary>
|
||||
/// <param name="id">id</param>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string,object>> FindFormAsync(int id)
|
||||
{
|
||||
var res = new Dictionary<string, object>();
|
||||
var form = await this._defaultRepository.FindByIdAsync(id);
|
||||
form = form.NullSafe();
|
||||
//if (form.CreateTime == null || form.CreateTime == DateTime.MinValue)
|
||||
//{
|
||||
// form.CreateTime = DateTime.Now;
|
||||
//}
|
||||
//if (form.UpdateTime == null || form.UpdateTime == DateTime.MinValue)
|
||||
//{
|
||||
// form.UpdateTime = DateTime.Now;
|
||||
//}
|
||||
res[nameof(id)] = id;
|
||||
res[nameof(form)] = form;
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="form">form</param>
|
||||
/// <returns></returns>
|
||||
public Task SaveFormAsync(M_Songs form)
|
||||
{
|
||||
return this._defaultRepository.InsertOrUpdateAsync(form);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出Excel
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<byte[]> ExportExcelAsync(PagingSearchInput<M_Songs> pagingSearchInput)
|
||||
{
|
||||
pagingSearchInput.Page = -1;
|
||||
var tableViewModel = await this.FindListAsync(pagingSearchInput);
|
||||
return ExcelUtil.ExportExcelByPagingView(tableViewModel, null, "Id");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -37,8 +37,8 @@ public class TImageConfigService : ApplicationService<IRepository<T_Image_Config
|
|||
}
|
||||
var query = this._defaultRepository.Select
|
||||
.WhereIf(pagingSearchInput != null && !string.IsNullOrWhiteSpace(pagingSearchInput.Search?.Name), w => w.Name.Contains(pagingSearchInput.Search.Name ?? ""))
|
||||
.WhereIf(pagingSearchInput.Search?.TenantId != null,
|
||||
w => w.TenantId == pagingSearchInput.Search.TenantId)
|
||||
//.WhereIf(pagingSearchInput.Search?.TenantId != null,
|
||||
//w => w.TenantId == pagingSearchInput.Search.TenantId)
|
||||
.WhereIf(pagingSearchInput != null && pagingSearchInput.Search?.ImageType > 0, w => w.ImageType == pagingSearchInput.Search.ImageType)
|
||||
.OrderByDescending(w => w.Id)
|
||||
.Select(w => new
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
using MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
namespace MiaoYu.Api.Admin.ApplicationServices.Apps;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -20,35 +20,39 @@ public class T_UserService : ApplicationService<IRepository<T_User>>
|
|||
public async Task<PagingView> FindListAsync(PagingSearchInput<T_User> pagingSearchInput)
|
||||
{
|
||||
var query = this._defaultRepository.Select
|
||||
|
||||
//项目
|
||||
.WhereIf(pagingSearchInput.Search?.TenantId!=null,
|
||||
w => w.TenantId==pagingSearchInput.Search.TenantId)
|
||||
|
||||
|
||||
|
||||
//邮箱
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.Email),
|
||||
w => w.Email.Contains(pagingSearchInput.Search.Email ?? ""))
|
||||
|
||||
|
||||
//用户昵称
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.NickName),
|
||||
w => w.NickName.Contains(pagingSearchInput.Search.NickName ?? ""))
|
||||
|
||||
|
||||
//手机号
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.PhoneNum),
|
||||
w => w.PhoneNum.Contains(pagingSearchInput.Search.PhoneNum ?? ""))
|
||||
|
||||
|
||||
.OrderByDescending(w => w.Id)
|
||||
//项目
|
||||
.WhereIf(pagingSearchInput.Search?.TenantId != null,
|
||||
w => w.TenantId == pagingSearchInput.Search.TenantId)
|
||||
//邮箱
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.Email),
|
||||
w => w.Email.Contains(pagingSearchInput.Search.Email ?? ""))
|
||||
//用户昵称
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.NickName),
|
||||
w => w.NickName.Contains(pagingSearchInput.Search.NickName ?? ""))
|
||||
//手机号
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.PhoneNum),
|
||||
w => w.PhoneNum.Contains(pagingSearchInput.Search.PhoneNum ?? ""))
|
||||
.OrderByDescending(w => w.LastLoginAt)
|
||||
.Select(w => new
|
||||
{
|
||||
w.Id,
|
||||
w.TenantId,w.NickName,w.UserName,w.PhoneNum,w.Email,w.IsActive,w.CreatedAt,w.LastLoginTypeAt,w.LastLoginAt,w.UpdatedAt,w.RegisterType,w.Ip,
|
||||
// w.LastModificationTime,
|
||||
// w.CreationTime
|
||||
w.TenantId,
|
||||
w.NickName,
|
||||
w.UserName,
|
||||
w.PhoneNum,
|
||||
w.Email,
|
||||
w.IsActive,
|
||||
w.CreatedAt,
|
||||
w.LastLoginTypeAt,
|
||||
w.LastLoginAt,
|
||||
w.UpdatedAt,
|
||||
w.RegisterType,
|
||||
w.Ip,
|
||||
w.State,
|
||||
w.IsTest
|
||||
// w.LastModificationTime,
|
||||
// w.CreationTime
|
||||
})
|
||||
;
|
||||
|
||||
|
|
@ -79,19 +83,19 @@ public class T_UserService : ApplicationService<IRepository<T_User>>
|
|||
/// </summary>
|
||||
/// <param name="id">id</param>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string,object>> FindFormAsync(int id)
|
||||
public async Task<Dictionary<string, object>> FindFormAsync(int id)
|
||||
{
|
||||
var res = new Dictionary<string, object>();
|
||||
var form = await this._defaultRepository.FindByIdAsync(id);
|
||||
form = form.NullSafe();
|
||||
//if (form.CreateTime == null || form.CreateTime == DateTime.MinValue)
|
||||
//{
|
||||
// form.CreateTime = DateTime.Now;
|
||||
//}
|
||||
//if (form.UpdateTime == null || form.UpdateTime == DateTime.MinValue)
|
||||
//{
|
||||
// form.UpdateTime = DateTime.Now;
|
||||
//}
|
||||
if (form.CreatedAt == null || form.CreatedAt == DateTime.MinValue)
|
||||
{
|
||||
form.CreatedAt = DateTime.Now;
|
||||
}
|
||||
if (form.UpdatedAt == null || form.UpdatedAt == DateTime.MinValue)
|
||||
{
|
||||
form.UpdatedAt = DateTime.Now;
|
||||
}
|
||||
res[nameof(id)] = id;
|
||||
res[nameof(form)] = form;
|
||||
return res;
|
||||
|
|
@ -120,5 +124,22 @@ public class T_UserService : ApplicationService<IRepository<T_User>>
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改是否是测试账号
|
||||
/// </summary>
|
||||
/// <param name="isTest"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<bool> UpdateIsTest(bool isTest, int id)
|
||||
{
|
||||
var form = await this._defaultRepository.FindByIdAsync(id);
|
||||
if (form == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
form.IsTest = isTest;
|
||||
await SaveFormAsync(form);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
using MiaoYu.Api.Admin.ApplicationServices.Apps;
|
||||
using MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
namespace MiaoYu.Api.Admin.Controllers.Apps;
|
||||
|
||||
/// <summary>
|
||||
/// 存储所有生成的歌曲的信息。 控制器
|
||||
/// </summary>
|
||||
[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "存储所有生成的歌曲的信息。")]
|
||||
public class M_SongsController : AdminControllerBase<M_SongsService>
|
||||
{
|
||||
public M_SongsController(M_SongsService defaultService)
|
||||
: base(defaultService)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Display, DisplayName = "查看数据")]
|
||||
[HttpPost]
|
||||
public Task<PagingView> FindListAsync([FromBody] PagingSearchInput<M_Songs> pagingSearchInput)
|
||||
{
|
||||
return this._defaultService.FindListAsync(pagingSearchInput);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据id数组删除
|
||||
/// </summary>
|
||||
/// <param name="ids">ids</param>
|
||||
/// <returns></returns>
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Delete, DisplayName = "删除数据")]
|
||||
[HttpPost]
|
||||
public async Task<bool> DeleteListAsync([FromBody] List<int> ids)
|
||||
{
|
||||
await this._defaultService.DeleteListAsync(ids);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询表单数据
|
||||
/// </summary>
|
||||
/// <param name="id">id</param>
|
||||
/// <returns></returns>
|
||||
[ActionDescriptor(DisplayName = "查看表单")]
|
||||
[HttpGet("{id?}")]
|
||||
public Task<Dictionary<string, object>> FindFormAsync([FromRoute] int id)
|
||||
{
|
||||
return this._defaultService.FindFormAsync(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="form"></param>
|
||||
/// <returns></returns>
|
||||
[RequestLimitFilter(Duration = 1, LimitCount = 1)]
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Insert, DisplayName = "创建表单")]
|
||||
[HttpPost]
|
||||
[ApiCheckModel]
|
||||
public Task CreateAsync([FromBody] M_Songs form)
|
||||
{
|
||||
return this._defaultService.SaveFormAsync(form);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="form"></param>
|
||||
/// <returns></returns>
|
||||
[RequestLimitFilter(Duration = 1, LimitCount = 1)]
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Update, DisplayName = "编辑表单")]
|
||||
[HttpPost]
|
||||
[ApiCheckModel]
|
||||
public Task UpdateAsync([FromBody] M_Songs form)
|
||||
{
|
||||
return this._defaultService.SaveFormAsync(form);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出Excel
|
||||
/// </summary>
|
||||
/// <param name="pagingSearchInput"></param>
|
||||
/// <returns></returns>
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Export, DisplayName = "导出数据")]
|
||||
[ApiResourceCacheFilter(10)]
|
||||
[HttpPost]
|
||||
public async Task ExportExcelAsync([FromBody] PagingSearchInput<M_Songs> pagingSearchInput)
|
||||
{
|
||||
var data = await this._defaultService.ExportExcelAsync(pagingSearchInput);
|
||||
var name = $"{PermissionUtil.GetControllerDisplayName(this.GetType())}列表数据 {DateTime.Now.ToString("yyyy-MM-dd")}.xls";
|
||||
base.HttpContext.DownLoadFile(data, Tools.GetFileContentType[".xls"].ToStr(), name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
using MiaoYu.Api.Admin.ApplicationServices.Apps;
|
||||
using MiaoYu.Api.Admin.ApplicationServices.Apps;
|
||||
using MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
namespace MiaoYu.Api.Admin.Controllers.Apps;
|
||||
|
||||
|
|
@ -8,12 +8,12 @@ namespace MiaoYu.Api.Admin.Controllers.Apps;
|
|||
[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "用户表")]
|
||||
public class T_UserController : AdminControllerBase<T_UserService>
|
||||
{
|
||||
public T_UserController(T_UserService defaultService)
|
||||
public T_UserController(T_UserService defaultService)
|
||||
: base(defaultService)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表
|
||||
/// </summary>
|
||||
|
|
@ -93,7 +93,18 @@ public class T_UserController : AdminControllerBase<T_UserService>
|
|||
var name = $"{PermissionUtil.GetControllerDisplayName(this.GetType())}列表数据 {DateTime.Now.ToString("yyyy-MM-dd")}.xls";
|
||||
base.HttpContext.DownLoadFile(data, Tools.GetFileContentType[".xls"].ToStr(), name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改角色状态
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="isTest"></param>
|
||||
/// <returns></returns>
|
||||
[ActionDescriptor(PermissionFunctionConsts.Function_Update, DisplayName = "修改角色状态")]
|
||||
[HttpPost("{id?}/{isTest?}")]
|
||||
public async Task<bool> UpdateIsTest(int id, bool isTest)
|
||||
{
|
||||
return await this._defaultService.UpdateIsTest(isTest, id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -169,6 +169,46 @@
|
|||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Api.Admin.ApplicationServices.Apps.M_SongsService">
|
||||
<summary>
|
||||
存储所有生成的歌曲的信息。 服务 M_SongsService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.ApplicationServices.Apps.M_SongsService.FindListAsync(MiaoYu.Shared.Admin.Models.PagingViews.PagingSearchInput{MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs})">
|
||||
<summary>
|
||||
获取列表数据
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.ApplicationServices.Apps.M_SongsService.DeleteListAsync(System.Collections.Generic.List{System.Int32})">
|
||||
<summary>
|
||||
根据id数组删除
|
||||
</summary>
|
||||
<param name="ids">ids</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.ApplicationServices.Apps.M_SongsService.FindFormAsync(System.Int32)">
|
||||
<summary>
|
||||
查询表单数据
|
||||
</summary>
|
||||
<param name="id">id</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.ApplicationServices.Apps.M_SongsService.SaveFormAsync(MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs)">
|
||||
<summary>
|
||||
保存数据
|
||||
</summary>
|
||||
<param name="form">form</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.ApplicationServices.Apps.M_SongsService.ExportExcelAsync(MiaoYu.Shared.Admin.Models.PagingViews.PagingSearchInput{MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs})">
|
||||
<summary>
|
||||
导出Excel
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Api.Admin.ApplicationServices.Apps.TImageConfigService">
|
||||
<summary>
|
||||
图片表 服务 TImageConfigService
|
||||
|
|
@ -926,6 +966,14 @@
|
|||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.ApplicationServices.Apps.T_UserService.UpdateIsTest(System.Boolean,System.Int32)">
|
||||
<summary>
|
||||
修改是否是测试账号
|
||||
</summary>
|
||||
<param name="isTest"></param>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Api.Admin.ApplicationServices.Apps.T_User_CurrencyService">
|
||||
<summary>
|
||||
用户货币表 服务 T_User_CurrencyService
|
||||
|
|
@ -2363,6 +2411,53 @@
|
|||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Api.Admin.Controllers.Apps.M_SongsController">
|
||||
<summary>
|
||||
存储所有生成的歌曲的信息。 控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.Controllers.Apps.M_SongsController.FindListAsync(MiaoYu.Shared.Admin.Models.PagingViews.PagingSearchInput{MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs})">
|
||||
<summary>
|
||||
获取列表
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.Controllers.Apps.M_SongsController.DeleteListAsync(System.Collections.Generic.List{System.Int32})">
|
||||
<summary>
|
||||
根据id数组删除
|
||||
</summary>
|
||||
<param name="ids">ids</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.Controllers.Apps.M_SongsController.FindFormAsync(System.Int32)">
|
||||
<summary>
|
||||
查询表单数据
|
||||
</summary>
|
||||
<param name="id">id</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.Controllers.Apps.M_SongsController.CreateAsync(MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs)">
|
||||
<summary>
|
||||
添加
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.Controllers.Apps.M_SongsController.UpdateAsync(MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs)">
|
||||
<summary>
|
||||
编辑
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.Controllers.Apps.M_SongsController.ExportExcelAsync(MiaoYu.Shared.Admin.Models.PagingViews.PagingSearchInput{MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs})">
|
||||
<summary>
|
||||
导出Excel
|
||||
</summary>
|
||||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Api.Admin.Controllers.Apps.TImageConfigController">
|
||||
<summary>
|
||||
图片表 控制器
|
||||
|
|
@ -3224,6 +3319,14 @@
|
|||
<param name="pagingSearchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MiaoYu.Api.Admin.Controllers.Apps.T_UserController.UpdateIsTest(System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
修改角色状态
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="isTest"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Api.Admin.Controllers.Apps.T_User_CurrencyController">
|
||||
<summary>
|
||||
用户货币表 控制器
|
||||
|
|
|
|||
|
|
@ -28,63 +28,6 @@ namespace MiaoYu.Repository.ChatAI.Admin
|
|||
{
|
||||
#region 自动迁移种子数据
|
||||
|
||||
modelBuilder.Entity<T_Order>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__T_Order__3214EC07C8DD7EE1");
|
||||
|
||||
entity.ToTable(tb => tb.HasComment("订单完成表"));
|
||||
|
||||
entity.Property(e => e.CreatedAt)
|
||||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.OrderDate)
|
||||
.HasComment("订单创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.OrderId)
|
||||
.HasMaxLength(64)
|
||||
.HasComment("订单编号");
|
||||
entity.Property(e => e.PaymentDate)
|
||||
.HasComment("订单支付时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.PaymentDay).HasComment("订单创建天");
|
||||
entity.Property(e => e.PaymentMethod)
|
||||
.HasMaxLength(10)
|
||||
.HasComment("订单支付方式");
|
||||
entity.Property(e => e.ProductId)
|
||||
.HasMaxLength(100)
|
||||
.HasComment("购买的产品Id");
|
||||
entity.Property(e => e.Status).HasComment("订单状态");
|
||||
entity.Property(e => e.TenantId).HasComment("租户");
|
||||
entity.Property(e => e.TotalPrice)
|
||||
.HasComment("价格")
|
||||
.HasColumnType("money");
|
||||
entity.Property(e => e.UpdatedAt)
|
||||
.HasComment("修改时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.UserId).HasComment("用户Id");
|
||||
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_OrderItems>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__T_OrderI__3214EC077E53EC22");
|
||||
|
||||
entity.ToTable(tb => tb.HasComment("订单详情表"));
|
||||
|
||||
entity.Property(e => e.OrderId)
|
||||
.HasMaxLength(64)
|
||||
.HasComment("订单id");
|
||||
entity.Property(e => e.PayUrl).HasComment("支付地址");
|
||||
entity.Property(e => e.PaymentInfo).HasComment("支付信息");
|
||||
entity.Property(e => e.Product).HasComment("产品id、主键");
|
||||
entity.Property(e => e.ProductId)
|
||||
.HasMaxLength(100)
|
||||
.HasComment("产品id");
|
||||
entity.Property(e => e.RewardInfo).HasComment("发放奖励信息");
|
||||
entity.Property(e => e.RewardTips).HasComment("发放奖励提示");
|
||||
entity.Property(e => e.TenantId).HasComment("租户");
|
||||
|
||||
});
|
||||
//OnModelCreatingPartial(modelBuilder);
|
||||
//ModelBuilderExtensions.Seed(modelBuilder);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
namespace MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
|
||||
/// <summary>
|
||||
/// 存储所有生成的歌曲的信息。
|
||||
/// </summary>
|
||||
[EntityDescription(FieldIgnored = true)]
|
||||
[Table("M_Songs")]
|
||||
public class M_Songs : DefaultEntityV4
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 歌曲名称 => 备注: 歌曲名称
|
||||
/// </summary>
|
||||
public string? Title { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户Id => 备注: 歌曲作者ID
|
||||
/// </summary>
|
||||
public Int32 AuthorId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 音乐风格 => 备注: 音乐风格
|
||||
/// </summary>
|
||||
public string? Genre { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 歌词内容 => 备注: 歌词内容
|
||||
/// </summary>
|
||||
public string? Lyrics { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 歌曲是否公开展示 => 备注: 歌曲是否公开展示
|
||||
/// </summary>
|
||||
public Boolean IsPublic { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 歌曲创建时间 => 备注: 歌曲创建时间
|
||||
/// </summary>
|
||||
public DateTime CreationTimestamp { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 歌曲时长 => 备注: 歌曲时长
|
||||
/// </summary>
|
||||
public TimeSpan? Duration { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 播放次数 => 备注: 播放次数
|
||||
/// </summary>
|
||||
public Int32 PlayCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 点赞次数 => 备注: 点赞次数
|
||||
/// </summary>
|
||||
public Int32 LikeCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 下载次数 => 备注: 下载次数
|
||||
/// </summary>
|
||||
public Int32 DownloadCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 音乐下载地址 => 备注: 音乐下载地址
|
||||
/// </summary>
|
||||
public string? MusicAddress { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 封面图 => 备注: 封面图
|
||||
/// </summary>
|
||||
public string? CoverImage { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 音乐风格Id => 备注: 音乐风格Id
|
||||
/// </summary>
|
||||
public Int32? GenreId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
namespace MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
namespace MiaoYu.Repository.ChatAI.Admin.Entities.Apps;
|
||||
|
||||
/// <summary>
|
||||
/// 用户表
|
||||
|
|
@ -7,71 +7,80 @@
|
|||
public class T_User : DefaultEntityV4
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户昵称 => 备注: 用户昵称
|
||||
/// </summary>
|
||||
public string? NickName { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户姓名 => 备注: 用户姓名
|
||||
/// </summary>
|
||||
public string? UserName { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 手机号 => 备注: 绑定的手机号
|
||||
/// </summary>
|
||||
public string? PhoneNum { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 邮箱 => 备注: 绑定的邮箱
|
||||
/// </summary>
|
||||
public string? Email { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否活跃 => 备注: 是否活跃
|
||||
/// </summary>
|
||||
public Boolean IsActive { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间 => 备注: 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 最后一次登录方式,1手机号 => 备注: 最后一次登录方式,1手机号
|
||||
/// </summary>
|
||||
public Int32 LastLoginTypeAt { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 登录时间 => 备注: 最后一次登录时间
|
||||
/// </summary>
|
||||
public DateTime LastLoginAt { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间 => 备注: 修改时间
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 首次注册方式 => 备注: 首次注册方式
|
||||
/// </summary>
|
||||
public Int32 RegisterType { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Ip地址 => 备注: Ip地址
|
||||
/// </summary>
|
||||
public string? Ip { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 0正常,1注销
|
||||
/// </summary>
|
||||
public virtual int State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是测试账号
|
||||
/// </summary>
|
||||
public virtual bool? IsTest { get; set; }
|
||||
}
|
||||
|
|
@ -62,6 +62,76 @@
|
|||
是否启用 => 备注: 是否启用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs">
|
||||
<summary>
|
||||
存储所有生成的歌曲的信息。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.Title">
|
||||
<summary>
|
||||
歌曲名称 => 备注: 歌曲名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.AuthorId">
|
||||
<summary>
|
||||
用户Id => 备注: 歌曲作者ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.Genre">
|
||||
<summary>
|
||||
音乐风格 => 备注: 音乐风格
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.Lyrics">
|
||||
<summary>
|
||||
歌词内容 => 备注: 歌词内容
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.IsPublic">
|
||||
<summary>
|
||||
歌曲是否公开展示 => 备注: 歌曲是否公开展示
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.CreationTimestamp">
|
||||
<summary>
|
||||
歌曲创建时间 => 备注: 歌曲创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.Duration">
|
||||
<summary>
|
||||
歌曲时长 => 备注: 歌曲时长
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.PlayCount">
|
||||
<summary>
|
||||
播放次数 => 备注: 播放次数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.LikeCount">
|
||||
<summary>
|
||||
点赞次数 => 备注: 点赞次数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.DownloadCount">
|
||||
<summary>
|
||||
下载次数 => 备注: 下载次数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.MusicAddress">
|
||||
<summary>
|
||||
音乐下载地址 => 备注: 音乐下载地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.CoverImage">
|
||||
<summary>
|
||||
封面图 => 备注: 封面图
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.M_Songs.GenreId">
|
||||
<summary>
|
||||
音乐风格Id => 备注: 音乐风格Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.T_Category_Child_Menu">
|
||||
<summary>
|
||||
发现页类别菜单
|
||||
|
|
@ -767,6 +837,16 @@
|
|||
Ip地址 => 备注: Ip地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.T_User.State">
|
||||
<summary>
|
||||
0正常,1注销
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.T_User.IsTest">
|
||||
<summary>
|
||||
是否是测试账号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MiaoYu.Repository.ChatAI.Admin.Entities.Apps.T_User_Currency">
|
||||
<summary>
|
||||
用户货币表
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user