fix: 解决、改进管理后台-管理端-团队管理 相关的功能
This commit is contained in:
parent
28e51137c5
commit
fb38439543
|
|
@ -1,7 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
|
||||||
<el-form-item label="团队名称" prop="deptName">
|
<el-form-item label="订单号" prop="orderNum">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.orderNum"
|
||||||
|
placeholder="支持模糊搜索"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="部门名称" prop="deptName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.deptName"
|
v-model="queryParams.deptName"
|
||||||
placeholder="支持模糊搜索"
|
placeholder="支持模糊搜索"
|
||||||
|
|
@ -46,28 +54,27 @@
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="groupChargeOrderList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="groupChargeOrderList">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column label="订单号" align="center" prop="orderNum" width="200" show-overflow-tooltip />
|
||||||
<el-table-column label="ID" align="center" prop="id" width="72" />
|
<el-table-column label="部门名称" align="center" prop="deptName" width="150" show-overflow-tooltip />
|
||||||
<el-table-column label="团队名称" align="center" prop="deptName" min-width="120" show-overflow-tooltip />
|
<el-table-column label="类型" align="center" width="120">
|
||||||
<el-table-column label="类型" align="center" width="100">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ orderTypeLabel(scope.row.orderType) }}</span>
|
<span>{{ orderTypeLabel(scope.row.orderType) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="金额(元)" align="center" prop="money" width="100" />
|
<el-table-column label="金额(元)" align="center" prop="money" width="120" />
|
||||||
<el-table-column label="积分" align="center" prop="amount" width="100" />
|
<el-table-column label="积分" align="center" prop="amount" width="120" />
|
||||||
<el-table-column label="状态" align="center" width="100">
|
<el-table-column label="状态" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ statusLabel(scope.row.status) }}</span>
|
<span>{{ statusLabel(scope.row.status) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="时间" align="center" prop="createTime" width="160">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" min-width="160" show-overflow-tooltip />
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
@ -130,9 +137,6 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
ids: [],
|
|
||||||
single: true,
|
|
||||||
multiple: true,
|
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|
@ -142,6 +146,7 @@ export default {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
orderNum: null,
|
||||||
deptName: null,
|
deptName: null,
|
||||||
orderType: null
|
orderType: null
|
||||||
},
|
},
|
||||||
|
|
@ -212,11 +217,6 @@ export default {
|
||||||
this.resetForm("queryForm")
|
this.resetForm("queryForm")
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length !== 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset()
|
this.reset()
|
||||||
this.open = true
|
this.open = true
|
||||||
|
|
@ -224,7 +224,10 @@ export default {
|
||||||
},
|
},
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset()
|
this.reset()
|
||||||
const id = row.id || this.ids[0]
|
const id = row && row.id
|
||||||
|
if (!id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
getGroupChargeOrder(id).then(response => {
|
getGroupChargeOrder(id).then(response => {
|
||||||
this.form = response.data
|
this.form = response.data
|
||||||
this.open = true
|
this.open = true
|
||||||
|
|
@ -253,9 +256,12 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids
|
const id = row && row.id
|
||||||
|
if (!id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$modal.confirm("是否确认删除所选团队充值退款订单?").then(() => {
|
this.$modal.confirm("是否确认删除所选团队充值退款订单?").then(() => {
|
||||||
return delGroupChargeOrder(ids)
|
return delGroupChargeOrder(id)
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.$modal.msgSuccess("删除成功")
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,21 @@
|
||||||
v-model="queryParams.relationOrderNo"
|
v-model="queryParams.relationOrderNo"
|
||||||
placeholder="请输入关联(充值/退款)订单号"
|
placeholder="请输入关联(充值/退款)订单号"
|
||||||
clearable
|
clearable
|
||||||
|
style="width: 300px"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="部门ID" prop="deptId">
|
<el-form-item label="部门名称" prop="deptName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.deptId"
|
v-model="queryParams.deptName"
|
||||||
placeholder="请输入部门ID"
|
placeholder="请输入部门名称"
|
||||||
clearable
|
clearable
|
||||||
|
style="width: 140px"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="type">
|
<el-form-item label="类型" prop="type">
|
||||||
<el-select v-model="queryParams.type" clearable placeholder="全部类型" style="width: 180px">
|
<el-select v-model="queryParams.type" clearable placeholder="全部类型" style="width: 112px">
|
||||||
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -54,16 +56,16 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="recordList">
|
<el-table v-loading="loading" :data="recordList">
|
||||||
<el-table-column label="ID" align="center" prop="id" />
|
<el-table-column label="ID" align="center" prop="id" width="100"/>
|
||||||
<el-table-column label="订单号" align="center" prop="relationOrderNo" />
|
<el-table-column label="关联订单号" align="center" prop="relationOrderNo" width="200" show-overflow-tooltip />
|
||||||
<el-table-column label="部门ID" align="center" prop="deptId" />
|
<el-table-column label="部门名称" align="center" prop="deptName" width="150" show-overflow-tooltip />
|
||||||
<el-table-column label="操作类型" align="center" width="120">
|
<el-table-column label="操作类型" align="center" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ typeLabel(scope.row.type) }}</span>
|
<span>{{ typeLabel(scope.row.type) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="变更金额" align="center" prop="changeAmount" />
|
<el-table-column label="变更金额" align="center" prop="changeAmount" width="100" />
|
||||||
<el-table-column label="变更后金额" align="center" prop="resultAmount" />
|
<el-table-column label="变更后金额" align="center" prop="resultAmount" width="100" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -105,7 +107,7 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
relationOrderNo: null,
|
relationOrderNo: null,
|
||||||
deptId: null,
|
deptName: null,
|
||||||
type: null
|
type: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@
|
||||||
<span>{{ parseTime(scope.row.loginTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.loginTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="余额" align="center" prop="balance" />
|
<el-table-column label="剩余积分" align="center" prop="balance" />
|
||||||
<el-table-column label="source" align="center" prop="source" />
|
<el-table-column label="source" align="center" prop="source" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="460">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="460">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -239,10 +239,10 @@
|
||||||
placeholder="请选择生日"
|
placeholder="请选择生日"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.id != null" label="余额" prop="balance">
|
<el-form-item v-if="form.id != null" label="剩余积分" prop="balance">
|
||||||
<el-input v-model="form.balance" disabled placeholder="-" />
|
<el-input v-model="form.balance" disabled placeholder="-" />
|
||||||
<div style="color: #909399; font-size: 12px; line-height: 1.5; margin-top: 4px">
|
<div style="color: #909399; font-size: 12px; line-height: 1.5; margin-top: 4px">
|
||||||
余额仅可通过「下放积分」「回收积分」调整
|
剩余积分仅可通过「下放积分」「回收积分」调整
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
||||||
<el-form-item label="部门名称" prop="deptName">
|
<el-form-item label="团队名称" prop="deptName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.deptName"
|
v-model="queryParams.deptName"
|
||||||
placeholder="请输入部门名称"
|
placeholder="请输入团队名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="部门状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="团队状态" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.sys_normal_disable"
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
:default-expand-all="isExpandAll"
|
:default-expand-all="isExpandAll"
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
>
|
>
|
||||||
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
|
<el-table-column prop="deptName" label="团队名称" width="260"></el-table-column>
|
||||||
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
|
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
|
||||||
<el-table-column prop="maxUserCount" label="账号上限" width="100" align="center">
|
<el-table-column prop="maxUserCount" label="账号上限" width="100" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -121,20 +121,20 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 添加或修改部门对话框 -->
|
<!-- 添加或修改团队对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" v-if="form.parentId !== 0">
|
<el-col :span="24" v-if="form.parentId !== 0">
|
||||||
<el-form-item label="上级部门" prop="parentId">
|
<el-form-item label="上级团队" prop="parentId">
|
||||||
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
|
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级团队" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="部门名称" prop="deptName">
|
<el-form-item label="团队名称" prop="deptName">
|
||||||
<el-input v-model="form.deptName" placeholder="请输入部门名称" />
|
<el-input v-model="form.deptName" placeholder="请输入团队名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -162,7 +162,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="部门状态">
|
<el-form-item label="团队状态">
|
||||||
<el-radio-group v-model="form.status" :disabled="isFirstLevelEditForm">
|
<el-radio-group v-model="form.status" :disabled="isFirstLevelEditForm">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in dict.type.sys_normal_disable"
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
|
@ -189,12 +189,12 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<p class="model-parm-hint" style="margin: 0; padding-top: 8px"> 限制本部门下「启用」状态账号数量;0 或不填表示不限制。</p>
|
<p class="model-parm-hint" style="margin: 0; padding-top: 8px"> 限制本团队下「启用」状态账号数量;0 或不填表示不限制。</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<span v-if="isFirstLevelEditForm" class="form-tip">一级部门仅允许修改名称</span>
|
<span v-if="isFirstLevelEditForm" class="form-tip">一级团队仅允许修改名称</span>
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -256,7 +256,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button type="text" icon="el-icon-plus" @click="addArkModelParamRow">添加模型</el-button>
|
<el-button type="text" icon="el-icon-plus" @click="addArkModelParamRow">添加模型</el-button>
|
||||||
<p class="model-parm-hint">
|
<p class="model-parm-hint">
|
||||||
保存为 JSON 写入 ai_dept_ark_config.model_parm;门户「视频生成」按 ai_user.dept_id 与本部门配置读取。
|
保存为 JSON 写入 ai_dept_ark_config.model_parm;门户「视频生成」按 ai_user.dept_id 与本团队配置读取。
|
||||||
留空则使用 portal.video.models。
|
留空则使用 portal.video.models。
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -515,10 +515,10 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
parentId: [
|
parentId: [
|
||||||
{ required: true, message: "上级部门不能为空", trigger: "blur" }
|
{ required: true, message: "上级团队不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
deptName: [
|
deptName: [
|
||||||
{ required: true, message: "部门名称不能为空", trigger: "blur" }
|
{ required: true, message: "团队名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
orderNum: [
|
orderNum: [
|
||||||
{ required: true, message: "显示排序不能为空", trigger: "blur" }
|
{ required: true, message: "显示排序不能为空", trigger: "blur" }
|
||||||
|
|
@ -832,13 +832,13 @@ export default {
|
||||||
this.reset()
|
this.reset()
|
||||||
if (row !== undefined) {
|
if (row !== undefined) {
|
||||||
if (!this.isFirstLevelRow(row)) {
|
if (!this.isFirstLevelRow(row)) {
|
||||||
this.$modal.msgError("仅允许在一级部门下新增二级部门")
|
this.$modal.msgError("仅允许在一级团队下新增二级团队")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.form.parentId = row.deptId
|
this.form.parentId = row.deptId
|
||||||
}
|
}
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = "添加二级部门"
|
this.title = "添加二级团队"
|
||||||
listDept().then(response => {
|
listDept().then(response => {
|
||||||
this.deptOptions = this.getFirstLevelDeptOptions(this.handleTree(response.data, "deptId"))
|
this.deptOptions = this.getFirstLevelDeptOptions(this.handleTree(response.data, "deptId"))
|
||||||
})
|
})
|
||||||
|
|
@ -858,7 +858,7 @@ export default {
|
||||||
this.form = response.data
|
this.form = response.data
|
||||||
this.originalForm = { ...response.data }
|
this.originalForm = { ...response.data }
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = "修改部门"
|
this.title = "修改团队"
|
||||||
listDeptExcludeChild(row.deptId).then(response => {
|
listDeptExcludeChild(row.deptId).then(response => {
|
||||||
const allOptions = this.handleTree(response.data, "deptId")
|
const allOptions = this.handleTree(response.data, "deptId")
|
||||||
this.deptOptions = this.getFirstLevelDeptOptions(allOptions)
|
this.deptOptions = this.getFirstLevelDeptOptions(allOptions)
|
||||||
|
|
@ -874,7 +874,7 @@ export default {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.deptId == undefined && !this.deptOptions.some(item => Number(item.deptId) === Number(this.form.parentId))) {
|
if (this.form.deptId == undefined && !this.deptOptions.some(item => Number(item.deptId) === Number(this.form.parentId))) {
|
||||||
this.$modal.msgError("仅允许在一级部门下创建二级部门")
|
this.$modal.msgError("仅允许在一级团队下创建二级团队")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.form.deptId != undefined) {
|
if (this.form.deptId != undefined) {
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
@ -65,7 +63,7 @@ public class AiVideoReportDataController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ai:data:query')")
|
@PreAuthorize("@ss.hasPermi('ai:data:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
return success(aiVideoReportDataService.selectAiVideoReportDataById(id));
|
return success(aiVideoReportDataService.selectAiVideoReportDataById(id));
|
||||||
}
|
}
|
||||||
|
|
@ -80,26 +78,4 @@ public class AiVideoReportDataController extends BaseController
|
||||||
{
|
{
|
||||||
return toAjax(aiVideoReportDataService.insertAiVideoReportData(aiVideoReportData));
|
return toAjax(aiVideoReportDataService.insertAiVideoReportData(aiVideoReportData));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('ai:data:edit')")
|
|
||||||
@Log(title = "AI视频生成统计数据,作为其他统计报的数据源", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody AiVideoReportData aiVideoReportData)
|
|
||||||
{
|
|
||||||
return toAjax(aiVideoReportDataService.updateAiVideoReportData(aiVideoReportData));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('ai:data:remove')")
|
|
||||||
@Log(title = "AI视频生成统计数据,作为其他统计报的数据源", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable String[] ids)
|
|
||||||
{
|
|
||||||
return toAjax(aiVideoReportDataService.deleteAiVideoReportDataByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,5 @@ no.view.permission=您没有查看数据的权限,请联系管理员添加权
|
||||||
|
|
||||||
# video generation
|
# video generation
|
||||||
order.number.generation.failed=订单号 {0} 生成视频任务失败。
|
order.number.generation.failed=订单号 {0} 生成视频任务失败。
|
||||||
order.number.generation.submit=订单号 {0} 生成视频任务已提交!预扣金额。
|
order.number.generation.submit=订单号 {0} 生成视频任务已提交!
|
||||||
order.number.generation.successbackfill=订单号 {0} 生成视频任务成功!金额已回补!
|
order.number.generation.successbackfill=订单号 {0} 生成视频任务成功!金额已回补!
|
||||||
|
|
@ -32,5 +32,5 @@ ai.user.login.disabled=帳號已停用,無法登入。
|
||||||
|
|
||||||
# video generation
|
# video generation
|
||||||
order.number.generation.failed=訂單號 {0} 生成視頻任務失敗。
|
order.number.generation.failed=訂單號 {0} 生成視頻任務失敗。
|
||||||
order.number.generation.submit=訂單號 {0} 生成視頻任務已提交!預扣金額。
|
order.number.generation.submit=訂單號 {0} 生成視頻任務已提交!
|
||||||
order.number.generation.successbackfill=訂單號 {0} 生成視頻任務成功!金額已回補!
|
order.number.generation.successbackfill=訂單號 {0} 生成視頻任務成功!金額已回補!
|
||||||
|
|
@ -1,15 +1,22 @@
|
||||||
package com.ruoyi.ai.domain;
|
package com.ruoyi.ai.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 团队(部门)余额变动对象 ai_group_balance_change_record
|
* 团队(部门)余额变动对象 ai_group_balance_change_record
|
||||||
|
|
@ -28,13 +35,17 @@ public class AiGroupBalanceChangeRecord implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 关联(充值/退款)订单号 */
|
/** 关联(充值/退款)订单号 */
|
||||||
@Excel(name = "关联(充值/退款)订单号")
|
@Excel(name = "关联订单号")
|
||||||
private String relationOrderNo;
|
private String relationOrderNo;
|
||||||
|
|
||||||
/** 部门ID */
|
/** 部门ID */
|
||||||
@Excel(name = "部门ID")
|
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 部门名称(列表/导出关联查询,非表字段) */
|
||||||
|
@TableField(exist = false)
|
||||||
|
@Excel(name = "部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作类型(0-充值,1-退款,2-下发,3-回收,4-手动修改,…)
|
* 操作类型(0-充值,1-退款,2-下发,3-回收,4-手动修改,…)
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,4 +71,22 @@ public class AiGroupBalanceChangeRecord implements Serializable {
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 请求参数(若依日期范围:params.beginCreateTime / params.endCreateTime) */
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
@TableField(exist = false)
|
||||||
|
@Getter(AccessLevel.NONE)
|
||||||
|
@Setter(AccessLevel.NONE)
|
||||||
|
private Map<String, Object> params;
|
||||||
|
|
||||||
|
public Map<String, Object> getParams() {
|
||||||
|
if (params == null) {
|
||||||
|
params = new HashMap<>();
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParams(Map<String, Object> params) {
|
||||||
|
this.params = params;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,60 +4,72 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.math.BigDecimal;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AI视频生成统计数据,作为其他统计报的数据源对象 ai_video_report_data
|
* AI 视频生成统计数据表 ai_video_report_data(作为其它统计报表的数据源)
|
||||||
*
|
*
|
||||||
* @author shi
|
* @author shi
|
||||||
* @date 2026-04-17
|
* @date 2026-04-17
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("ai_video_report_data")
|
@TableName("ai_video_report_data")
|
||||||
public class AiVideoReportData extends BaseEntity {
|
public class AiVideoReportData implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** 主键 */
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private String id;
|
@Excel(name = "主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
/** 统计时间,到小时(yyyyMMddHH) */
|
/** 统计时间,到小时(库表注释:'%Y-%m-%d %H';业务写入常用 yyyyMMddHH) */
|
||||||
@Excel(name = "统计时间,到小时('%Y-%m-%d %H')")
|
@Excel(name = "统计时间(到小时)")
|
||||||
private String dateKey;
|
private String dateKey;
|
||||||
|
|
||||||
/** 部门ID */
|
/** 部门ID */
|
||||||
@Excel(name = "部门ID")
|
@Excel(name = "部门ID")
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/** 用户ID,用户表的ID,延用其他表设计 */
|
/** 用户ID(用户表主键) */
|
||||||
@Excel(name = "用户ID,用户表的ID,延用其他表设计 ")
|
@Excel(name = "用户ID")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/** 消耗积分,按任务创建时间统计 */
|
/** 消耗积分,按任务创建时间统计 */
|
||||||
@Excel(name = "消耗积分,按任务创建时间统计")
|
@Excel(name = "消耗积分")
|
||||||
private BigDecimal score;
|
private BigDecimal score;
|
||||||
|
|
||||||
/** 实际订单数,只统计已生成成功的任务 */
|
|
||||||
@Excel(name = "实际订单数,只统计已生成成功的任务")
|
|
||||||
private Long orderCount;
|
|
||||||
|
|
||||||
/** 三方消耗tokens数量,按任务创建时间统计 */
|
|
||||||
@Excel(name = "三方消耗tokens数量,按任务创建时间统计")
|
|
||||||
private Long useTokens;
|
|
||||||
|
|
||||||
/** 实际充值积分(充值 - 退款) */
|
/** 实际充值积分(充值 - 退款) */
|
||||||
@Excel(name = "实际充值积分(充值-退款)")
|
@Excel(name = "实际充值积分")
|
||||||
private BigDecimal rechargeScore;
|
private BigDecimal rechargeScore;
|
||||||
|
|
||||||
/** 团队名称(查询结果展示字段) */
|
/** 实际订单数,仅统计生成成功的任务 */
|
||||||
|
@Excel(name = "订单数")
|
||||||
|
private Long orderCount;
|
||||||
|
|
||||||
|
/** 三方消耗 tokens,按任务创建时间统计 */
|
||||||
|
@Excel(name = "消耗tokens")
|
||||||
|
private Long useTokens;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 团队名称(查询结果展示,非表字段) */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
/** 查询日期(yyyyMMdd) */
|
/** 查询日期 yyyyMMdd(非表字段) */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String statDate;
|
private String statDate;
|
||||||
}
|
}
|
||||||
|
|
@ -12,4 +12,11 @@ import com.ruoyi.ai.domain.AiGroupBalanceChangeRecord;
|
||||||
* @date 2026-04-17
|
* @date 2026-04-17
|
||||||
*/
|
*/
|
||||||
public interface AiGroupBalanceChangeRecordMapper extends BaseMapper<AiGroupBalanceChangeRecord> {
|
public interface AiGroupBalanceChangeRecordMapper extends BaseMapper<AiGroupBalanceChangeRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表(关联部门名称;支持按 deptName 模糊、创建时间范围)
|
||||||
|
*/
|
||||||
|
List<AiGroupBalanceChangeRecord> selectAiGroupBalanceChangeRecordList(AiGroupBalanceChangeRecord query);
|
||||||
|
|
||||||
|
AiGroupBalanceChangeRecord selectAiGroupBalanceChangeRecordById(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import com.ruoyi.ai.domain.AiOrder;
|
||||||
import com.ruoyi.ai.domain.AiVideoReportData;
|
import com.ruoyi.ai.domain.AiVideoReportData;
|
||||||
import com.ruoyi.system.domain.subteam.SubteamVideoMetrics;
|
import com.ruoyi.system.domain.subteam.SubteamVideoMetrics;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Update;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AI视频生成统计数据,作为其他统计报的数据源Mapper接口
|
* AI视频生成统计数据,作为其他统计报的数据源Mapper接口
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public interface IAiVideoReportDataService {
|
||||||
* @param id AI视频生成统计数据,作为其他统计报的数据源主键
|
* @param id AI视频生成统计数据,作为其他统计报的数据源主键
|
||||||
* @return AI视频生成统计数据,作为其他统计报的数据源
|
* @return AI视频生成统计数据,作为其他统计报的数据源
|
||||||
*/
|
*/
|
||||||
AiVideoReportData selectAiVideoReportDataById(String id);
|
AiVideoReportData selectAiVideoReportDataById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询AI视频生成统计数据,作为其他统计报的数据源列表
|
* 查询AI视频生成统计数据,作为其他统计报的数据源列表
|
||||||
|
|
@ -47,30 +47,6 @@ public interface IAiVideoReportDataService {
|
||||||
*/
|
*/
|
||||||
int insertAiVideoReportData(AiVideoReportData aiVideoReportData);
|
int insertAiVideoReportData(AiVideoReportData aiVideoReportData);
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
*
|
|
||||||
* @param aiVideoReportData AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int updateAiVideoReportData(AiVideoReportData aiVideoReportData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的AI视频生成统计数据,作为其他统计报的数据源主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteAiVideoReportDataByIds(String[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除AI视频生成统计数据,作为其他统计报的数据源信息
|
|
||||||
*
|
|
||||||
* @param id AI视频生成统计数据,作为其他统计报的数据源主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteAiVideoReportDataById(String id);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 团队每日消耗统计查询(按天、团队聚合)。
|
* 团队每日消耗统计查询(按天、团队聚合)。
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
package com.ruoyi.ai.service.impl;
|
package com.ruoyi.ai.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.ruoyi.ai.domain.AiGroupBalanceChangeRecord;
|
import com.ruoyi.ai.domain.AiGroupBalanceChangeRecord;
|
||||||
import com.ruoyi.ai.mapper.AiGroupBalanceChangeRecordMapper;
|
import com.ruoyi.ai.mapper.AiGroupBalanceChangeRecordMapper;
|
||||||
import com.ruoyi.ai.service.IAiGroupBalanceChangeRecordService;
|
import com.ruoyi.ai.service.IAiGroupBalanceChangeRecordService;
|
||||||
|
|
@ -30,7 +28,7 @@ public class AiGroupBalanceChangeRecordServiceImpl implements IAiGroupBalanceCha
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AiGroupBalanceChangeRecord selectAiGroupBalanceChangeRecordById(Long id) {
|
public AiGroupBalanceChangeRecord selectAiGroupBalanceChangeRecordById(Long id) {
|
||||||
return aiGroupBalanceChangeRecordMapper.selectById(id);
|
return aiGroupBalanceChangeRecordMapper.selectAiGroupBalanceChangeRecordById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,8 +39,17 @@ public class AiGroupBalanceChangeRecordServiceImpl implements IAiGroupBalanceCha
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<AiGroupBalanceChangeRecord> selectAiGroupBalanceChangeRecordList(AiGroupBalanceChangeRecord aiGroupBalanceChangeRecord) {
|
public List<AiGroupBalanceChangeRecord> selectAiGroupBalanceChangeRecordList(AiGroupBalanceChangeRecord aiGroupBalanceChangeRecord) {
|
||||||
LambdaQueryWrapper<AiGroupBalanceChangeRecord> query = Wrappers.lambdaQuery(aiGroupBalanceChangeRecord);
|
if (aiGroupBalanceChangeRecord != null) {
|
||||||
query.orderByDesc(AiGroupBalanceChangeRecord::getId);
|
aiGroupBalanceChangeRecord.setDeptName(trimToNull(aiGroupBalanceChangeRecord.getDeptName()));
|
||||||
return aiGroupBalanceChangeRecordMapper.selectList(query);
|
}
|
||||||
|
return aiGroupBalanceChangeRecordMapper.selectAiGroupBalanceChangeRecordList(aiGroupBalanceChangeRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String trimToNull(String s) {
|
||||||
|
if (s == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String t = s.trim();
|
||||||
|
return t.isEmpty() ? null : t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public class AiVideoReportDataServiceImpl implements IAiVideoReportDataService {
|
||||||
* @return AI视频生成统计数据,作为其他统计报的数据源
|
* @return AI视频生成统计数据,作为其他统计报的数据源
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AiVideoReportData selectAiVideoReportDataById(String id) {
|
public AiVideoReportData selectAiVideoReportDataById(Long id) {
|
||||||
return aiVideoReportDataMapper.selectById(id);
|
return aiVideoReportDataMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,42 +75,6 @@ public class AiVideoReportDataServiceImpl implements IAiVideoReportDataService {
|
||||||
return aiVideoReportDataMapper.insert(aiVideoReportData);
|
return aiVideoReportDataMapper.insert(aiVideoReportData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
*
|
|
||||||
* @param aiVideoReportData AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateAiVideoReportData(AiVideoReportData aiVideoReportData) {
|
|
||||||
aiVideoReportData.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
return aiVideoReportDataMapper.updateById(aiVideoReportData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除AI视频生成统计数据,作为其他统计报的数据源
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的AI视频生成统计数据,作为其他统计报的数据源主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteAiVideoReportDataByIds(String[] ids)
|
|
||||||
{
|
|
||||||
return aiVideoReportDataMapper.deleteBatchIds(java.util.Arrays.asList(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除AI视频生成统计数据,作为其他统计报的数据源信息
|
|
||||||
*
|
|
||||||
* @param id AI视频生成统计数据,作为其他统计报的数据源主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteAiVideoReportDataById(String id)
|
|
||||||
{
|
|
||||||
return aiVideoReportDataMapper.deleteById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AiVideoReportData> selectTeamDailyConsumeList(String statDate, Long deptId) {
|
public List<AiVideoReportData> selectTeamDailyConsumeList(String statDate, Long deptId) {
|
||||||
return aiVideoReportDataMapper.selectTeamDailyConsumeList(statDate, deptId);
|
return aiVideoReportDataMapper.selectTeamDailyConsumeList(statDate, deptId);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package com.ruoyi.system.service.subteam.impl;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.ruoyi.ai.domain.AiBalanceChangeRecord;
|
import com.ruoyi.ai.domain.AiBalanceChangeRecord;
|
||||||
import com.ruoyi.ai.domain.AiChargeRefundOrder;
|
import com.ruoyi.ai.domain.AiChargeRefundOrder;
|
||||||
import com.ruoyi.ai.domain.AiGroupBalanceChangeRecord;
|
import com.ruoyi.ai.domain.AiGroupBalanceChangeRecord;
|
||||||
|
|
@ -63,8 +62,7 @@ public class SubteamDataQueryServiceImpl implements ISubteamDataQueryService {
|
||||||
public List<AiGroupBalanceChangeRecord> selectGroupBalanceRecords(AiGroupBalanceChangeRecord query) {
|
public List<AiGroupBalanceChangeRecord> selectGroupBalanceRecords(AiGroupBalanceChangeRecord query) {
|
||||||
Long deptId = subteamScopeService.currentTeamDeptId();
|
Long deptId = subteamScopeService.currentTeamDeptId();
|
||||||
query.setDeptId(deptId);
|
query.setDeptId(deptId);
|
||||||
return aiGroupBalanceChangeRecordMapper.selectList(
|
return aiGroupBalanceChangeRecordMapper.selectAiGroupBalanceChangeRecordList(query);
|
||||||
Wrappers.lambdaQuery(query).orderByDesc(AiGroupBalanceChangeRecord::getId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectAiChargeRefundOrderVo"/>
|
<include refid="selectAiChargeRefundOrderVo"/>
|
||||||
<where>
|
<where>
|
||||||
and o.del_flag = '0'
|
and o.del_flag = '0'
|
||||||
<if test="orderNum != null and orderNum != ''"> and o.order_num = #{orderNum}</if>
|
<if test="orderNum != null and orderNum != ''"> and o.order_num like concat('%', #{orderNum}, '%')</if>
|
||||||
<if test="thirdPartyOrderNum != null and thirdPartyOrderNum != ''"> and o.third_party_order_num = #{thirdPartyOrderNum}</if>
|
<if test="thirdPartyOrderNum != null and thirdPartyOrderNum != ''"> and o.third_party_order_num = #{thirdPartyOrderNum}</if>
|
||||||
<if test="deptId != null "> and o.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and o.dept_id = #{deptId}</if>
|
||||||
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
|
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="relationOrderNo" column="relation_order_no" />
|
<result property="relationOrderNo" column="relation_order_no" />
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="deptName" column="dept_name" />
|
||||||
<result property="type" column="type" />
|
<result property="type" column="type" />
|
||||||
<result property="changeAmount" column="change_amount" />
|
<result property="changeAmount" column="change_amount" />
|
||||||
<result property="resultAmount" column="result_amount" />
|
<result property="resultAmount" column="result_amount" />
|
||||||
|
|
@ -17,22 +18,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAiGroupBalanceChangeRecordVo">
|
<sql id="selectAiGroupBalanceChangeRecordVo">
|
||||||
select id, relation_order_no, dept_id, type, change_amount, result_amount, remark, create_time, update_time from ai_group_balance_change_record
|
select r.id, r.relation_order_no, r.dept_id, d.dept_name as dept_name, r.type, r.change_amount, r.result_amount,
|
||||||
|
r.remark, r.create_time, r.update_time
|
||||||
|
from ai_group_balance_change_record r
|
||||||
|
left join sys_dept d on d.dept_id = r.dept_id and d.del_flag = '0'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAiGroupBalanceChangeRecordList" parameterType="AiGroupBalanceChangeRecord" resultMap="AiGroupBalanceChangeRecordResult">
|
<select id="selectAiGroupBalanceChangeRecordList" parameterType="AiGroupBalanceChangeRecord" resultMap="AiGroupBalanceChangeRecordResult">
|
||||||
<include refid="selectAiGroupBalanceChangeRecordVo"/>
|
<include refid="selectAiGroupBalanceChangeRecordVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="relationOrderNo != null and relationOrderNo != ''"> and relation_order_no = #{relationOrderNo}</if>
|
<if test="relationOrderNo != null and relationOrderNo != ''"> and r.relation_order_no = #{relationOrderNo}</if>
|
||||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
<if test="deptId != null "> and r.dept_id = #{deptId}</if>
|
||||||
<if test="type != null "> and type = #{type}</if>
|
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
|
||||||
<if test="changeAmount != null "> and change_amount = #{changeAmount}</if>
|
<if test="type != null "> and r.type = #{type}</if>
|
||||||
<if test="resultAmount != null "> and result_amount = #{resultAmount}</if>
|
<if test="changeAmount != null "> and r.change_amount = #{changeAmount}</if>
|
||||||
|
<if test="resultAmount != null "> and r.result_amount = #{resultAmount}</if>
|
||||||
|
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
|
||||||
|
and date_format(r.create_time,'%Y%m%d') >= date_format(#{params.beginCreateTime},'%Y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endCreateTime != null and params.endCreateTime != ''">
|
||||||
|
and date_format(r.create_time,'%Y%m%d') <= date_format(#{params.endCreateTime},'%Y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by r.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAiGroupBalanceChangeRecordById" parameterType="long" resultMap="AiGroupBalanceChangeRecordResult">
|
<select id="selectAiGroupBalanceChangeRecordById" parameterType="long" resultMap="AiGroupBalanceChangeRecordResult">
|
||||||
<include refid="selectAiGroupBalanceChangeRecordVo"/>
|
<include refid="selectAiGroupBalanceChangeRecordVo"/>
|
||||||
where id = #{id}
|
where r.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAiVideoReportDataVo">
|
<sql id="selectAiVideoReportDataVo">
|
||||||
select id, date_key, dept_id, user_id, score, order_count, use_tokens, recharge_score, create_time, update_time from ai_video_report_data
|
select id, date_key, dept_id, user_id, score, recharge_score, order_count, use_tokens, create_time, update_time from ai_video_report_data
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAiVideoReportDataList" parameterType="AiVideoReportData" resultMap="AiVideoReportDataResult">
|
<select id="selectAiVideoReportDataList" parameterType="AiVideoReportData" resultMap="AiVideoReportDataResult">
|
||||||
|
|
@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAiVideoReportDataById" parameterType="String" resultMap="AiVideoReportDataResult">
|
<select id="selectAiVideoReportDataById" parameterType="Long" resultMap="AiVideoReportDataResult">
|
||||||
<include refid="selectAiVideoReportDataVo"/>
|
<include refid="selectAiVideoReportDataVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -66,22 +66,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateAiVideoReportData" parameterType="AiVideoReportData">
|
|
||||||
update ai_video_report_data
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="dateKey != null and dateKey != ''">date_key = #{dateKey},</if>
|
|
||||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
||||||
<if test="userId != null">user_id = #{userId},</if>
|
|
||||||
<if test="score != null">score = #{score},</if>
|
|
||||||
<if test="orderCount != null">order_count = #{orderCount},</if>
|
|
||||||
<if test="useTokens != null">use_tokens = #{useTokens},</if>
|
|
||||||
<if test="rechargeScore != null">recharge_score = #{rechargeScore},</if>
|
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="selectTeamDailyConsumeList" resultMap="AiVideoReportDataResult">
|
<select id="selectTeamDailyConsumeList" resultMap="AiVideoReportDataResult">
|
||||||
select
|
select
|
||||||
concat(substr(substr(vrd.date_key, 1, 8), 1, 4), '-', substr(substr(vrd.date_key, 1, 8), 5, 2), '-', substr(substr(vrd.date_key, 1, 8), 7, 2)) as date_key,
|
concat(substr(substr(vrd.date_key, 1, 8), 1, 4), '-', substr(substr(vrd.date_key, 1, 8), 5, 2), '-', substr(substr(vrd.date_key, 1, 8), 7, 2)) as date_key,
|
||||||
|
|
@ -153,15 +137,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
recharge_score = recharge_score + values(recharge_score),
|
recharge_score = recharge_score + values(recharge_score),
|
||||||
update_time = now()
|
update_time = now()
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deleteAiVideoReportDataById" parameterType="String">
|
|
||||||
delete from ai_video_report_data where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteAiVideoReportDataByIds" parameterType="String">
|
|
||||||
delete from ai_video_report_data where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -155,7 +155,7 @@ SELECT @parentId := LAST_INSERT_ID();
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
values('团队每日消耗统计查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'ai:data:list', '#', 'admin', sysdate(), '', null, '');
|
values('团队每日消耗统计查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'ai:data:list', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
-- AiVideoReportDataController 仍保留的其它接口权限(后台手工分配;前端当前未使用导出/增删改)
|
-- AiVideoReportData:仅查询与新增(及导出);无修改/删除接口
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
values('团队统计-详情', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'ai:data:query', '#', 'admin', sysdate(), '', null, '');
|
values('团队统计-详情', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'ai:data:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
|
@ -163,13 +163,7 @@ insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame
|
||||||
values('团队统计-新增', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'ai:data:add', '#', 'admin', sysdate(), '', null, '');
|
values('团队统计-新增', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'ai:data:add', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
values('团队统计-修改', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'ai:data:edit', '#', 'admin', sysdate(), '', null, '');
|
values('团队统计-导出', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'ai:data:export', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('团队统计-删除', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'ai:data:remove', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('团队统计-导出', @parentId, '6', '#', '', 1, 0, 'F', '0', '0', 'ai:data:export', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
-- 菜单 SQL
|
-- 菜单 SQL
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
values('团队(部门)对应火山引擎配置', '3', '1', 'config', 'ai/config/index', 1, 0, 'C', '0', '0', 'ai:config:list', '#', 'admin', sysdate(), '', null, '团队(部门)对应火山引擎配置菜单');
|
values('团队(部门)对应火山引擎配置', '3', '1', 'config', 'ai/config/index', 1, 0, 'C', '0', '0', 'ai:config:list', '#', 'admin', sysdate(), '', null, '团队(部门)对应火山引擎配置菜单');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue