mirror of
https://gitee.com/luojinyi/likeadmin_go.git
synced 2025-12-24 08:12:57 +08:00
完善了代码生成 字段编辑时保存
增加了 存储配置 阿里云oss 腾讯云cos 七牛云 kodo 文件上传和删除
This commit is contained in:
@@ -87,7 +87,7 @@ export function findFirstValidRoute(routes: RouteRecordRaw[]): string | undefine
|
||||
//通过权限字符查询路由路径
|
||||
export function getRoutePath(perms: string) {
|
||||
const routerObj = useRouter() || router
|
||||
console.log(routerObj);
|
||||
//console.log(routerObj);
|
||||
|
||||
return routerObj.getRoutes().find((item) => item.meta?.perms == perms)?.path || ''
|
||||
}
|
||||
|
||||
@@ -1,301 +1,192 @@
|
||||
<template>
|
||||
<div class="code-edit">
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-page-header content="编辑数据表" @back="$router.back()" />
|
||||
</el-card>
|
||||
<el-card class="mt-4 !border-none" shadow="never">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
class="ls-form"
|
||||
:model="formData"
|
||||
label-width="100px"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="基础信息" name="base">
|
||||
<el-form-item label="表名称" prop="base.tableName">
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.base.tableName"
|
||||
placeholder="请输入表名称"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="表描述" prop="base.tableComment">
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.base.tableComment"
|
||||
placeholder="请输入表描述"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="实体类名称" prop="base.entityName">
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.base.entityName"
|
||||
placeholder="请输入实体类名称"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div class="code-edit">
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-page-header content="编辑数据表" @back="$router.back()" />
|
||||
</el-card>
|
||||
<el-card class="mt-4 !border-none" shadow="never">
|
||||
<el-form ref="formRef" class="ls-form" :model="formData" label-width="100px" :rules="rules">
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="基础信息" name="base">
|
||||
<el-form-item label="表名称" prop="base.tableName">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.base.tableName" placeholder="请输入表名称" clearable />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="表描述" prop="base.tableComment">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.base.tableComment" placeholder="请输入表描述" clearable />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="实体类名称" prop="base.entityName">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.base.entityName" placeholder="请输入实体类名称" clearable />
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="作者" prop="base.authorName">
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.base.authorName"
|
||||
placeholder="请输入作者"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.base.remarks"
|
||||
class="w-full"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||
maxlength="200"
|
||||
show-word-limit
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="字段管理" name="column">
|
||||
<el-table :data="formData.column">
|
||||
<el-table-column label="字段列名" prop="columnName" />
|
||||
<el-table-column
|
||||
label="字段描述"
|
||||
prop="columnComment"
|
||||
min-width="120"
|
||||
>
|
||||
<template v-slot="{ row }">
|
||||
<el-input v-model="row.columnComment"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="物理类型"
|
||||
prop="columnType"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column label="python类型" min-width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-select v-model="row.pyType">
|
||||
<el-option label="Long" value="Long" />
|
||||
<el-option label="String" value="String" />
|
||||
<el-option label="Integer" value="Integer" />
|
||||
<el-option label="Double" value="Double" />
|
||||
<el-option label="BigDecimal" value="BigDecimal" />
|
||||
<el-option label="Date" value="Date" />
|
||||
<el-option label="Boolean" value="Boolean" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="python属性" min-width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-input v-model="row.pyField" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="必填" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox
|
||||
v-model="row.isRequired"
|
||||
:true-label="1"
|
||||
:false-label="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="插入" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox
|
||||
v-model="row.isInsert"
|
||||
:true-label="1"
|
||||
:false-label="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编辑" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox
|
||||
v-model="row.isEdit"
|
||||
:true-label="1"
|
||||
:false-label="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="列表" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox
|
||||
v-model="row.isList"
|
||||
:true-label="1"
|
||||
:false-label="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="查询" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox
|
||||
v-model="row.isQuery"
|
||||
:true-label="1"
|
||||
:false-label="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="查询方式">
|
||||
<template v-slot="{ row }">
|
||||
<el-select v-model="row.queryType">
|
||||
<el-option label="=" value="EQ" />
|
||||
<el-option label="!=" value="NE" />
|
||||
<el-option label=">" value="GT" />
|
||||
<el-option label=">=" value="GTE" />
|
||||
<el-option label="<" value="LT" />
|
||||
<el-option label="<=" value="LTE" />
|
||||
<el-option label="LIKE" value="LIKE" />
|
||||
<el-option label="BETWEEN" value="BETWEEN" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示类型" min-width="120">
|
||||
<template v-slot="{ row }">
|
||||
<el-select v-model="row.htmlType">
|
||||
<el-option label="文本框" value="input" />
|
||||
<el-option label="数字框" value="number" />
|
||||
<el-option label="文本域" value="textarea" />
|
||||
<el-option label="下拉框" value="select" />
|
||||
<el-option label="单选框" value="radio" />
|
||||
<el-option label="复选框" value="checkbox" />
|
||||
<el-option label="日期控件" value="datetime" />
|
||||
<el-option label="图片选择控件" value="imageUpload" />
|
||||
<el-option label="富文本控件" value="editor" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="字典类型" min-width="120">
|
||||
<template v-slot="{ row }">
|
||||
<el-select
|
||||
v-model="row.dictType"
|
||||
clearable
|
||||
:disabled="
|
||||
!(
|
||||
row.htmlType == 'select' ||
|
||||
row.htmlType == 'radio' ||
|
||||
row.htmlType == 'checkbox'
|
||||
)
|
||||
"
|
||||
placeholder="字典类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.dictType"
|
||||
:key="index"
|
||||
:label="item.dictName"
|
||||
:value="item.dictType"
|
||||
:disabled="!item.dictStatus"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="生成配置" name="config">
|
||||
<el-form-item label="模板类型" prop="gen.genTpl" required>
|
||||
<el-radio-group v-model="formData.gen.genTpl">
|
||||
<el-radio :label="GenTpl.CRUD">单表(增删改查)</el-radio>
|
||||
<el-radio :label="GenTpl.TREE">树表(增删改查)</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="模块名" prop="gen.moduleName">
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.gen.moduleName"
|
||||
placeholder="请输入模块名"
|
||||
clearable
|
||||
/>
|
||||
<div class="form-tips">生成文件所在模块名</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="功能名称" prop="gen.functionName">
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.gen.functionName"
|
||||
placeholder="请输入功能名称"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式" prop="gen.genType">
|
||||
<el-radio-group v-model="formData.gen.genType">
|
||||
<el-radio :label="GenType.ZIP">压缩包下载</el-radio>
|
||||
<el-radio :label="GenType.CUSTOM_PATH">自定义路径</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="formData.gen.genType == GenType.CUSTOM_PATH"
|
||||
label="自定义路径"
|
||||
prop="gen.genPath"
|
||||
>
|
||||
<div class="w-80">
|
||||
<el-input
|
||||
v-model="formData.gen.genPath"
|
||||
placeholder="请输入自定义路径"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<template v-if="formData.gen.genTpl == GenTpl.TREE">
|
||||
<el-form-item label="树主键字段" prop="gen.treePrimary">
|
||||
<el-select
|
||||
class="w-80"
|
||||
v-model="formData.gen.treePrimary"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in formData.column"
|
||||
:key="item.id"
|
||||
:value="item.columnName"
|
||||
:label="`${item.columnName}:${item.columnComment}`"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="树父级字段" prop="gen.treeParent">
|
||||
<el-select
|
||||
class="w-80"
|
||||
v-model="formData.gen.treeParent"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in formData.column"
|
||||
:key="item.id"
|
||||
:value="item.columnName"
|
||||
:label="`${item.columnName}:${item.columnComment}`"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="树名称字段" prop="gen.treeName">
|
||||
<el-select
|
||||
class="w-80"
|
||||
v-model="formData.gen.treeName"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in formData.column"
|
||||
:key="item.id"
|
||||
:value="item.columnName"
|
||||
:label="`${item.columnName}:${item.columnComment}`"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<footer-btns>
|
||||
<el-button type="primary" @click="handleSave">保存</el-button>
|
||||
</footer-btns>
|
||||
</div>
|
||||
<el-form-item label="作者" prop="base.authorName">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.base.authorName" placeholder="请输入作者" clearable />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.base.remarks" class="w-full" type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 4 }" maxlength="200" show-word-limit clearable />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="字段管理" name="column">
|
||||
<el-table :data="formData.column">
|
||||
<el-table-column label="字段列名" prop="columnName" />
|
||||
<el-table-column label="字段描述" prop="columnComment" min-width="120">
|
||||
<template v-slot="{ row }">
|
||||
<el-input v-model="row.columnComment"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="mysql类型" prop="columnType" min-width="100" />
|
||||
<el-table-column label="go类型" min-width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-select v-model="row.goType">
|
||||
<el-option label="int64" value="int64" />
|
||||
<el-option label="int32" value="int32" />
|
||||
<el-option label="string" value="string" />
|
||||
<el-option label="float32" value="float32" />
|
||||
<el-option label="float64" value="float64" />
|
||||
<el-option label="decimal" value="decimal" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="go属性" min-width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-input v-model="row.goField" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="必填" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox v-model="row.isRequired" :true-label="1" :false-label="0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="插入" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox v-model="row.isInsert" :true-label="1" :false-label="0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编辑" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox v-model="row.isEdit" :true-label="1" :false-label="0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="列表" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox v-model="row.isList" :true-label="1" :false-label="0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="查询" width="80">
|
||||
<template v-slot="{ row }">
|
||||
<el-checkbox v-model="row.isQuery" :true-label="1" :false-label="0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="查询方式">
|
||||
<template v-slot="{ row }">
|
||||
<el-select v-model="row.queryType">
|
||||
<el-option label="=" value="EQ" />
|
||||
<el-option label="!=" value="NE" />
|
||||
<el-option label=">" value="GT" />
|
||||
<el-option label=">=" value="GTE" />
|
||||
<el-option label="<" value="LT" />
|
||||
<el-option label="<=" value="LTE" />
|
||||
<el-option label="LIKE" value="LIKE" />
|
||||
<el-option label="BETWEEN" value="BETWEEN" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示类型" min-width="120">
|
||||
<template v-slot="{ row }">
|
||||
<el-select v-model="row.htmlType">
|
||||
<el-option label="文本框" value="input" />
|
||||
<el-option label="数字框" value="number" />
|
||||
<el-option label="文本域" value="textarea" />
|
||||
<el-option label="下拉框" value="select" />
|
||||
<el-option label="单选框" value="radio" />
|
||||
<el-option label="复选框" value="checkbox" />
|
||||
<el-option label="日期控件" value="datetime" />
|
||||
<el-option label="图片选择控件" value="imageUpload" />
|
||||
<el-option label="富文本控件" value="editor" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="字典类型" min-width="120">
|
||||
<template v-slot="{ row }">
|
||||
<el-select v-model="row.dictType" clearable :disabled="!(
|
||||
row.htmlType == 'select' ||
|
||||
row.htmlType == 'radio' ||
|
||||
row.htmlType == 'checkbox'
|
||||
)
|
||||
" placeholder="字典类型">
|
||||
<el-option v-for="(item, index) in optionsData.dictType" :key="index"
|
||||
:label="item.dictName" :value="item.dictType" :disabled="!item.dictStatus" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="生成配置" name="config">
|
||||
<el-form-item label="模板类型" prop="gen.genTpl" required>
|
||||
<el-radio-group v-model="formData.gen.genTpl">
|
||||
<el-radio :label="GenTpl.CRUD">单表(增删改查)</el-radio>
|
||||
<el-radio :label="GenTpl.TREE">树表(增删改查)</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="模块名" prop="gen.moduleName">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.gen.moduleName" placeholder="请输入模块名" clearable />
|
||||
<div class="form-tips">生成文件所在模块名</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="功能名称" prop="gen.functionName">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.gen.functionName" placeholder="请输入功能名称" clearable />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式" prop="gen.genType">
|
||||
<el-radio-group v-model="formData.gen.genType">
|
||||
<el-radio :label="GenType.ZIP">压缩包下载</el-radio>
|
||||
<el-radio :label="GenType.CUSTOM_PATH">自定义路径</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.gen.genType == GenType.CUSTOM_PATH" label="自定义路径" prop="gen.genPath">
|
||||
<div class="w-80">
|
||||
<el-input v-model="formData.gen.genPath" placeholder="请输入自定义路径" clearable />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<template v-if="formData.gen.genTpl == GenTpl.TREE">
|
||||
<el-form-item label="树主键字段" prop="gen.treePrimary">
|
||||
<el-select class="w-80" v-model="formData.gen.treePrimary" clearable>
|
||||
<el-option v-for="item in formData.column" :key="item.id" :value="item.columnName"
|
||||
:label="`${item.columnName}:${item.columnComment}`" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="树父级字段" prop="gen.treeParent">
|
||||
<el-select class="w-80" v-model="formData.gen.treeParent" clearable>
|
||||
<el-option v-for="item in formData.column" :key="item.id" :value="item.columnName"
|
||||
:label="`${item.columnName}:${item.columnComment}`" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="树名称字段" prop="gen.treeName">
|
||||
<el-select class="w-80" v-model="formData.gen.treeName" clearable>
|
||||
<el-option v-for="item in formData.column" :key="item.id" :value="item.columnName"
|
||||
:label="`${item.columnName}:${item.columnComment}`" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<footer-btns>
|
||||
<el-button type="primary" @click="handleSave">保存</el-button>
|
||||
</footer-btns>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="tableEdit">
|
||||
@@ -307,13 +198,13 @@ import { menuLists } from "@/api/perms/menu";
|
||||
import { useDictOptions } from "@/hooks/useDictOptions";
|
||||
import useMultipleTabs from "@/hooks/useMultipleTabs";
|
||||
enum GenTpl {
|
||||
CRUD = "crud",
|
||||
TREE = "tree",
|
||||
CRUD = "crud",
|
||||
TREE = "tree",
|
||||
}
|
||||
|
||||
enum GenType {
|
||||
ZIP,
|
||||
CUSTOM_PATH,
|
||||
ZIP,
|
||||
CUSTOM_PATH,
|
||||
}
|
||||
|
||||
const route = useRoute();
|
||||
@@ -321,101 +212,101 @@ const router = useRouter();
|
||||
const { removeTab } = useMultipleTabs();
|
||||
const activeName = ref("column");
|
||||
const formData = reactive({
|
||||
base: {
|
||||
id: "",
|
||||
tableName: "",
|
||||
tableComment: "",
|
||||
entityName: "",
|
||||
authorName: "",
|
||||
remarks: "",
|
||||
},
|
||||
column: [] as any[],
|
||||
gen: {
|
||||
functionName: "",
|
||||
genPath: "",
|
||||
genTpl: "",
|
||||
genType: 0,
|
||||
moduleName: "",
|
||||
subTableFk: "",
|
||||
subTableName: "",
|
||||
treeParent: "",
|
||||
treePrimary: "",
|
||||
treeName: "",
|
||||
},
|
||||
base: {
|
||||
id: "",
|
||||
tableName: "",
|
||||
tableComment: "",
|
||||
entityName: "",
|
||||
authorName: "",
|
||||
remarks: "",
|
||||
},
|
||||
column: [] as any[],
|
||||
gen: {
|
||||
functionName: "",
|
||||
genPath: "",
|
||||
genTpl: "",
|
||||
genType: 0,
|
||||
moduleName: "",
|
||||
subTableFk: "",
|
||||
subTableName: "",
|
||||
treeParent: "",
|
||||
treePrimary: "",
|
||||
treeName: "",
|
||||
},
|
||||
});
|
||||
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const rules = reactive({
|
||||
["base.tableName"]: [
|
||||
{ required: true, message: "请输入表名称", trigger: "blur" },
|
||||
],
|
||||
["base.tableComment"]: [
|
||||
{ required: true, message: "请输入表描述", trigger: "blur" },
|
||||
],
|
||||
["base.entityName"]: [
|
||||
{ required: true, message: "请输入实体类名称", trigger: "blur" },
|
||||
],
|
||||
["base.authorName"]: [
|
||||
{ required: true, message: "请输入作者", trigger: "blur" },
|
||||
],
|
||||
["gen.moduleName"]: [
|
||||
{ required: true, message: "请输入模块名", trigger: "blur" },
|
||||
],
|
||||
["gen.functionName"]: [
|
||||
{ required: true, message: "请输入功能名称", trigger: "blur" },
|
||||
],
|
||||
["gen.treePrimary"]: [
|
||||
{ required: true, message: "请选择树主键字段", trigger: "blur" },
|
||||
],
|
||||
["gen.treeParent"]: [
|
||||
{ required: true, message: "请选择树父级字段", trigger: "blur" },
|
||||
],
|
||||
["gen.treeName"]: [
|
||||
{ required: true, message: "请选择树名称字段", trigger: "blur" },
|
||||
],
|
||||
["base.tableName"]: [
|
||||
{ required: true, message: "请输入表名称", trigger: "blur" },
|
||||
],
|
||||
["base.tableComment"]: [
|
||||
{ required: true, message: "请输入表描述", trigger: "blur" },
|
||||
],
|
||||
["base.entityName"]: [
|
||||
{ required: true, message: "请输入实体类名称", trigger: "blur" },
|
||||
],
|
||||
["base.authorName"]: [
|
||||
{ required: true, message: "请输入作者", trigger: "blur" },
|
||||
],
|
||||
["gen.moduleName"]: [
|
||||
{ required: true, message: "请输入模块名", trigger: "blur" },
|
||||
],
|
||||
["gen.functionName"]: [
|
||||
{ required: true, message: "请输入功能名称", trigger: "blur" },
|
||||
],
|
||||
["gen.treePrimary"]: [
|
||||
{ required: true, message: "请选择树主键字段", trigger: "blur" },
|
||||
],
|
||||
["gen.treeParent"]: [
|
||||
{ required: true, message: "请选择树父级字段", trigger: "blur" },
|
||||
],
|
||||
["gen.treeName"]: [
|
||||
{ required: true, message: "请选择树名称字段", trigger: "blur" },
|
||||
],
|
||||
});
|
||||
|
||||
const getDetails = async () => {
|
||||
const data = await tableDetail({
|
||||
id: route.query.id,
|
||||
});
|
||||
Object.keys(formData).forEach((key) => {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
});
|
||||
const data = await tableDetail({
|
||||
id: route.query.id,
|
||||
});
|
||||
Object.keys(formData).forEach((key) => {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
});
|
||||
};
|
||||
|
||||
const { optionsData } = useDictOptions<{
|
||||
dictType: any[];
|
||||
menu: any[];
|
||||
dictType: any[];
|
||||
menu: any[];
|
||||
}>({
|
||||
dictType: {
|
||||
api: dictTypeAll,
|
||||
},
|
||||
menu: {
|
||||
api: menuLists,
|
||||
transformData(data: any) {
|
||||
const menu = { id: 0, name: "顶级", children: [] };
|
||||
menu.children = data;
|
||||
return menu;
|
||||
dictType: {
|
||||
api: dictTypeAll,
|
||||
},
|
||||
menu: {
|
||||
api: menuLists,
|
||||
transformData(data: any) {
|
||||
const menu = { id: 0, name: "顶级", children: [] };
|
||||
menu.children = data;
|
||||
return menu;
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const handleSave = async () => {
|
||||
try {
|
||||
await formRef.value?.validate();
|
||||
const { base, column, gen } = formData;
|
||||
await generateEdit({ ...base, ...gen, columns: column });
|
||||
feedback.msgSuccess("操作成功");
|
||||
removeTab();
|
||||
router.back();
|
||||
} catch (error: any) {
|
||||
for (const err in error) {
|
||||
const isInRules = Object.keys(rules).includes(err);
|
||||
isInRules && feedback.msgError(error[err][0]?.message);
|
||||
try {
|
||||
await formRef.value?.validate();
|
||||
const { base, column, gen } = formData;
|
||||
await generateEdit({ ...base, ...gen, columns: column });
|
||||
feedback.msgSuccess("操作成功");
|
||||
removeTab();
|
||||
router.back();
|
||||
} catch (error: any) {
|
||||
for (const err in error) {
|
||||
const isInRules = Object.keys(rules).includes(err);
|
||||
isInRules && feedback.msgError(error[err][0]?.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getDetails();
|
||||
|
||||
@@ -3,20 +3,10 @@
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="formData" inline>
|
||||
<el-form-item label="表名称">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="formData.tableName"
|
||||
clearable
|
||||
@keyup.enter="resetPage"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="formData.tableName" clearable @keyup.enter="resetPage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="表描述">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="formData.tableComment"
|
||||
clearable
|
||||
@keyup.enter="resetPage"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="formData.tableComment" clearable @keyup.enter="resetPage" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
@@ -26,11 +16,7 @@
|
||||
</el-card>
|
||||
<el-card class="!border-none mt-4" shadow="never" v-loading="pager.loading">
|
||||
<div class="flex">
|
||||
<data-table
|
||||
v-perms="['gen:importTable']"
|
||||
class="inline-block mr-[10px]"
|
||||
@success="getLists"
|
||||
>
|
||||
<data-table v-perms="['gen:importTable']" class="inline-block mr-[10px]" @success="getLists">
|
||||
<el-button type="primary">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
@@ -38,31 +24,19 @@
|
||||
导入数据表
|
||||
</el-button>
|
||||
</data-table>
|
||||
<el-button
|
||||
v-perms="['gen:delTable']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete()"
|
||||
type="danger"
|
||||
>
|
||||
<el-button v-perms="['gen:delTable']" :disabled="!selectData.length" @click="handleDelete()" type="danger">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Delete" />
|
||||
</template>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['gen:genCode', 'gen:downloadCode']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleGenerate(selectData)"
|
||||
>
|
||||
<el-button v-perms="['gen:genCode', 'gen:downloadCode']" :disabled="!selectData.length"
|
||||
@click="handleGenerate(selectData)">
|
||||
生成代码
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<el-table
|
||||
:data="pager.lists"
|
||||
size="large"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table :data="pager.lists" size="large" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="表名称" prop="tableName" min-width="180" />
|
||||
<el-table-column label="表描述" prop="tableComment" min-width="180" />
|
||||
@@ -71,37 +45,26 @@
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center">
|
||||
<el-button
|
||||
v-perms="['gen:previewCode']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handlePreview(row.id)"
|
||||
>
|
||||
<el-button v-perms="['gen:previewCode']" type="primary" link @click="handlePreview(row.id)">
|
||||
预览
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" link v-perms="['gen:editTable']">
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('gen:editTable'),
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
}"
|
||||
>
|
||||
<el-button type="primary" link v-perms="['gen:edit']">
|
||||
<router-link :to="{
|
||||
path: getRoutePath('gen:edit'),
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
}">
|
||||
编辑
|
||||
</router-link>
|
||||
</el-button>
|
||||
<el-dropdown
|
||||
class="ml-2"
|
||||
@command="handleCommand($event, row)"
|
||||
v-perms="[
|
||||
'gen:genCode',
|
||||
'gen:downloadCode',
|
||||
'gen:syncTable',
|
||||
'gen:delTable'
|
||||
]"
|
||||
>
|
||||
<el-dropdown class="ml-2" @command="handleCommand($event, row)" v-perms="[
|
||||
'gen:genCode',
|
||||
'gen:downloadCode',
|
||||
'gen:syncTable',
|
||||
'gen:delTable'
|
||||
]">
|
||||
<el-button type="primary" link>
|
||||
更多
|
||||
<icon name="el-icon-ArrowDown" :size="14" />
|
||||
@@ -140,11 +103,7 @@
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<code-preview
|
||||
v-if="previewState.show"
|
||||
v-model="previewState.show"
|
||||
:code="previewState.code"
|
||||
/>
|
||||
<code-preview v-if="previewState.show" v-model="previewState.show" :code="previewState.code" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -87,10 +87,6 @@ let defaultPayWay = {}
|
||||
const getConfig = async () => {
|
||||
payWay.value = await getPayWay()
|
||||
defaultPayWay = cloneDeep(payWay.value)
|
||||
|
||||
console.log(defaultPayWay);
|
||||
|
||||
|
||||
}
|
||||
|
||||
const handelSetupPayWay = () => {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="form-tips">{{ getStorageInfo?.tips }}</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div v-if="formData.engine !== 'local'">
|
||||
<div v-if="formData.engine != StorageEnum.LOCAL">
|
||||
<el-form-item label=" 存储空间名称" prop="bucket">
|
||||
<div class="flex-1">
|
||||
<el-input v-model="formData.bucket" placeholder="请输入存储空间名称(Bucket)" clearable />
|
||||
@@ -20,6 +20,9 @@
|
||||
<el-form-item label="SECRET_KEY" prop="secret_key">
|
||||
<el-input v-model="formData.secret_key" placeholder="请输入SECRET_KEY(SK)" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.engine == StorageEnum.ALIYUN" label="Endpoint" prop="endpoint">
|
||||
<el-input v-model="formData.endpoint" placeholder="请输入Endpoint" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="空间域名" prop="domain">
|
||||
<div class="flex-1">
|
||||
<div>
|
||||
@@ -66,6 +69,7 @@ const formData = reactive({
|
||||
bucket: '',
|
||||
access_key: '',
|
||||
secret_key: '',
|
||||
endpoint: '',
|
||||
domain: '',
|
||||
region: '', // 腾讯云需要
|
||||
status: 0
|
||||
@@ -116,6 +120,13 @@ const formRules = {
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
endpoint: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入Endpoint',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
domain: [
|
||||
{
|
||||
required: true,
|
||||
|
||||
@@ -34,7 +34,7 @@ type albumHandler struct {
|
||||
srv common.IAlbumService
|
||||
}
|
||||
|
||||
//albumList 相册文件列表
|
||||
// albumList 相册文件列表
|
||||
func (ah albumHandler) albumList(c *gin.Context) {
|
||||
var page request.PageReq
|
||||
var listReq req.CommonAlbumListReq
|
||||
@@ -48,7 +48,7 @@ func (ah albumHandler) albumList(c *gin.Context) {
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
//albumRename 相册文件重命名
|
||||
// albumRename 相册文件重命名
|
||||
func (ah albumHandler) albumRename(c *gin.Context) {
|
||||
var rnReq req.CommonAlbumRenameReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &rnReq)) {
|
||||
@@ -57,7 +57,7 @@ func (ah albumHandler) albumRename(c *gin.Context) {
|
||||
response.CheckAndResp(c, ah.srv.AlbumRename(rnReq.ID, rnReq.Name))
|
||||
}
|
||||
|
||||
//albumMove 相册文件移动
|
||||
// albumMove 相册文件移动
|
||||
func (ah albumHandler) albumMove(c *gin.Context) {
|
||||
var mvReq req.CommonAlbumMoveReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &mvReq)) {
|
||||
@@ -66,16 +66,17 @@ func (ah albumHandler) albumMove(c *gin.Context) {
|
||||
response.CheckAndResp(c, ah.srv.AlbumMove(mvReq.Ids, mvReq.Cid))
|
||||
}
|
||||
|
||||
//albumDel 相册文件删除
|
||||
// albumDel 相册文件删除
|
||||
func (ah albumHandler) albumDel(c *gin.Context) {
|
||||
var delReq req.CommonAlbumDelReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||
return
|
||||
}
|
||||
response.CheckAndResp(c, ah.srv.AlbumDel(delReq.Ids))
|
||||
//TODO 服务端文件的删除
|
||||
}
|
||||
|
||||
//cateList 类目列表
|
||||
// cateList 类目列表
|
||||
func (ah albumHandler) cateList(c *gin.Context) {
|
||||
var listReq req.CommonCateListReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||
@@ -85,7 +86,7 @@ func (ah albumHandler) cateList(c *gin.Context) {
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
//cateAdd 类目新增
|
||||
// cateAdd 类目新增
|
||||
func (ah albumHandler) cateAdd(c *gin.Context) {
|
||||
var addReq req.CommonCateAddReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &addReq)) {
|
||||
@@ -94,7 +95,7 @@ func (ah albumHandler) cateAdd(c *gin.Context) {
|
||||
response.CheckAndResp(c, ah.srv.CateAdd(addReq))
|
||||
}
|
||||
|
||||
//cateRename 类目命名
|
||||
// cateRename 类目命名
|
||||
func (ah albumHandler) cateRename(c *gin.Context) {
|
||||
var rnReq req.CommonCateRenameReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &rnReq)) {
|
||||
@@ -103,7 +104,7 @@ func (ah albumHandler) cateRename(c *gin.Context) {
|
||||
response.CheckAndResp(c, ah.srv.CateRename(rnReq.ID, rnReq.Name))
|
||||
}
|
||||
|
||||
//cateDel 类目删除
|
||||
// cateDel 类目删除
|
||||
func (ah albumHandler) cateDel(c *gin.Context) {
|
||||
var delReq req.CommonCateDelReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||
|
||||
@@ -39,11 +39,12 @@ type SettingStorageEditReq struct {
|
||||
Name string `json:"name" binding:"required"` // 名称
|
||||
Describe string `json:"describe" binding:"required"` // 描述
|
||||
Bucket string `json:"bucket,omitempty"` // 存储空间名
|
||||
SecretKey string `json:"secret_key,omitempty"` // SK
|
||||
AccessKey string `json:"access_key,omitempty"` // AK
|
||||
Domain string `json:"domain,omitempty"` // 访问域名
|
||||
Region string `json:"region,omitempty"` // 地区,腾讯存储特有
|
||||
Status int32 `json:"status,omitempty"` // 状态
|
||||
Endpoint string `json:"endpoint,omitempty"`
|
||||
SecretKey string `json:"secret_key,omitempty"` // SK
|
||||
AccessKey string `json:"access_key,omitempty"` // AK
|
||||
Domain string `json:"domain,omitempty"` // 访问域名
|
||||
Region string `json:"region,omitempty"` // 地区,腾讯存储特有
|
||||
Status int32 `json:"status,omitempty"` // 状态
|
||||
}
|
||||
|
||||
// SettingStorageChangeReq 存储切换参数
|
||||
|
||||
@@ -58,6 +58,7 @@ type StorageSettingResp struct {
|
||||
Engine string `json:"engine" structs:"engine"`
|
||||
Describe string `json:"describe" structs:"describe"`
|
||||
Bucket string `json:"bucket,omitempty" structs:"bucket"`
|
||||
Endpoint string `json:"endpoint,omitempty" structs:"endpoint"`
|
||||
AccessKey string `json:"access_key,omitempty" structs:"access_key"`
|
||||
Domain string `json:"domain,omitempty" structs:"domain"`
|
||||
SecretKey string `json:"secret_key,omitempty" structs:"secret_key"`
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"likeadmin/core/request"
|
||||
"likeadmin/core/response"
|
||||
"likeadmin/model/common"
|
||||
"likeadmin/plugin"
|
||||
"likeadmin/util"
|
||||
"path"
|
||||
"time"
|
||||
@@ -25,17 +26,17 @@ type IAlbumService interface {
|
||||
CateDel(id uint) (e error)
|
||||
}
|
||||
|
||||
//NewAlbumService 初始化
|
||||
// NewAlbumService 初始化
|
||||
func NewAlbumService(db *gorm.DB) IAlbumService {
|
||||
return &albumService{db: db}
|
||||
}
|
||||
|
||||
//albumService 相册服务实现类
|
||||
// albumService 相册服务实现类
|
||||
type albumService struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
//AlbumList 相册文件列表
|
||||
// AlbumList 相册文件列表
|
||||
func (albSrv albumService) AlbumList(page request.PageReq, listReq req.CommonAlbumListReq) (res response.PageResp, e error) {
|
||||
// 分页信息
|
||||
limit := page.PageSize
|
||||
@@ -84,7 +85,7 @@ func (albSrv albumService) AlbumList(page request.PageReq, listReq req.CommonAlb
|
||||
}, nil
|
||||
}
|
||||
|
||||
//AlbumRename 相册文件重命名
|
||||
// AlbumRename 相册文件重命名
|
||||
func (albSrv albumService) AlbumRename(id uint, name string) (e error) {
|
||||
var album common.Album
|
||||
err := albSrv.db.Where("id = ? AND is_delete = ?", id, 0).Limit(1).First(&album).Error
|
||||
@@ -100,7 +101,7 @@ func (albSrv albumService) AlbumRename(id uint, name string) (e error) {
|
||||
return
|
||||
}
|
||||
|
||||
//AlbumMove 相册文件移动
|
||||
// AlbumMove 相册文件移动
|
||||
func (albSrv albumService) AlbumMove(ids []uint, cid int) (e error) {
|
||||
var albums []common.Album
|
||||
err := albSrv.db.Where("id in ? AND is_delete = ?", ids, 0).Find(&albums).Error
|
||||
@@ -124,7 +125,7 @@ func (albSrv albumService) AlbumMove(ids []uint, cid int) (e error) {
|
||||
return
|
||||
}
|
||||
|
||||
//AlbumAdd 相册文件新增
|
||||
// AlbumAdd 相册文件新增
|
||||
func (albSrv albumService) AlbumAdd(addReq req.CommonAlbumAddReq) (res uint, e error) {
|
||||
var alb common.Album
|
||||
//var params map[string]interface{}
|
||||
@@ -140,7 +141,7 @@ func (albSrv albumService) AlbumAdd(addReq req.CommonAlbumAddReq) (res uint, e e
|
||||
return alb.ID, nil
|
||||
}
|
||||
|
||||
//AlbumDel 相册文件删除
|
||||
// AlbumDel 相册文件删除
|
||||
func (albSrv albumService) AlbumDel(ids []uint) (e error) {
|
||||
var albums []common.Album
|
||||
err := albSrv.db.Where("id in ? AND is_delete = ?", ids, 0).Find(&albums).Error
|
||||
@@ -153,10 +154,16 @@ func (albSrv albumService) AlbumDel(ids []uint) (e error) {
|
||||
err = albSrv.db.Model(&common.Album{}).Where("id in ?", ids).Updates(
|
||||
common.Album{IsDelete: 1, DeleteTime: time.Now().Unix()}).Error
|
||||
e = response.CheckErr(err, "AlbumDel UpdateColumn err")
|
||||
|
||||
// 删除文件
|
||||
for _, album := range albums {
|
||||
plugin.StorageDriver.DelFile(album.Uri)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
//CateList 相册分类列表
|
||||
// CateList 相册分类列表
|
||||
func (albSrv albumService) CateList(listReq req.CommonCateListReq) (mapList []interface{}, e error) {
|
||||
var cates []common.AlbumCate
|
||||
cateModel := albSrv.db.Where("is_delete = ?", 0).Order("id desc")
|
||||
@@ -176,7 +183,7 @@ func (albSrv albumService) CateList(listReq req.CommonCateListReq) (mapList []in
|
||||
util.ConvertUtil.StructsToMaps(cateResps), "id", "pid", "children"), nil
|
||||
}
|
||||
|
||||
//CateAdd 分类新增
|
||||
// CateAdd 分类新增
|
||||
func (albSrv albumService) CateAdd(addReq req.CommonCateAddReq) (e error) {
|
||||
var cate common.AlbumCate
|
||||
response.Copy(&cate, addReq)
|
||||
@@ -185,7 +192,7 @@ func (albSrv albumService) CateAdd(addReq req.CommonCateAddReq) (e error) {
|
||||
return
|
||||
}
|
||||
|
||||
//CateRename 分类重命名
|
||||
// CateRename 分类重命名
|
||||
func (albSrv albumService) CateRename(id uint, name string) (e error) {
|
||||
var cate common.AlbumCate
|
||||
err := albSrv.db.Where("id = ? AND is_delete = ?", id, 0).Limit(1).First(&cate).Error
|
||||
@@ -201,7 +208,7 @@ func (albSrv albumService) CateRename(id uint, name string) (e error) {
|
||||
return
|
||||
}
|
||||
|
||||
//CateDel 分类删除
|
||||
// CateDel 分类删除
|
||||
func (albSrv albumService) CateDel(id uint) (e error) {
|
||||
var cate common.AlbumCate
|
||||
err := albSrv.db.Where("id = ? AND is_delete = ?", id, 0).Limit(1).First(&cate).Error
|
||||
|
||||
@@ -13,27 +13,27 @@ type IUploadService interface {
|
||||
UploadVideo(file *multipart.FileHeader, cid uint, aid uint) (res resp.CommonUploadFileResp, e error)
|
||||
}
|
||||
|
||||
//NewUploadService 初始化
|
||||
// NewUploadService 初始化
|
||||
func NewUploadService(albSrv IAlbumService) IUploadService {
|
||||
return &uploadService{albSrv}
|
||||
}
|
||||
|
||||
//uploadService 上传服务实现类
|
||||
// uploadService 上传服务实现类
|
||||
type uploadService struct {
|
||||
albSrv IAlbumService
|
||||
}
|
||||
|
||||
//UploadImage 上传图片
|
||||
// UploadImage 上传图片
|
||||
func (upSrv uploadService) UploadImage(file *multipart.FileHeader, cid uint, aid uint) (res resp.CommonUploadFileResp, e error) {
|
||||
return upSrv.uploadFile(file, "image", 10, cid, aid)
|
||||
}
|
||||
|
||||
//UploadVideo 上传视频
|
||||
// UploadVideo 上传视频
|
||||
func (upSrv uploadService) UploadVideo(file *multipart.FileHeader, cid uint, aid uint) (res resp.CommonUploadFileResp, e error) {
|
||||
return upSrv.uploadFile(file, "video", 20, cid, aid)
|
||||
}
|
||||
|
||||
//uploadFile 上传文件
|
||||
// uploadFile 上传文件
|
||||
func (upSrv uploadService) uploadFile(file *multipart.FileHeader, folder string, fileType int, cid uint, aid uint) (res resp.CommonUploadFileResp, e error) {
|
||||
var upRes *plugin.UploadFile
|
||||
if upRes, e = plugin.StorageDriver.Upload(file, folder, fileType); e != nil {
|
||||
|
||||
@@ -175,7 +175,7 @@ func (srv rechargeOrderService) Refund(c *gin.Context, refundReq req.RechargeOrd
|
||||
|
||||
// 写入退款记录
|
||||
refundRecord := &model.RefundRecord{
|
||||
Sn: srv.refundSrv.GenerateSN("RF", 10),
|
||||
Sn: srv.refundSrv.GenerateSN("RF", 4),
|
||||
UserID: order.UserID,
|
||||
UserSn: order.User.Sn,
|
||||
OrderID: order.ID,
|
||||
|
||||
@@ -92,6 +92,7 @@ func GetUserMoneyChangeTypeDesc(changeType int32) string {
|
||||
func GetRefundTypeDesc(refundType int32) string {
|
||||
return RefundTypeDesc[refundType]
|
||||
}
|
||||
|
||||
func GetRefundStatusDesc(refundStatus int32) string {
|
||||
return RefundStatusDesc[refundStatus]
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@ package req
|
||||
|
||||
import "time"
|
||||
|
||||
//DbTablesReq 库表列表参数
|
||||
// DbTablesReq 库表列表参数
|
||||
type DbTablesReq struct {
|
||||
TableName string `form:"tableName"` // 表名称
|
||||
TableComment string `form:"tableComment"` // 表描述
|
||||
}
|
||||
|
||||
//ListTableReq 生成列表参数
|
||||
// ListTableReq 生成列表参数
|
||||
type ListTableReq struct {
|
||||
TableName string `form:"tableName"` // 表名称
|
||||
TableComment string `form:"tableComment"` // 表描述
|
||||
@@ -16,26 +16,27 @@ type ListTableReq struct {
|
||||
EndTime time.Time `form:"endTime" time_format:"2006-01-02"` // 结束时间
|
||||
}
|
||||
|
||||
//DetailTableReq 生成详情参数
|
||||
// DetailTableReq 生成详情参数
|
||||
type DetailTableReq struct {
|
||||
ID uint `form:"id" binding:"required,gt=0"` // 主键
|
||||
}
|
||||
|
||||
//ImportTableReq 导入表结构参数
|
||||
// ImportTableReq 导入表结构参数
|
||||
type ImportTableReq struct {
|
||||
Tables string `form:"tables" binding:"required"` // 导入的表, 用","分隔
|
||||
}
|
||||
|
||||
//SyncTableReq 同步表结构参数
|
||||
// SyncTableReq 同步表结构参数
|
||||
type SyncTableReq struct {
|
||||
ID uint `form:"id" binding:"required,gt=0"` // 主键
|
||||
}
|
||||
|
||||
//EditColumn 表编辑列
|
||||
// EditColumn 表编辑列
|
||||
type EditColumn struct {
|
||||
ID uint `form:"id" binding:"required,gt=0"` // 主键
|
||||
ID uint `form:"id" binding:"required,gt>0"` // 主键
|
||||
ColumnComment string `form:"columnComment" binding:"required,max=200"` // 列描述
|
||||
JavaField string `form:"goField" binding:"required,max=100"` // 字段
|
||||
GoField string `form:"goField" binding:"required,max=100"` // 字段属性
|
||||
GoType string `form:"goType" binding:"required,max=100"` // 字段类型
|
||||
IsRequired uint8 `form:"isStop" binding:"oneof=0 1"` // 是否必填: [0=否, 1=是]
|
||||
IsInsert uint8 `form:"isInsert" binding:"oneof=0 1"` // 是否新增字段: [0=否, 1=是]
|
||||
IsEdit uint8 `form:"isEdit" binding:"oneof=0 1"` // 是否编辑字段: [0=否, 1=是]
|
||||
@@ -46,7 +47,7 @@ type EditColumn struct {
|
||||
DictType string `form:"dictType" binding:"required,max=200"` // 字典类型
|
||||
}
|
||||
|
||||
//EditTableReq 编辑表结构参数
|
||||
// EditTableReq 编辑表结构参数
|
||||
type EditTableReq struct {
|
||||
ID uint `form:"id" binding:"required,gt=0"` // 主键
|
||||
TableName string `form:"tableName" binding:"required,min=1,max=200"` // 表名称
|
||||
@@ -67,22 +68,22 @@ type EditTableReq struct {
|
||||
Columns []EditColumn `form:"columns" binding:"required"` // 字段列表
|
||||
}
|
||||
|
||||
//DelTableReq 删除表结构参数
|
||||
// DelTableReq 删除表结构参数
|
||||
type DelTableReq struct {
|
||||
Ids []uint `form:"ids" binding:"required"` // 主键
|
||||
}
|
||||
|
||||
//PreviewCodeReq 预览代码参数
|
||||
// PreviewCodeReq 预览代码参数
|
||||
type PreviewCodeReq struct {
|
||||
ID uint `form:"id" binding:"required,gt=0"` // 主键
|
||||
}
|
||||
|
||||
//GenCodeReq 生成代码参数
|
||||
// GenCodeReq 生成代码参数
|
||||
type GenCodeReq struct {
|
||||
Tables string `form:"tables" binding:"required"` // 生成的表, 用","分隔
|
||||
}
|
||||
|
||||
//DownloadReq 下载代码参数
|
||||
// DownloadReq 下载代码参数
|
||||
type DownloadReq struct {
|
||||
Tables string `form:"tables" binding:"required"` // 下载的表, 用","分隔
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"likeadmin/core"
|
||||
)
|
||||
|
||||
//DbTableResp 数据表返回信息
|
||||
// DbTableResp 数据表返回信息
|
||||
type DbTableResp struct {
|
||||
TableName string `json:"tableName" structs:"tableName"` // 表的名称
|
||||
TableComment string `json:"tableComment" structs:"tableComment"` // 表的描述
|
||||
@@ -12,7 +12,7 @@ type DbTableResp struct {
|
||||
UpdateTime core.OnlyRespTsTime `json:"updateTime" structs:"updateTime"` // 更新时间
|
||||
}
|
||||
|
||||
//GenTableResp 生成表返回信息
|
||||
// GenTableResp 生成表返回信息
|
||||
type GenTableResp struct {
|
||||
ID uint `json:"id" structs:"id"` // 主键
|
||||
GenType int `json:"genType" structs:"genType"` // 生成类型
|
||||
@@ -22,7 +22,7 @@ type GenTableResp struct {
|
||||
UpdateTime core.TsTime `json:"updateTime" structs:"updateTime"` // 更新时间
|
||||
}
|
||||
|
||||
//GenTableBaseResp 生成表基本返回信息
|
||||
// GenTableBaseResp 生成表基本返回信息
|
||||
type GenTableBaseResp struct {
|
||||
ID uint `json:"id" structs:"id"` // 主键
|
||||
TableName string `json:"tableName" structs:"tableName"` // 表的名称
|
||||
@@ -34,7 +34,7 @@ type GenTableBaseResp struct {
|
||||
UpdateTime core.TsTime `json:"updateTime" structs:"updateTime"` // 更新时间
|
||||
}
|
||||
|
||||
//GenTableGenResp 生成表生成返回信息
|
||||
// GenTableGenResp 生成表生成返回信息
|
||||
type GenTableGenResp struct {
|
||||
GenTpl string `json:"genTpl" structs:"genTpl"` // 生成模板方式: [crud=单表, tree=树表]
|
||||
GenType int `json:"genType" structs:"genType"` // 生成代码方式: [0=zip压缩包, 1=自定义路径]
|
||||
@@ -48,15 +48,15 @@ type GenTableGenResp struct {
|
||||
SubTableFk string `json:"subTableFk" structs:"subTableFk"` // 关联表外键
|
||||
}
|
||||
|
||||
//GenColumnResp 生成列返回信息
|
||||
// GenColumnResp 生成列返回信息
|
||||
type GenColumnResp struct {
|
||||
ID uint `json:"id" structs:"id"` // 字段主键
|
||||
ColumnName string `json:"columnName" structs:"columnName"` // 字段名称
|
||||
ColumnComment string `json:"columnComment" structs:"columnComment"` // 字段描述
|
||||
ColumnLength int `json:"columnLength" structs:"columnLength"` // 字段长度
|
||||
ColumnType string `json:"columnType" structs:"columnType"` // 字段类型
|
||||
JavaType string `json:"goType" structs:"goType"` // Go类型
|
||||
JavaField string `json:"goField" structs:"goField"` // Go字段
|
||||
GoType string `json:"goType" structs:"goType"` // Go类型
|
||||
GoField string `json:"goField" structs:"goField"` // Go字段
|
||||
IsRequired uint8 `json:"isRequired" structs:"isRequired"` // 是否必填
|
||||
IsInsert uint8 `json:"isInsert" structs:"isInsert"` // 是否为插入字段
|
||||
IsEdit uint8 `json:"isEdit" structs:"isEdit"` // 是否编辑字段
|
||||
@@ -69,7 +69,7 @@ type GenColumnResp struct {
|
||||
UpdateTime core.TsTime `json:"updateTime" structs:"updateTime"` // 更新时间
|
||||
}
|
||||
|
||||
//GenTableDetailResp 生成表详情返回信息
|
||||
// GenTableDetailResp 生成表详情返回信息
|
||||
type GenTableDetailResp struct {
|
||||
Base GenTableBaseResp `json:"base" structs:"base"` // 基本信息
|
||||
Gen GenTableGenResp `json:"gen" structs:"gen"` // 生成信息
|
||||
|
||||
@@ -285,7 +285,11 @@ func (genSrv generateService) EditTable(editReq req.EditTableReq) (e error) {
|
||||
for i := 0; i < len(editReq.Columns); i++ {
|
||||
var col gen.GenTableColumn
|
||||
response.Copy(&col, editReq.Columns[i])
|
||||
txErr = tx.Save(&col).Error
|
||||
col.TableID = genTable.ID
|
||||
// 更新指定字段
|
||||
txErr = tx.Model(&gen.GenTableColumn{}).Select("column_comment", "go_type", "go_field", "go_field", "is_required",
|
||||
"is_insert", "is_edit", "is_list", "is_query", "query_type", "html_type", "dict_type").
|
||||
Where("id = ?", col.ID).Updates(&col).Error
|
||||
if te := response.CheckErr(txErr, "EditTable Save GenTableColumn err"); te != nil {
|
||||
return te
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ package {{{ .PackageName }}}
|
||||
type {{{ title (toCamelCase .EntityName) }}} struct {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if not (contains $.SubTableFields .ColumnName) }}}
|
||||
{{{ title (toCamelCase .JavaField) }}} {{{ if eq .JavaType "core.TsTime" }}} int64 {{{ else }}} {{{ .JavaType }}} {{{ end }}} `gorm:"{{{ if .IsPk }}}primarykey;{{{ end }}}comment:'{{{ .ColumnComment }}}'"` // {{{ .ColumnComment }}}
|
||||
{{{ title (toCamelCase .GoField) }}} {{{ if eq .GoType "core.TsTime" }}} int64 {{{ else }}} {{{ .GoType }}} {{{ end }}} `gorm:"{{{ if .IsPk }}}primarykey;{{{ end }}}comment:'{{{ .ColumnComment }}}'"` // {{{ .ColumnComment }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
type {{{ title (toCamelCase .EntityName) }}}ListReq struct {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsQuery }}}
|
||||
{{{ title (toCamelCase .JavaField) }}} {{{ .JavaType }}} `form:"{{{ .JavaField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{ title (toCamelCase .GoField) }}} {{{ .GoType }}} `form:"{{{ .GoField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ type {{{ title (toCamelCase .EntityName) }}}ListReq struct {
|
||||
type {{{ title (toCamelCase .EntityName) }}}DetailReq struct {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsPk }}}
|
||||
{{{ title (toCamelCase .JavaField) }}} {{{ .JavaType }}} `form:"{{{ .JavaField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{ title (toCamelCase .GoField) }}} {{{ .GoType }}} `form:"{{{ .GoField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ type {{{ title (toCamelCase .EntityName) }}}DetailReq struct {
|
||||
type {{{ title (toCamelCase .EntityName) }}}AddReq struct {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsInsert }}}
|
||||
{{{ title (toCamelCase .JavaField) }}} {{{ .JavaType }}} `form:"{{{ .JavaField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{ title (toCamelCase .GoField) }}} {{{ .GoType }}} `form:"{{{ .GoField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ type {{{ title (toCamelCase .EntityName) }}}AddReq struct {
|
||||
type {{{ title (toCamelCase .EntityName) }}}EditReq struct {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsEdit }}}
|
||||
{{{ title (toCamelCase .JavaField) }}} {{{ .JavaType }}} `form:"{{{ .JavaField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{ title (toCamelCase .GoField) }}} {{{ .GoType }}} `form:"{{{ .GoField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ type {{{ title (toCamelCase .EntityName) }}}EditReq struct {
|
||||
type {{{ title (toCamelCase .EntityName) }}}DelReq struct {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsPk }}}
|
||||
{{{ title (toCamelCase .JavaField) }}} {{{ .JavaType }}} `form:"{{{ .JavaField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{ title (toCamelCase .GoField) }}} {{{ .GoType }}} `form:"{{{ .GoField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ type {{{ title (toCamelCase .EntityName) }}}DelReq struct {
|
||||
type {{{ title (toCamelCase .EntityName) }}}Resp struct {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if or .IsList .IsPk }}}
|
||||
{{{ title (toCamelCase .JavaField) }}} {{{ .JavaType }}} `json:"{{{ .JavaField }}}" structs:"{{{ .JavaField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{ title (toCamelCase .GoField) }}} {{{ .GoType }}} `json:"{{{ .GoField }}}" structs:"{{{ .GoField }}}"` // {{{ .ColumnComment }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
|
||||
@@ -39,12 +39,12 @@ func (srv {{{ toCamelCase .EntityName }}}Service) List(c *gin.Context, page requ
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsQuery }}}
|
||||
{{{- $queryOpr := index $.ModelOprMap .QueryType }}}
|
||||
{{{- if and (eq .JavaType "string") (eq $queryOpr "like") }}}
|
||||
{{{- if and (eq .GoType "string") (eq $queryOpr "like") }}}
|
||||
if listReq.{{{ title (toCamelCase .ColumnName) }}} != "" {
|
||||
q = q.Where(m.{{{(toCamelCase .ColumnName) }}}.Like("%"+listReq.{{{ title (toCamelCase .ColumnName) }}}+"%"))
|
||||
}
|
||||
{{{- else }}}
|
||||
if listReq.{{{ title (toCamelCase .ColumnName) }}} {{{ if eq .JavaType "string" }}}!= ""{{{ else }}}>=0{{{ end }}} {
|
||||
if listReq.{{{ title (toCamelCase .ColumnName) }}} {{{ if eq .GoType "string" }}}!= ""{{{ else }}}>=0{{{ end }}} {
|
||||
q = q.Where(m.{{{ title (toCamelCase .ColumnName) }}}.Eq(listReq.{{{ title (toCamelCase .ColumnName) }}}))
|
||||
}
|
||||
{{{- end }}}
|
||||
@@ -88,7 +88,7 @@ func (srv {{{ toCamelCase .EntityName }}}Service) Detail(c *gin.Context, id uint
|
||||
}
|
||||
response.Copy(&res, obj)
|
||||
{{{- range .Columns }}}
|
||||
{{{- if and .IsEdit (contains (slice "image" "avatar" "logo" "img") .JavaField) }}}
|
||||
{{{- if and .IsEdit (contains (slice "image" "avatar" "logo" "img") .GoField) }}}
|
||||
res.Avatar = util.UrlUtil.ToAbsoluteUrl(res.Avatar)
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="84px" :rules="formRules">
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsEdit }}}
|
||||
{{{- if and (ne $.Table.TreeParent "") (eq .JavaField $.Table.TreeParent) }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
{{{- if and (ne $.Table.TreeParent "") (eq .GoField $.Table.TreeParent) }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-tree-select
|
||||
class="flex-1"
|
||||
v-model="formData.{{{ .JavaField }}}"
|
||||
v-model="formData.{{{ .GoField }}}"
|
||||
:data="treeList"
|
||||
clearable
|
||||
node-key="{{{ .Table.TreePrimary }}}"
|
||||
@@ -27,25 +27,25 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "input" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-input v-model="formData.{{{ .JavaField }}}" placeholder="请输入{{{ .ColumnComment }}}" />
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-input v-model="formData.{{{ .GoField }}}" placeholder="请输入{{{ .ColumnComment }}}" />
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "number" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-input-number v-model="formData.{{{ .JavaField }}}" :max="9999" />
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-input-number v-model="formData.{{{ .GoField }}}" :max="9999" />
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "textarea" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-input
|
||||
v-model="formData.{{{ .JavaField }}}"
|
||||
v-model="formData.{{{ .GoField }}}"
|
||||
placeholder="请输入{{{ .ColumnComment }}}"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 6 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "checkbox" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-checkbox-group v-model="formData.{{{ .JavaField }}}" placeholder="请选择{{{ .ColumnComment }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-checkbox-group v-model="formData.{{{ .GoField }}}" placeholder="请选择{{{ .ColumnComment }}}">
|
||||
{{{- if ne .DictType "" }}}
|
||||
<el-checkbox
|
||||
v-for="(item, index) in dictData.{{{ .DictType }}}"
|
||||
@@ -61,14 +61,14 @@
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "select" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-select class="flex-1" v-model="formData.{{{ .JavaField }}}" placeholder="请选择{{{ .ColumnComment }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-select class="flex-1" v-model="formData.{{{ .GoField }}}" placeholder="请选择{{{ .ColumnComment }}}">
|
||||
{{{- if ne .DictType "" }}}
|
||||
<el-option
|
||||
v-for="(item, index) in dictData.{{{ .DictType }}}"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
{{{- if eq .JavaType "Integer" }}}
|
||||
{{{- if eq .GoType "Integer" }}}
|
||||
:value="parseInt(item.value)"
|
||||
{{{- else }}}
|
||||
:value="item.value"
|
||||
@@ -82,13 +82,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "radio" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-radio-group v-model="formData.{{{ .JavaField }}}" placeholder="请选择{{{ .ColumnComment }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-radio-group v-model="formData.{{{ .GoField }}}" placeholder="请选择{{{ .ColumnComment }}}">
|
||||
{{{- if ne .DictType "" }}}
|
||||
<el-radio
|
||||
v-for="(item, index) in dictData.{{{ .DictType }}}"
|
||||
:key="index"
|
||||
{{{- if eq .JavaType "Integer" }}}
|
||||
{{{- if eq .GoType "Integer" }}}
|
||||
:label="parseInt(item.value)"
|
||||
{{{- else }}}
|
||||
:label="item.value"
|
||||
@@ -103,10 +103,10 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "datetime" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-date-picker
|
||||
class="flex-1 !flex"
|
||||
v-model="formData.{{{ .JavaField }}}"
|
||||
v-model="formData.{{{ .GoField }}}"
|
||||
type="datetime"
|
||||
clearable
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
@@ -114,12 +114,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "editor" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<editor v-model="formData.{{{ .JavaField }}}" :height="500" />
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<editor v-model="formData.{{{ .GoField }}}" :height="500" />
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "imageUpload" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<material-picker v-model="formData.{{{ .JavaField }}}" />
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<material-picker v-model="formData.{{{ .GoField }}}" />
|
||||
</el-form-item>
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
@@ -153,15 +153,15 @@ const popupTitle = computed(() => {
|
||||
|
||||
const formData = reactive({
|
||||
{{{- range .Columns }}}
|
||||
{{{- if eq .JavaField $.PrimaryKey }}}
|
||||
{{{- if eq .GoField $.PrimaryKey }}}
|
||||
{{{ $.PrimaryKey }}}: '',
|
||||
{{{- else if .IsEdit }}}
|
||||
{{{- if eq .HtmlType "checkbox" }}}
|
||||
{{{ .JavaField }}}: [],
|
||||
{{{ .GoField }}}: [],
|
||||
{{{- else if eq .HtmlType "number" }}}
|
||||
{{{ .JavaField }}}: 0,
|
||||
{{{ .GoField }}}: 0,
|
||||
{{{- else }}}
|
||||
{{{ .JavaField }}}: '',
|
||||
{{{ .GoField }}}: '',
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
@@ -170,7 +170,7 @@ const formData = reactive({
|
||||
const formRules = {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if and .IsEdit .IsRequired }}}
|
||||
{{{ .JavaField }}}: [
|
||||
{{{ .GoField }}}: [
|
||||
{
|
||||
required: true,
|
||||
{{{- if or (eq .HtmlType "checkbox") (eq .HtmlType "datetime") (eq .HtmlType "radio") (eq .HtmlType "select") (eq .HtmlType "imageUpload") }}}
|
||||
@@ -190,7 +190,7 @@ const handleSubmit = async () => {
|
||||
const data: any = { ...formData }
|
||||
{{{- range .Columns }}}
|
||||
{{{- if eq .HtmlType "checkbox" }}}
|
||||
data.{{{ .JavaField }}} = data.{{{ .JavaField }}}.join(',')
|
||||
data.{{{ .GoField }}} = data.{{{ .GoField }}}.join(',')
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
mode.value == 'edit' ? await {{{ .ModuleName }}}Edit(data) : await {{{ .ModuleName }}}Add(data)
|
||||
@@ -212,7 +212,7 @@ const setFormData = async (data: Record<string, any>) => {
|
||||
{{{- range .Columns }}}
|
||||
{{{- if eq .HtmlType "checkbox" }}}
|
||||
//@ts-ignore
|
||||
formData.{{{ .JavaField }}} = String(data.{{{ .JavaField }}}).split(',')
|
||||
formData.{{{ .GoField }}} = String(data.{{{ .GoField }}}).split(',')
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
}
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
{{{- range .Columns }}}
|
||||
{{{- if eq .IsQuery 1 }}}
|
||||
{{{- if eq .HtmlType "datetime" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<daterange-picker
|
||||
v-model:startTime="queryParams.createTimeStart"
|
||||
v-model:endTime="queryParams.createTimeEnd"
|
||||
/>
|
||||
</el-form-item>
|
||||
{{{- else if or (eq .HtmlType "select") (eq .HtmlType "radio") }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-select
|
||||
v-model="queryParams.{{{ .JavaField }}}"
|
||||
v-model="queryParams.{{{ .GoField }}}"
|
||||
class="w-[280px]"
|
||||
clearable
|
||||
>
|
||||
@@ -32,8 +32,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "input" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-input class="w-[280px]" v-model="queryParams.{{{ .JavaField }}}" />
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-input class="w-[280px]" v-model="queryParams.{{{ .GoField }}}" />
|
||||
</el-form-item>
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
@@ -66,26 +66,26 @@
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsList }}}
|
||||
{{{- if and (ne .DictType "") (or (eq .HtmlType "select") (eq .HtmlType "radio") (eq .HtmlType "checkbox")) }}}
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}" min-width="100">
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.{{{ .DictType }}}" :value="row.{{{ .JavaField }}}" />
|
||||
<dict-value :options="dictData.{{{ .DictType }}}" :value="row.{{{ .GoField }}}" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
{{{- else if eq .HtmlType "imageUpload" }}}
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}" min-width="100">
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<image-contain
|
||||
:width="40"
|
||||
:height="40"
|
||||
:src="row.{{{ .JavaField }}}"
|
||||
:preview-src-list="[row.{{{ .JavaField }}}]"
|
||||
:src="row.{{{ .GoField }}}"
|
||||
:preview-src-list="[row.{{{ .GoField }}}]"
|
||||
preview-teleported
|
||||
hide-on-click-modal
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
{{{- else }}}
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}" min-width="100" />
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}" min-width="100" />
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
@@ -150,10 +150,10 @@ const queryParams = reactive({
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsQuery }}}
|
||||
{{{- if eq .HtmlType "datetime" }}}
|
||||
{{{ .JavaField }}}Start: '',
|
||||
{{{ .JavaField }}}End: '',
|
||||
{{{ .GoField }}}Start: '',
|
||||
{{{ .GoField }}}End: '',
|
||||
{{{- else }}}
|
||||
{{{ .JavaField }}}: '',
|
||||
{{{ .GoField }}}: '',
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
{{{- range .Columns }}}
|
||||
{{{- if eq .IsQuery 1 }}}
|
||||
{{{- if eq .HtmlType "datetime" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<daterange-picker
|
||||
v-model:startTime="queryParams.createTimeStart"
|
||||
v-model:endTime="queryParams.createTimeEnd"
|
||||
/>
|
||||
</el-form-item>
|
||||
{{{- else if or (eq .HtmlType "select") (eq .HtmlType "radio") }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-select
|
||||
v-model="queryParams.{{{ .JavaField }}}"
|
||||
v-model="queryParams.{{{ .GoField }}}"
|
||||
class="w-[280px]"
|
||||
clearable
|
||||
>
|
||||
@@ -32,8 +32,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
{{{- else if eq .HtmlType "input" }}}
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}">
|
||||
<el-input class="w-[280px]" v-model="queryParams.{{{ .JavaField }}}" />
|
||||
<el-form-item label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}">
|
||||
<el-input class="w-[280px]" v-model="queryParams.{{{ .GoField }}}" />
|
||||
</el-form-item>
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
@@ -62,26 +62,26 @@
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsList }}}
|
||||
{{{- if and (ne .DictType "") (or (eq .HtmlType "select") (eq .HtmlType "radio") (eq .HtmlType "checkbox")) }}}
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}" min-width="100">
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.{{{ .DictType }}}" :value="row.{{{ .JavaField }}}" />
|
||||
<dict-value :options="dictData.{{{ .DictType }}}" :value="row.{{{ .GoField }}}" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
{{{- else if eq .HtmlType "imageUpload" }}}
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}" min-width="100">
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<image-contain
|
||||
:width="40"
|
||||
:height="40"
|
||||
:src="row.{{{ .JavaField }}}"
|
||||
:preview-src-list="[row.{{{ .JavaField }}}]"
|
||||
:src="row.{{{ .GoField }}}"
|
||||
:preview-src-list="[row.{{{ .GoField }}}]"
|
||||
preview-teleported
|
||||
hide-on-click-modal
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
{{{- else }}}
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .JavaField }}}" min-width="100" />
|
||||
<el-table-column label="{{{ .ColumnComment }}}" prop="{{{ .GoField }}}" min-width="100" />
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
@@ -135,10 +135,10 @@ const queryParams = reactive({
|
||||
{{{- range .Columns }}}
|
||||
{{{- if .IsQuery }}}
|
||||
{{{- if eq .HtmlType "datetime" }}}
|
||||
{{{ .JavaField }}}Start: '',
|
||||
{{{ .JavaField }}}End: '',
|
||||
{{{ .GoField }}}Start: '',
|
||||
{{{ .GoField }}}End: '',
|
||||
{{{- else }}}
|
||||
{{{ .JavaField }}}: '',
|
||||
{{{ .GoField }}}: '',
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
{{{- end }}}
|
||||
|
||||
@@ -29,23 +29,23 @@ var TemplateUtil = templateUtil{
|
||||
}),
|
||||
}
|
||||
|
||||
//sub 模板-减函数
|
||||
// sub 模板-减函数
|
||||
func sub(a, b int) int {
|
||||
return a - b
|
||||
}
|
||||
|
||||
//slice 模板-创建切片
|
||||
// slice 模板-创建切片
|
||||
func slice(items ...interface{}) []interface{} {
|
||||
return items
|
||||
}
|
||||
|
||||
//zFile 待加入zip的文件
|
||||
// zFile 待加入zip的文件
|
||||
type zFile struct {
|
||||
Name string
|
||||
Body string
|
||||
}
|
||||
|
||||
//TplVars 模板变量
|
||||
// TplVars 模板变量
|
||||
type TplVars struct {
|
||||
GenTpl string
|
||||
TableName string
|
||||
@@ -74,13 +74,13 @@ type TplVars struct {
|
||||
//ModelTypeMap map[string]string
|
||||
}
|
||||
|
||||
//genUtil 模板工具
|
||||
// genUtil 模板工具
|
||||
type templateUtil struct {
|
||||
basePath string
|
||||
tpl *template.Template
|
||||
}
|
||||
|
||||
//PrepareVars 获取模板变量信息
|
||||
// PrepareVars 获取模板变量信息
|
||||
func (tu templateUtil) PrepareVars(table gen.GenTable, columns []gen.GenTableColumn,
|
||||
oriSubPriCol gen.GenTableColumn, oriSubCols []gen.GenTableColumn) TplVars {
|
||||
subPriField := "id"
|
||||
@@ -118,7 +118,7 @@ func (tu templateUtil) PrepareVars(table gen.GenTable, columns []gen.GenTableCol
|
||||
isSearch = true
|
||||
}
|
||||
if column.IsPk == 1 {
|
||||
primaryKey = column.JavaField
|
||||
primaryKey = column.GoField
|
||||
primaryField = column.ColumnName
|
||||
}
|
||||
if column.DictType != "" && !util.ToolsUtil.Contains(dictFields, column.DictType) {
|
||||
@@ -159,7 +159,7 @@ func (tu templateUtil) PrepareVars(table gen.GenTable, columns []gen.GenTableCol
|
||||
}
|
||||
}
|
||||
|
||||
//GetTemplatePaths 获取模板路径
|
||||
// GetTemplatePaths 获取模板路径
|
||||
func (tu templateUtil) GetTemplatePaths(genTpl string) []string {
|
||||
tplPaths := []string{
|
||||
"gocode/model.go.tpl",
|
||||
@@ -177,7 +177,7 @@ func (tu templateUtil) GetTemplatePaths(genTpl string) []string {
|
||||
return tplPaths
|
||||
}
|
||||
|
||||
//Render 渲染模板
|
||||
// Render 渲染模板
|
||||
func (tu templateUtil) Render(tplPath string, tplVars TplVars) (res string, e error) {
|
||||
tpl, err := tu.tpl.ParseFiles(path.Join(config.Config.RootPath, tu.basePath, tplPath))
|
||||
if e = response.CheckErr(err, "TemplateUtil.Render ParseFiles err"); e != nil {
|
||||
@@ -191,7 +191,7 @@ func (tu templateUtil) Render(tplPath string, tplVars TplVars) (res string, e er
|
||||
return buf.String(), nil
|
||||
}
|
||||
|
||||
//GetGenPath 获取生成路径
|
||||
// GetGenPath 获取生成路径
|
||||
func (tu templateUtil) GetGenPath(table gen.GenTable) string {
|
||||
if table.GenPath == "/" {
|
||||
//return path.Join(config.Config.RootPath, config.GenConfig.GenRootPath)
|
||||
@@ -200,7 +200,7 @@ func (tu templateUtil) GetGenPath(table gen.GenTable) string {
|
||||
return table.GenPath
|
||||
}
|
||||
|
||||
//GetFilePaths 获取生成文件相对路径
|
||||
// GetFilePaths 获取生成文件相对路径
|
||||
func (tu templateUtil) GetFilePaths(tplCodeMap map[string]string, moduleName string) map[string]string {
|
||||
//模板文件对应的输出文件
|
||||
fmtMap := map[string]string{
|
||||
@@ -221,7 +221,7 @@ func (tu templateUtil) GetFilePaths(tplCodeMap map[string]string, moduleName str
|
||||
return filePath
|
||||
}
|
||||
|
||||
//GenCodeFiles 生成代码文件
|
||||
// GenCodeFiles 生成代码文件
|
||||
func (tu templateUtil) GenCodeFiles(tplCodeMap map[string]string, moduleName string, basePath string) error {
|
||||
filePaths := tu.GetFilePaths(tplCodeMap, moduleName)
|
||||
for file, tplCode := range filePaths {
|
||||
@@ -257,7 +257,7 @@ func addFileToZip(zipWriter *zip.Writer, file zFile) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//GenZip 生成代码压缩包
|
||||
// GenZip 生成代码压缩包
|
||||
func (tu templateUtil) GenZip(zipWriter *zip.Writer, tplCodeMap map[string]string, moduleName string) error {
|
||||
filePaths := tu.GetFilePaths(tplCodeMap, moduleName)
|
||||
files := make([]zFile, 0)
|
||||
|
||||
@@ -81,8 +81,8 @@ func (gu genUtil) InitColumn(tableId uint, column gen.GenTableColumn) gen.GenTab
|
||||
ColumnComment: column.ColumnComment,
|
||||
ColumnType: columnType,
|
||||
ColumnLength: columnLen,
|
||||
JavaField: column.ColumnName,
|
||||
JavaType: GoConstants.TypeString,
|
||||
GoField: column.ColumnName,
|
||||
GoType: GoConstants.TypeString,
|
||||
QueryType: GenConstants.QueryEq,
|
||||
Sort: column.Sort,
|
||||
IsPk: column.IsPk,
|
||||
@@ -100,19 +100,19 @@ func (gu genUtil) InitColumn(tableId uint, column gen.GenTableColumn) gen.GenTab
|
||||
}
|
||||
} else if util.ToolsUtil.Contains(SqlConstants.ColumnTypeTime, columnType) {
|
||||
//日期字段
|
||||
col.JavaType = GoConstants.TypeDate
|
||||
col.GoType = GoConstants.TypeDate
|
||||
col.HtmlType = HtmlConstants.HtmlDatetime
|
||||
} else if util.ToolsUtil.Contains(SqlConstants.ColumnTimeName, col.ColumnName) {
|
||||
//时间字段
|
||||
col.JavaType = GoConstants.TypeDate
|
||||
col.GoType = GoConstants.TypeDate
|
||||
col.HtmlType = HtmlConstants.HtmlDatetime
|
||||
} else if util.ToolsUtil.Contains(SqlConstants.ColumnTypeNumber, columnType) {
|
||||
//数字字段
|
||||
col.HtmlType = HtmlConstants.HtmlInput
|
||||
if strings.Contains(columnType, ",") {
|
||||
col.JavaType = GoConstants.TypeFloat
|
||||
col.GoType = GoConstants.TypeFloat
|
||||
} else {
|
||||
col.JavaType = GoConstants.TypeInt
|
||||
col.GoType = GoConstants.TypeInt
|
||||
}
|
||||
}
|
||||
//非必填字段
|
||||
|
||||
@@ -11,6 +11,7 @@ require (
|
||||
github.com/jinzhu/copier v0.3.5
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible
|
||||
github.com/shopspring/decimal v1.3.1
|
||||
github.com/sony/sonyflake v1.2.0
|
||||
github.com/spf13/viper v1.14.0
|
||||
github.com/ua-parser/uap-go v0.0.0-20211112212520-00c877edfe0f
|
||||
go.uber.org/dig v1.16.1
|
||||
@@ -22,7 +23,14 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/qiniu/go-sdk/v7 v7.18.2
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/aliyun/aliyun-oss-go-sdk v3.0.1+incompatible
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/clbanning/mxj v1.8.4 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
@@ -32,6 +40,7 @@ require (
|
||||
github.com/go-playground/validator/v10 v10.11.1 // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.0 // indirect
|
||||
github.com/goccy/go-json v0.9.11 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
@@ -42,6 +51,7 @@ require (
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/mozillazg/go-httpheader v0.4.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
|
||||
github.com/spf13/afero v1.9.2 // indirect
|
||||
@@ -49,6 +59,7 @@ require (
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.4.1 // indirect
|
||||
github.com/tencentyun/cos-go-sdk-v5 v0.7.45
|
||||
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
||||
github.com/ugorji/go/codec v1.2.7 // indirect
|
||||
@@ -60,6 +71,7 @@ require (
|
||||
golang.org/x/net v0.6.0 // indirect
|
||||
golang.org/x/sys v0.5.0 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
|
||||
golang.org/x/tools v0.6.0 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
|
||||
@@ -38,6 +38,9 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v3.0.1+incompatible h1:so4m5rRA32Tc5GgKg/5gKUu0CRsYmVO3ThMP6T3CwLc=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v3.0.1+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
@@ -45,6 +48,8 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
|
||||
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
@@ -53,6 +58,7 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
@@ -79,10 +85,13 @@ github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
|
||||
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
|
||||
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
|
||||
github.com/go-playground/validator/v10 v10.8.0/go.mod h1:9JhgTzTaE31GZDpH/HSvHiRJrJ3iKAgqqH0Bl/Ocjdk=
|
||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||
github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=
|
||||
github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
||||
@@ -135,6 +144,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
|
||||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
@@ -150,6 +162,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
|
||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@@ -202,6 +215,7 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
|
||||
github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
|
||||
github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE=
|
||||
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@@ -209,6 +223,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60=
|
||||
github.com/mozillazg/go-httpheader v0.4.0 h1:aBn6aRXtFzyDLZ4VIRLsZbbJloagQfMnCiYgOq6hK4w=
|
||||
github.com/mozillazg/go-httpheader v0.4.0/go.mod h1:PuT8h0pw6efvp8ZeUec1Rs7dwjK08bt6gKSReGMqtdA=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E=
|
||||
@@ -224,6 +241,10 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/qiniu/dyn v1.3.0/go.mod h1:E8oERcm8TtwJiZvkQPbcAh0RL8jO1G0VXJMW3FAWdkk=
|
||||
github.com/qiniu/go-sdk/v7 v7.18.2 h1:vk9eo5OO7aqgAOPF0Ytik/gt7CMKuNgzC/IPkhda6rk=
|
||||
github.com/qiniu/go-sdk/v7 v7.18.2/go.mod h1:nqoYCNo53ZlGA521RvRethvxUDvXKt4gtYXOwye868w=
|
||||
github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||
@@ -232,6 +253,8 @@ github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKl
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
||||
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/sony/sonyflake v1.2.0 h1:Pfr3A+ejSg+0SPqpoAmQgEtNDAhc2G1SUYk205qVMLQ=
|
||||
github.com/sony/sonyflake v1.2.0/go.mod h1:LORtCywH/cq10ZbyfhKrHYgAUGH7mOBa76enV9txy/Y=
|
||||
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
|
||||
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
@@ -257,6 +280,10 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
|
||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
|
||||
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0=
|
||||
github.com/tencentyun/cos-go-sdk-v5 v0.7.45 h1:5/ZGOv846tP6+2X7w//8QjLgH2KcUK+HciFbfjWquFU=
|
||||
github.com/tencentyun/cos-go-sdk-v5 v0.7.45/go.mod h1:DH9US8nB+AJXqwu/AMOrCFN1COv3dpytXuJWHgdg7kE=
|
||||
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
|
||||
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
|
||||
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
|
||||
@@ -270,6 +297,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
|
||||
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
@@ -295,8 +323,10 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
|
||||
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@@ -332,6 +362,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -366,6 +397,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@@ -387,7 +420,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -426,12 +461,17 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -440,11 +480,14 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U=
|
||||
golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
@@ -492,6 +535,7 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
|
||||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
||||
@@ -30,8 +30,8 @@ type GenTableColumn struct {
|
||||
ColumnComment string `gorm:"not null;default:'';comment:'列描述'"`
|
||||
ColumnLength int `gorm:"not null;default:0;comment:'列长度'"`
|
||||
ColumnType string `gorm:"not null;default:'';comment:'列类型'"`
|
||||
JavaType string `gorm:"not null;default:'';comment:'类型'"`
|
||||
JavaField string `gorm:"not null;default:'';comment:'字段名'"`
|
||||
GoType string `gorm:"not null;default:'';comment:'类型'"`
|
||||
GoField string `gorm:"not null;default:'';comment:'字段名'"`
|
||||
IsPk uint8 `gorm:"not null;default:0;comment:'是否主键: [1=是, 0=否]'"`
|
||||
IsIncrement uint8 `gorm:"not null;default:0;comment:'是否自增: [1=是, 0=否]'"`
|
||||
IsRequired uint8 `gorm:"not null;default:0;comment:'是否必填: [1=是, 0=否]'"`
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
var StorageDriver = storageDriver{}
|
||||
|
||||
//UploadFile 文件对象
|
||||
// UploadFile 文件对象
|
||||
type UploadFile struct {
|
||||
Name string // 文件名称
|
||||
Type int // 文件类型
|
||||
@@ -27,21 +27,36 @@ type UploadFile struct {
|
||||
Path string // 访问地址
|
||||
}
|
||||
|
||||
//storageDriver 存储引擎
|
||||
// storageDriver 存储引擎
|
||||
type storageDriver struct{}
|
||||
|
||||
//Upload 根据引擎类型上传文件
|
||||
// Upload 根据引擎类型上传文件
|
||||
func (sd storageDriver) Upload(file *multipart.FileHeader, folder string, fileType int) (uf *UploadFile, e error) {
|
||||
// TODO: engine默认local
|
||||
//获取默认的存储engine
|
||||
engine := util.SettingUtil.GetStorageEngine()
|
||||
|
||||
if e = sd.checkFile(file, fileType); e != nil {
|
||||
return
|
||||
}
|
||||
key := sd.buildSaveName(file)
|
||||
engine := "local"
|
||||
|
||||
if engine == "local" {
|
||||
if e = sd.localUpload(file, key, folder); e != nil {
|
||||
return
|
||||
}
|
||||
} else if engine == "aliyun" {
|
||||
if e = AliYunOss.Upload(file, key, folder); e != nil {
|
||||
return
|
||||
}
|
||||
} else if engine == "qcloud" {
|
||||
if e = QCloudCos.Upload(file, key, folder); e != nil {
|
||||
return
|
||||
}
|
||||
} else if engine == "qiniu" {
|
||||
if e = QiniuKodo.Upload(file, key, folder); e != nil {
|
||||
println(e.Error())
|
||||
return
|
||||
}
|
||||
} else {
|
||||
core.Logger.Errorf("storageDriver.Upload engine err: err=[unsupported engine]")
|
||||
return nil, response.Failed.Make(fmt.Sprintf("engine:%s 暂时不支持", engine))
|
||||
@@ -57,9 +72,8 @@ func (sd storageDriver) Upload(file *multipart.FileHeader, folder string, fileTy
|
||||
}, nil
|
||||
}
|
||||
|
||||
//localUpload 本地上传 (临时方法)
|
||||
// localUpload 本地上传 (临时方法)
|
||||
func (sd storageDriver) localUpload(file *multipart.FileHeader, key string, folder string) (e error) {
|
||||
// TODO: 临时方法,后续调整
|
||||
// 映射目录
|
||||
directory := config.Config.UploadDirectory
|
||||
// 打开源文件
|
||||
@@ -97,7 +111,7 @@ func (sd storageDriver) localUpload(file *multipart.FileHeader, key string, fold
|
||||
return nil
|
||||
}
|
||||
|
||||
//checkFile 生成文件名称
|
||||
// checkFile 生成文件名称
|
||||
func (sd storageDriver) buildSaveName(file *multipart.FileHeader) string {
|
||||
name := file.Filename
|
||||
ext := strings.ToLower(path.Ext(name))
|
||||
@@ -105,7 +119,7 @@ func (sd storageDriver) buildSaveName(file *multipart.FileHeader) string {
|
||||
return path.Join(date, util.ToolsUtil.MakeUuid()+ext)
|
||||
}
|
||||
|
||||
//checkFile 文件验证
|
||||
// checkFile 文件验证
|
||||
func (sd storageDriver) checkFile(file *multipart.FileHeader, fileType int) (e error) {
|
||||
fileName := file.Filename
|
||||
fileExt := strings.ToLower(strings.Replace(path.Ext(fileName), ".", "", 1))
|
||||
@@ -132,3 +146,42 @@ func (sd storageDriver) checkFile(file *multipart.FileHeader, fileType int) (e e
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (sd storageDriver) DelFile(uri string) error {
|
||||
// 如果是系统默认的图片 则不能删除
|
||||
if strings.HasPrefix(uri, "/api/static/") {
|
||||
return nil
|
||||
}
|
||||
|
||||
engine := util.SettingUtil.GetStorageEngine()
|
||||
|
||||
if engine == "local" {
|
||||
directory := config.Config.UploadDirectory
|
||||
saveFilePath := path.Join(directory, uri)
|
||||
err := os.Remove(saveFilePath)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("storageDriver.DelFile Local err: file=[%s], err=[%+v]", saveFilePath, err)
|
||||
return response.Failed.Make("删除本地文件失败: " + err.Error())
|
||||
}
|
||||
} else if engine == "aliyun" {
|
||||
err := AliYunOss.Delete(uri)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("storageDriver.DelFile Aliyun err: file=[%s], err=[%+v]", uri, err)
|
||||
return response.Failed.Make("删除阿里云文件失败: " + err.Error())
|
||||
}
|
||||
} else if engine == "qcloud" {
|
||||
err := QCloudCos.Delete(uri)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("storageDriver.DelFile QCloud err: file=[%s], err=[%+v]", uri, err)
|
||||
return response.Failed.Make("删除腾讯云文件失败: " + err.Error())
|
||||
}
|
||||
} else if engine == "qiniu" {
|
||||
err := QiniuKodo.Delete(uri)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("storageDriver.DelFile QiniuKodo err: file=[%s], err=[%+v]", uri, err)
|
||||
return response.Failed.Make("删除七牛云文件失败: " + err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
56
server/plugin/storageAliyun.go
Normal file
56
server/plugin/storageAliyun.go
Normal file
@@ -0,0 +1,56 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"github.com/aliyun/aliyun-oss-go-sdk/oss"
|
||||
"likeadmin/core"
|
||||
"likeadmin/core/response"
|
||||
"likeadmin/util"
|
||||
"mime/multipart"
|
||||
"path"
|
||||
)
|
||||
|
||||
var AliYunOss = aliYunOss{}
|
||||
|
||||
type aliYunOss struct{}
|
||||
|
||||
func (ali aliYunOss) initOssClient() (bucket *oss.Bucket, err error) {
|
||||
conf := util.SettingUtil.GetStorageEngineConf("aliyun")
|
||||
|
||||
client, err := oss.New(conf.Endpoint, conf.AccessKey, conf.SecretKey)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("storageDriver.aliyunUpload Open err: err=[%+v]", err)
|
||||
return nil, response.Failed.Make("OSS 初始化阿里云失败!")
|
||||
}
|
||||
|
||||
// 获取存储空间。
|
||||
bucket, err = client.Bucket(conf.Bucket)
|
||||
return
|
||||
}
|
||||
|
||||
func (ali aliYunOss) Upload(file *multipart.FileHeader, key string, folder string) (err error) {
|
||||
bucket, err := ali.initOssClient()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
objectName := path.Join(folder, key)
|
||||
|
||||
// 读取文件流
|
||||
src, err := file.Open()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer src.Close()
|
||||
|
||||
err = bucket.PutObject(objectName, src)
|
||||
return
|
||||
}
|
||||
|
||||
func (ali aliYunOss) Delete(objectName string) (err error) {
|
||||
bucket, err := ali.initOssClient()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = bucket.DeleteObject(objectName)
|
||||
return
|
||||
}
|
||||
59
server/plugin/storageQcloud.go
Normal file
59
server/plugin/storageQcloud.go
Normal file
@@ -0,0 +1,59 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/tencentyun/cos-go-sdk-v5"
|
||||
"likeadmin/util"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
)
|
||||
|
||||
var QCloudCos = qcloudCos{}
|
||||
|
||||
type qcloudCos struct{}
|
||||
|
||||
func (q qcloudCos) initOssClient() (client *cos.Client) {
|
||||
|
||||
conf := util.SettingUtil.GetStorageEngineConf("qcloud")
|
||||
|
||||
u, _ := url.Parse(fmt.Sprintf("https://%s.cos.%s.myqcloud.com", conf.Bucket, conf.Region))
|
||||
// 用于 Get Service 查询,默认全地域 service.cos.myqcloud.com
|
||||
su, _ := url.Parse(fmt.Sprintf("https://cos.%s.myqcloud.com", conf.Region))
|
||||
b := &cos.BaseURL{BucketURL: u, ServiceURL: su}
|
||||
// 1.永久密钥
|
||||
client = cos.NewClient(b, &http.Client{
|
||||
Transport: &cos.AuthorizationTransport{
|
||||
SecretID: conf.AccessKey,
|
||||
SecretKey: conf.SecretKey,
|
||||
},
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (q qcloudCos) Upload(file *multipart.FileHeader, key string, folder string) (err error) {
|
||||
c := q.initOssClient()
|
||||
|
||||
objectName := path.Join(folder, key)
|
||||
|
||||
// 读取文件流
|
||||
src, err := file.Open()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer src.Close()
|
||||
|
||||
_, err = c.Object.Put(context.Background(), objectName, src, nil)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (q qcloudCos) Delete(objectName string) (err error) {
|
||||
c := q.initOssClient()
|
||||
_, err = c.Object.Delete(context.Background(), objectName)
|
||||
|
||||
return
|
||||
}
|
||||
60
server/plugin/storageQiniu.go
Normal file
60
server/plugin/storageQiniu.go
Normal file
@@ -0,0 +1,60 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/qiniu/go-sdk/v7/auth/qbox"
|
||||
"github.com/qiniu/go-sdk/v7/storage"
|
||||
"likeadmin/util"
|
||||
"mime/multipart"
|
||||
"path"
|
||||
)
|
||||
|
||||
var QiniuKodo = qiniuKodo{}
|
||||
|
||||
type qiniuKodo struct{}
|
||||
|
||||
func (q qiniuKodo) Upload(file *multipart.FileHeader, key string, folder string) (err error) {
|
||||
conf := util.SettingUtil.GetStorageEngineConf("qiniu")
|
||||
bucket := conf.Bucket
|
||||
putPolicy := storage.PutPolicy{
|
||||
Scope: bucket,
|
||||
}
|
||||
mac := qbox.NewMac(conf.AccessKey, conf.SecretKey)
|
||||
upToken := putPolicy.UploadToken(mac)
|
||||
|
||||
cfg := storage.Config{
|
||||
// 是否使用https域名进行资源管理
|
||||
UseHTTPS: true,
|
||||
}
|
||||
resumeUploader := storage.NewResumeUploaderV2(&cfg)
|
||||
ret := storage.PutRet{}
|
||||
putExtra := storage.RputV2Extra{}
|
||||
|
||||
objectName := path.Join(folder, key)
|
||||
|
||||
// 读取文件流
|
||||
src, err := file.Open()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer src.Close()
|
||||
|
||||
err = resumeUploader.Put(context.Background(), &ret, upToken, objectName, src, file.Size, &putExtra)
|
||||
return
|
||||
}
|
||||
|
||||
func (q qiniuKodo) Delete(objectName string) (err error) {
|
||||
conf := util.SettingUtil.GetStorageEngineConf("qiniu")
|
||||
bucket := conf.Bucket
|
||||
|
||||
mac := qbox.NewMac(conf.AccessKey, conf.SecretKey)
|
||||
|
||||
cfg := storage.Config{
|
||||
// 是否使用https域名进行资源管理
|
||||
UseHTTPS: true,
|
||||
}
|
||||
bucketManager := storage.NewBucketManager(mac, &cfg)
|
||||
err = bucketManager.Delete(bucket, objectName)
|
||||
|
||||
return
|
||||
}
|
||||
@@ -4,14 +4,15 @@ import (
|
||||
"github.com/fatih/structs"
|
||||
"github.com/jinzhu/copier"
|
||||
"likeadmin/core"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
var ConvertUtil = convertUtil{}
|
||||
|
||||
//convertUtil 转换工具
|
||||
// convertUtil 转换工具
|
||||
type convertUtil struct{}
|
||||
|
||||
//StructsToMaps 将结构体转换成Map列表
|
||||
// StructsToMaps 将结构体转换成Map列表
|
||||
func (cu convertUtil) StructsToMaps(objs interface{}) (data []map[string]interface{}) {
|
||||
var objList []interface{}
|
||||
err := copier.Copy(&objList, objs)
|
||||
@@ -24,3 +25,20 @@ func (cu convertUtil) StructsToMaps(objs interface{}) (data []map[string]interfa
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// StructToMap 将结构体转换成Map列表
|
||||
func (cu convertUtil) StructToMap(obj interface{}) map[string]interface{} {
|
||||
objValue := reflect.ValueOf(obj)
|
||||
objType := objValue.Type()
|
||||
|
||||
data := make(map[string]interface{})
|
||||
|
||||
for i := 0; i < objValue.NumField(); i++ {
|
||||
field := objValue.Field(i)
|
||||
fieldName := objType.Field(i).Name
|
||||
|
||||
data[fieldName] = field.Interface()
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ type settingUtil struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
// getSettingVal 获取默认存储引擎
|
||||
// getSettingVal
|
||||
func (s settingUtil) getSettingVal(key string, name string, defaultVal string) string {
|
||||
val := RedisUtil.HGet(key, name)
|
||||
if val == "" {
|
||||
@@ -25,7 +25,7 @@ func (s settingUtil) getSettingVal(key string, name string, defaultVal string) s
|
||||
return val
|
||||
}
|
||||
|
||||
// getSettingStruct 获取存储引擎配置
|
||||
// getSettingStruct 获取配置
|
||||
func (s settingUtil) getSettingStruct(key string, name string, res interface{}) (e error) {
|
||||
val := RedisUtil.HGet(key, name)
|
||||
|
||||
@@ -54,3 +54,14 @@ func (s settingUtil) GetSmsEngineConf(engine string) (res *resp.SmsSettingResp)
|
||||
_ = s.getSettingStruct("sms", engine, &res)
|
||||
return
|
||||
}
|
||||
|
||||
// GetStorageEngine 获取默认存储引擎
|
||||
func (s settingUtil) GetStorageEngine() string {
|
||||
return s.getSettingVal("storage", "default", "local")
|
||||
}
|
||||
|
||||
// GetStorageEngineConf 获取存储引擎配置
|
||||
func (s settingUtil) GetStorageEngineConf(engine string) (res *resp.StorageSettingResp) {
|
||||
_ = s.getSettingStruct("storage", engine, &res)
|
||||
return
|
||||
}
|
||||
|
||||
41
server/util/snowflakeId.go
Normal file
41
server/util/snowflakeId.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/sony/sonyflake"
|
||||
"likeadmin/core"
|
||||
)
|
||||
|
||||
// IDUtil 通过 Sonyflake 雪花算法获得不重复id
|
||||
|
||||
var IDUtil = idUtil{}
|
||||
var sf = initSonyflake()
|
||||
|
||||
type idUtil struct{}
|
||||
|
||||
func initSonyflake() (sf *sonyflake.Sonyflake) {
|
||||
var st sonyflake.Settings
|
||||
st.MachineID = getMID
|
||||
sf = sonyflake.NewSonyflake(st)
|
||||
if sf == nil {
|
||||
panic("sonyflake not created")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 通过ip计算出机器ID
|
||||
func getMID() (uint16, error) {
|
||||
ip := IpUtil.GetHostIp()
|
||||
mId := uint16(ip[2])<<8 + uint16(ip[3])
|
||||
//fmt.Println(ip, mId)
|
||||
return mId, nil
|
||||
}
|
||||
|
||||
func (i idUtil) GetNewID() uint64 {
|
||||
id, err := sf.NextID()
|
||||
if err != nil {
|
||||
core.Logger.Errorf("sonyflake GetNewID err: err=[%+v]", err)
|
||||
return 0
|
||||
}
|
||||
//println(id)
|
||||
return id
|
||||
}
|
||||
@@ -19,10 +19,13 @@ type urlUtil struct{}
|
||||
|
||||
// ToAbsoluteUrl 转绝对路径
|
||||
func (uu urlUtil) ToAbsoluteUrl(u string) string {
|
||||
// TODO: engine默认local
|
||||
//获取默认的存储engine
|
||||
engine := SettingUtil.GetStorageEngine()
|
||||
|
||||
if u == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
up, err := url.Parse(publicUrl)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("ToAbsoluteUrl Parse err: err=[%+v]", err)
|
||||
@@ -33,18 +36,55 @@ func (uu urlUtil) ToAbsoluteUrl(u string) string {
|
||||
up.Path = path.Join(up.Path, u)
|
||||
return up.String()
|
||||
}
|
||||
engine := "local"
|
||||
|
||||
if engine == "local" {
|
||||
|
||||
up.Path = path.Join(up.Path, publicPrefix, u)
|
||||
return up.String()
|
||||
|
||||
} else if engine == "aliyun" {
|
||||
|
||||
conf := SettingUtil.GetStorageEngineConf("aliyun")
|
||||
up, err = url.Parse(conf.Domain)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("ToAbsoluteUrl Parse aliyun err: err=[%+v]", err)
|
||||
return u
|
||||
}
|
||||
up.Path = path.Join(up.Path, u)
|
||||
return up.String()
|
||||
|
||||
} else if engine == "qcloud" {
|
||||
|
||||
conf := SettingUtil.GetStorageEngineConf("qcloud")
|
||||
up, err = url.Parse(conf.Domain)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("ToAbsoluteUrl Parse qcloud err: err=[%+v]", err)
|
||||
return u
|
||||
}
|
||||
up.Path = path.Join(up.Path, u)
|
||||
return up.String()
|
||||
|
||||
} else if engine == "qiniu" {
|
||||
|
||||
conf := SettingUtil.GetStorageEngineConf("qiniu")
|
||||
up, err = url.Parse(conf.Domain)
|
||||
if err != nil {
|
||||
core.Logger.Errorf("ToAbsoluteUrl Parse qiniu err: err=[%+v]", err)
|
||||
return u
|
||||
}
|
||||
up.Path = path.Join(up.Path, u)
|
||||
return up.String()
|
||||
|
||||
}
|
||||
// TODO: 其他engine
|
||||
|
||||
return u
|
||||
}
|
||||
|
||||
// ToRelativeUrl 还原成相对路径
|
||||
func (uu urlUtil) ToRelativeUrl(u string) string {
|
||||
// TODO: engine默认local 要从配置的缓存里读取
|
||||
//获取默认的存储engine
|
||||
engine := SettingUtil.GetStorageEngine()
|
||||
|
||||
if u == "" {
|
||||
return ""
|
||||
}
|
||||
@@ -53,13 +93,22 @@ func (uu urlUtil) ToRelativeUrl(u string) string {
|
||||
core.Logger.Errorf("ToRelativeUrl Parse err: err=[%+v]", err)
|
||||
return u
|
||||
}
|
||||
engine := "local"
|
||||
|
||||
lu := up.String()
|
||||
if engine == "local" {
|
||||
lu := up.String()
|
||||
return strings.Replace(
|
||||
strings.Replace(lu, publicUrl, "", 1),
|
||||
publicPrefix, "", 1)
|
||||
} else if engine == "aliyun" {
|
||||
conf := SettingUtil.GetStorageEngineConf("aliyun")
|
||||
return strings.Replace(lu, conf.Domain, "", 1)
|
||||
} else if engine == "qcloud" {
|
||||
conf := SettingUtil.GetStorageEngineConf("qcloud")
|
||||
return strings.Replace(lu, conf.Domain, "", 1)
|
||||
} else if engine == "qiniu" {
|
||||
conf := SettingUtil.GetStorageEngineConf("qiniu")
|
||||
return strings.Replace(lu, conf.Domain, "", 1)
|
||||
}
|
||||
// TODO: 其他engine
|
||||
|
||||
return u
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Target Server Version : 80028
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 17/11/2023 00:47:47
|
||||
Date: 24/11/2023 00:54:25
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@@ -37,7 +37,7 @@ CREATE TABLE `la_album` (
|
||||
`delete_time` int unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_cid` (`cid`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='相册管理表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='相册管理表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of la_album
|
||||
@@ -49,7 +49,7 @@ INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`,
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (4, 0, 1, 0, 10, 'backend_backdrop2.png', 'image/20230711/9678a22c7c4b40669354b5d88347c465.png', 'png', 193510, 1, 1699336440, 1699540253, 1699540253);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (5, 0, 1, 0, 10, 'metamaskico.png', 'image/20230911/7761e1fad64d4d849e476d35679797c7.png', 'png', 10830, 1, 1699512751, 1699540263, 1699540263);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (6, 0, 1, 0, 10, 'backend_backdrop2.png', 'image/20230911/7b289c2c902d45dda676044d6cd14439.png', 'png', 193510, 1, 1699540290, 1699552406, 1699552406);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (7, 2, 1, 0, 10, 'backend_backdrop2.png', 'image/20230911/c88ec3f53dd0425899682e56b11002d5.png', 'png', 193510, 0, 1699540355, 1699540355, 0);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (7, 2, 1, 0, 10, 'backend_backdrop2.png', 'image/20230911/c88ec3f53dd0425899682e56b11002d5.png', 'png', 193510, 1, 1699540355, 1700729562, 1700729562);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (8, 0, 1, 0, 10, 'WX20230811-010416@2x.png', 'image/20231611/872472ee657a4a4f9ae8aace06961b8d.png', 'png', 154496, 0, 1700113950, 1700113950, 0);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (9, 0, 1, 0, 10, 'WX20230811-005953@2x.png', 'image/20231611/dd2adfb1df364ec4ba2483297aead3e0.png', 'png', 166065, 0, 1700115795, 1700115795, 0);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (10, 0, 1, 0, 10, 'balance_pay.png', 'image/20231611/e037db90197c4a9a9a911ea7d75db690.png', 'png', 4362, 1, 1700130866, 1700132220, 1700132220);
|
||||
@@ -57,6 +57,16 @@ INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`,
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (12, 0, 1, 0, 10, 'alipay.png', 'image/20231611/a3f22d1b805c43d483e063399c846c40.png', 'png', 3204, 0, 1700132228, 1700132228, 0);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (13, 0, 1, 0, 10, 'balance.png', 'image/20231611/f15d9858074e4aa5ac99536f0c45a285.png', 'png', 3491, 0, 1700132264, 1700132264, 0);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (14, 0, 1, 0, 10, 'wechat.png', 'image/20231611/1022529df4d34afcb34d8624db3202ed.png', 'png', 2424, 0, 1700132313, 1700132313, 0);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (15, 0, 1, 0, 10, 'backend_backdrop.png', 'image/20232311/02b7e14dd1d1491a9907e98c8b35fb20.png', 'png', 85612, 1, 1700730929, 1700732213, 1700732213);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (16, 0, 1, 0, 10, 'backend_backdrop.png', 'image/20232311/c7f1a07a085e4da8b83e51701353f83e.png', 'png', 85612, 1, 1700732219, 1700735943, 1700735943);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (17, 0, 1, 0, 10, 'backend_backdrop.png', 'image/20232311/0541ca0252a048b9923d6b59ba7c98fb.png', 'png', 85612, 1, 1700749117, 1700749130, 1700749130);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (18, 0, 1, 0, 10, 'backend_backdrop.png', 'image/20232311/a2198101191a41f3ac16e98979aefbc1.png', 'png', 85612, 1, 1700749382, 1700749389, 1700749389);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (19, 0, 1, 0, 10, 'backend_backdrop2.png', 'image/20232311/c866ad10b2eb49d6af6f10d6ac706ade.png', 'png', 193510, 1, 1700749895, 1700749904, 1700749904);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (20, 0, 1, 0, 10, 'backend_backdrop.png', 'image/20232311/761d1722ce924c0a99ce1da4b460ac2c.png', 'png', 85612, 1, 1700749929, 1700749992, 1700749992);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (21, 0, 1, 0, 10, 'WX20230811-002454@2x.png', 'image/20232311/81326b3eff654735bfd91069248609ff.png', 'png', 158426, 1, 1700754054, 1700754137, 1700754137);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (22, 0, 1, 0, 10, 'WX20230811-003408@2x.png', 'image/20232311/ac3004cd8e434cd38cf85e5ded07bc02.png', 'png', 165623, 1, 1700754357, 1700754440, 1700754440);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (23, 0, 1, 0, 10, '04879a5cb178389f2c549ef42c2800c2.JPG', 'image/20232411/cbaf09afb2b346a6994d430ccd8894e8.jpg', 'jpg', 174997, 1, 1700757960, 1700758006, 1700758006);
|
||||
INSERT INTO `la_album` (`id`, `cid`, `aid`, `uid`, `type`, `name`, `uri`, `ext`, `size`, `is_delete`, `create_time`, `update_time`, `delete_time`) VALUES (24, 0, 1, 0, 20, '19323.MP4', 'video/20232411/887a68c3399044848514975353a3b3e7.mp4', 'mp4', 6150581, 1, 1700758134, 1700758213, 1700758213);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -284,15 +294,13 @@ CREATE TABLE `la_gen_table` (
|
||||
`create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='代码生成业务表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='代码生成业务表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of la_gen_table
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `la_gen_table` (`id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk`, `author_name`, `entity_name`, `module_name`, `function_name`, `tree_primary`, `tree_parent`, `tree_name`, `gen_tpl`, `gen_type`, `gen_path`, `remarks`, `create_time`, `update_time`) VALUES (19, 'la_user_account_log', '用户余额变动日志', '', '', '', 'userAccountLog', 'log', '用户余额变动日志', '', '', '', 'crud', 0, '/', '', 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table` (`id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk`, `author_name`, `entity_name`, `module_name`, `function_name`, `tree_primary`, `tree_parent`, `tree_name`, `gen_tpl`, `gen_type`, `gen_path`, `remarks`, `create_time`, `update_time`) VALUES (21, 'la_refund_record', '退款记录表', '', '', '', 'refundRecord', 'record', '退款记录', '', '', '', 'crud', 0, '/', '', 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table` (`id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk`, `author_name`, `entity_name`, `module_name`, `function_name`, `tree_primary`, `tree_parent`, `tree_name`, `gen_tpl`, `gen_type`, `gen_path`, `remarks`, `create_time`, `update_time`) VALUES (22, 'la_refund_log', '退款日志表', '', '', '', 'refundLog', 'log', '退款日志', '', '', '', 'crud', 0, '/', '', 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table` (`id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk`, `author_name`, `entity_name`, `module_name`, `function_name`, `tree_primary`, `tree_parent`, `tree_name`, `gen_tpl`, `gen_type`, `gen_path`, `remarks`, `create_time`, `update_time`) VALUES (37, 'la_album', '相册管理表', '', '', 'sss', 'album', 'album', '相册管理', '', '', '', 'crud', 0, '/', '', 1700497021, 1700498569);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -306,8 +314,8 @@ CREATE TABLE `la_gen_table_column` (
|
||||
`column_comment` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '列描述',
|
||||
`column_length` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '列长度',
|
||||
`column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '列类型 ',
|
||||
`java_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'JAVA类型',
|
||||
`java_field` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'JAVA字段',
|
||||
`go_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'JAVA类型',
|
||||
`go_field` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'JAVA字段',
|
||||
`is_pk` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否主键: [1=是, 0=否]',
|
||||
`is_increment` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否自增: [1=是, 0=否]',
|
||||
`is_required` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否必填: [1=是, 0=否]',
|
||||
@@ -322,51 +330,25 @@ CREATE TABLE `la_gen_table_column` (
|
||||
`create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=316 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='代码生成字段表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=481 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='代码生成字段表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of la_gen_table_column
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (266, 19, 'id', '', '0', 'int unsigned', 'int32', 'id', 1, 1, 1, 0, 1, 0, 0, '=', 'input', '', 1, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (267, 19, 'sn', '流水号', '32', 'varchar', 'string', 'sn', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 2, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (268, 19, 'user_id', '用户id', '0', 'int', 'int32', 'user_id', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 3, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (269, 19, 'change_object', '变动对象', '0', 'tinyint', 'int32', 'change_object', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 4, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (270, 19, 'change_type', '变动类型', '0', 'smallint', 'int32', 'change_type', 0, 0, 1, 1, 1, 1, 1, '=', 'select', '', 5, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (271, 19, 'action', '动作 1-增加 2-减少', '0', 'tinyint', 'int32', 'action', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 6, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (272, 19, 'change_amount', '变动数量', '0', 'decimal', 'int32', 'change_amount', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 7, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (273, 19, 'left_amount', '变动后数量', '0', 'decimal', 'int32', 'left_amount', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 8, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (274, 19, 'source_sn', '关联单号', '255', 'varchar', 'string', 'source_sn', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 9, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (275, 19, 'remark', '备注', '255', 'varchar', 'string', 'remark', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 10, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (276, 19, 'extra', '预留扩展字段', '0', 'text', 'string', 'extra', 0, 0, 1, 1, 1, 1, 1, '=', 'textarea', '', 11, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (277, 19, 'create_time', '创建时间', '0', 'int', 'core.TsTime', 'create_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 12, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (278, 19, 'update_time', '更新时间', '0', 'int', 'core.TsTime', 'update_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 13, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (279, 19, 'delete_time', '删除时间', '0', 'int', 'core.TsTime', 'delete_time', 0, 0, 0, 0, 0, 0, 0, '=', 'datetime', '', 14, 1699990943, 1699990943);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (291, 21, 'id', 'id', '0', 'int', 'int32', 'id', 1, 1, 1, 0, 1, 0, 0, '=', 'input', '', 1, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (292, 21, 'sn', '退款编号', '32', 'varchar', 'string', 'sn', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 2, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (293, 21, 'user_id', '关联用户', '0', 'int', 'int32', 'user_id', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 3, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (294, 21, 'order_id', '来源订单id', '0', 'int', 'int32', 'order_id', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 4, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (295, 21, 'order_sn', '来源单号', '32', 'varchar', 'string', 'order_sn', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 5, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (296, 21, 'order_type', '订单来源 order-商品订单 recharge-充值订单', '255', 'varchar', 'string', 'order_type', 0, 0, 1, 1, 1, 1, 1, '=', 'select', '', 6, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (297, 21, 'order_amount', '订单总的应付款金额,冗余字段', '0', 'decimal', 'int32', 'order_amount', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 7, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (298, 21, 'refund_amount', '本次退款金额', '0', 'decimal', 'int32', 'refund_amount', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 8, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (299, 21, 'transaction_id', '第三方平台交易流水号', '255', 'varchar', 'string', 'transaction_id', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 9, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (300, 21, 'refund_way', '退款方式 1-线上退款 2-线下退款', '1', 'tinyint', 'int32', 'refund_way', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 10, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (301, 21, 'refund_type', '退款类型 1-后台退款', '1', 'tinyint', 'int32', 'refund_type', 0, 0, 1, 1, 1, 1, 1, '=', 'select', '', 11, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (302, 21, 'refund_status', '退款状态,0退款中,1退款成功,2退款失败', '0', 'tinyint unsigned', 'string', 'refund_status', 0, 0, 1, 1, 1, 1, 1, '=', 'radio', '', 12, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (303, 21, 'create_time', '创建时间', '0', 'int unsigned', 'core.TsTime', 'create_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 13, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (304, 21, 'update_time', '更新时间', '0', 'int', 'core.TsTime', 'update_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 14, 1700054627, 1700054627);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (305, 22, 'id', 'id', '0', 'int', 'int32', 'id', 1, 1, 1, 0, 1, 0, 0, '=', 'input', '', 1, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (306, 22, 'sn', '编号', '32', 'varchar', 'string', 'sn', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 2, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (307, 22, 'record_id', '充值记录id', '0', 'int', 'int32', 'record_id', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 3, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (308, 22, 'user_id', '关联用户', '0', 'int', 'int32', 'user_id', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 4, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (309, 22, 'handle_id', '处理人id(管理员id)', '0', 'int', 'int32', 'handle_id', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 5, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (310, 22, 'order_amount', '订单总的应付款金额,冗余字段', '0', 'decimal', 'int32', 'order_amount', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 6, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (311, 22, 'refund_amount', '本次退款金额', '0', 'decimal', 'int32', 'refund_amount', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 7, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (312, 22, 'refund_status', '退款状态,0退款中,1退款成功,2退款失败', '0', 'tinyint unsigned', 'string', 'refund_status', 0, 0, 1, 1, 1, 1, 1, '=', 'radio', '', 8, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (313, 22, 'refund_msg', '退款信息', '0', 'text', 'string', 'refund_msg', 0, 0, 1, 1, 1, 1, 1, '=', 'textarea', '', 9, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (314, 22, 'create_time', '创建时间', '0', 'int unsigned', 'core.TsTime', 'create_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 10, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (315, 22, 'update_time', '更新时间', '0', 'int', 'core.TsTime', 'update_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 11, 1700063692, 1700063692);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (468, 37, 'id', '主键ID', '0', 'int unsigned', 'int32', 'id', 1, 1, 1, 0, 1, 0, 0, '=', 'input', '', 1, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (469, 37, 'cid', '类目ID', '0', 'int unsigned', 'int32', 'cid', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 2, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (470, 37, 'aid', '管理员ID', '0', 'int unsigned', 'int32', 'aid', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 3, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (471, 37, 'uid', '用户ID', '0', 'int unsigned', 'int32', 'uid', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 4, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (472, 37, 'type', '文件类型: [10=图片, 20=视频]', '0', 'tinyint unsigned', 'string', 'type', 0, 0, 1, 1, 1, 1, 1, '=', 'select', '', 5, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (473, 37, 'name', '文件名称', '100', 'varchar', 'string', 'name', 0, 0, 1, 1, 1, 1, 1, 'LIKE', 'input', '', 6, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (474, 37, 'uri', '文件路径', '200', 'varchar', 'string', 'uri', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 7, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (475, 37, 'ext', '文件扩展', '10', 'varchar', 'string', 'ext', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 8, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (476, 37, 'size', '文件大小', '0', 'int unsigned', 'int32', 'size', 0, 0, 1, 1, 1, 1, 1, '=', 'input', '', 9, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (477, 37, 'is_delete', '是否删除: 0=否, 1=是', '0', 'int unsigned', 'int32', 'is_delete', 0, 0, 0, 0, 0, 0, 0, '=', 'input', '', 10, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (478, 37, 'create_time', '创建时间', '0', 'int unsigned', 'core.TsTime', 'create_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 11, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (479, 37, 'update_time', '更新时间', '0', 'int unsigned', 'core.TsTime', 'update_time', 0, 0, 0, 0, 0, 1, 0, '=', 'datetime', '', 12, 1700497322, 1700498569);
|
||||
INSERT INTO `la_gen_table_column` (`id`, `table_id`, `column_name`, `column_comment`, `column_length`, `column_type`, `go_type`, `go_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_time`, `update_time`) VALUES (480, 37, 'delete_time', '删除时间', '0', 'int unsigned', 'core.TsTime', 'delete_time', 0, 0, 0, 0, 0, 0, 0, '=', 'datetime', '', 13, 1700497322, 1700498569);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -478,7 +460,7 @@ CREATE TABLE `la_recharge_order` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单编号',
|
||||
`user_id` int NOT NULL COMMENT '用户id',
|
||||
`user_sn` int unsigned NOT NULL COMMENT '用户编号',
|
||||
`user_sn` bigint unsigned NOT NULL COMMENT '用户编号',
|
||||
`mobile` varchar(11) COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`pay_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '支付编号-冗余字段,针对微信同一主体不同客户端支付需用不同订单号预留。',
|
||||
`pay_way` tinyint NOT NULL DEFAULT '2' COMMENT '支付方式 2-微信支付 3-支付宝支付',
|
||||
@@ -598,7 +580,7 @@ CREATE TABLE `la_system_auth_admin` (
|
||||
-- Records of la_system_auth_admin
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `la_system_auth_admin` (`id`, `dept_id`, `post_id`, `username`, `nickname`, `password`, `avatar`, `role`, `salt`, `sort`, `is_multipoint`, `is_disable`, `is_delete`, `last_login_ip`, `last_login_time`, `create_time`, `update_time`, `delete_time`) VALUES (1, 1, 1, 'admin', 'admin', '338b491c378a6dd0f90ed7c0e00fcf8d', '/image/20231611/872472ee657a4a4f9ae8aace06961b8d.png', '0', 'YuAz7', 1, 1, 0, 0, '::1', 1700116477, 1642321599, 1700116477, 0);
|
||||
INSERT INTO `la_system_auth_admin` (`id`, `dept_id`, `post_id`, `username`, `nickname`, `password`, `avatar`, `role`, `salt`, `sort`, `is_multipoint`, `is_disable`, `is_delete`, `last_login_ip`, `last_login_time`, `create_time`, `update_time`, `delete_time`) VALUES (1, 1, 1, 'admin', 'admin', '338b491c378a6dd0f90ed7c0e00fcf8d', '/image/20231611/872472ee657a4a4f9ae8aace06961b8d.png', '0', 'YuAz7', 1, 1, 0, 0, '::1', 1700744919, 1642321599, 1700744919, 0);
|
||||
INSERT INTO `la_system_auth_admin` (`id`, `dept_id`, `post_id`, `username`, `nickname`, `password`, `avatar`, `role`, `salt`, `sort`, `is_multipoint`, `is_disable`, `is_delete`, `last_login_ip`, `last_login_time`, `create_time`, `update_time`, `delete_time`) VALUES (2, 1, 1, 'luojinyi', '罗锦毅', '8c0c364e4da86805b610239918d985cf', '/image/20231611/dd2adfb1df364ec4ba2483297aead3e0.png', '2', 'Akqd7', 1, 1, 0, 0, '::1', 1700116411, 1700115994, 1700122235, 0);
|
||||
COMMIT;
|
||||
|
||||
@@ -650,7 +632,7 @@ CREATE TABLE `la_system_auth_menu` (
|
||||
`create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=824 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统菜单管理表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=825 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统菜单管理表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of la_system_auth_menu
|
||||
@@ -778,6 +760,7 @@ INSERT INTO `la_system_auth_menu` (`id`, `pid`, `menu_type`, `menu_name`, `menu_
|
||||
INSERT INTO `la_system_auth_menu` (`id`, `pid`, `menu_type`, `menu_name`, `menu_icon`, `menu_sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`) VALUES (821, 820, 'A', '设置支付方式', '', 0, 'setting:pay:way:set', '', '', '', '', 1, 1, 0, 1700123024, 1700123024);
|
||||
INSERT INTO `la_system_auth_menu` (`id`, `pid`, `menu_type`, `menu_name`, `menu_icon`, `menu_sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`) VALUES (822, 819, 'C', '支付配置', '', 0, 'setting:pay:config:lists', 'config', 'setting/pay/config/index', '', '', 0, 1, 0, 1700123171, 1700123171);
|
||||
INSERT INTO `la_system_auth_menu` (`id`, `pid`, `menu_type`, `menu_name`, `menu_icon`, `menu_sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`) VALUES (823, 822, 'A', '配置', '', 0, 'setting:pay:config:set', '', '', '', '', 1, 1, 0, 1700123221, 1700123221);
|
||||
INSERT INTO `la_system_auth_menu` (`id`, `pid`, `menu_type`, `menu_name`, `menu_icon`, `menu_sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`) VALUES (824, 600, 'C', '编辑数据表', '', 0, 'gen:edit', 'code/edit', 'dev_tools/code/edit', '/dev_tools/code', '', 1, 0, 0, 1700196667, 1700196667);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -874,11 +857,11 @@ CREATE TABLE `la_system_config` (
|
||||
-- Records of la_system_config
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (1, 'storage', 'default', 'local', 1660620367, 1700112439);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (2, 'storage', 'local', '{\"engine\":\"local\",\"name\":\"本地存储\",\"describe\":\"存储在本地服务器\"}', 1660620367, 1700112439);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (3, 'storage', 'qiniu', '{\"engine\":\"qiniu\",\"name\":\"七牛云存储\",\"describe\":\"存储在七牛云,请前往七牛云开通存储服务\",\"bucket\":\"存储空间名称\",\"secret_key\":\"SECRET_KEY\",\"access_key\":\"ACCESS_KEY\",\"domain\":\"空间域名\"}', 1660620367, 1699617851);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (4, 'storage', 'aliyun', '{\"engine\":\"aliyun\",\"name\":\"阿里云存储\",\"describe\":\"存储在阿里云,请前往阿里云开通存储服务\",\"bucket\":\"SSSSS\",\"secret_key\":\"SSSS\",\"access_key\":\"SSSSS\",\"domain\":\"SSSSS\"}', 1660620367, 1699791253);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (5, 'storage', 'qcloud', '{\"engine\":\"qcloud\",\"name\":\"腾讯云存储\",\"describe\":\"存储在腾讯云,请前往腾讯云开通存储服务\",\"bucket\":\"sdfsdf\",\"secret_key\":\"fsdfsdfdsfdsfds\",\"access_key\":\"sdfsdfsd\",\"domain\":\"fdsfsdf\",\"region\":\"sdfdsfdsf\"}', 1660620367, 1699446501);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (1, 'storage', 'default', 'local', 1660620367, 1700758251);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (2, 'storage', 'local', '{\"engine\":\"local\",\"name\":\"本地存储\",\"describe\":\"存储在本地服务器\"}', 1660620367, 1700758251);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (3, 'storage', 'qiniu', '{\"engine\":\"qiniu\",\"name\":\"七牛云存储\",\"describe\":\"存储在七牛云,请前往七牛云开通存储服务\",\"bucket\":\"my-test-0100\",\"secret_key\":\"nWnLYSpEG9lex5r\",\"access_key\":\"t6011E0TdX3ou-azuAZN4CTDiULlGdjKExlmuGvA\",\"domain\":\"http://s4l2ga4ln.hd-bkt.clouddn.com\"}', 1660620367, 1700758430);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (4, 'storage', 'aliyun', '{\"engine\":\"aliyun\",\"name\":\"阿里云存储\",\"describe\":\"存储在阿里云,请前往阿里云开通存储服务\",\"bucket\":\"mooc-love-storage\",\"endpoint\":\"oss-cn-beijing.aliyuncs.com\",\"secret_key\":\"XktkXBR6NYShP\",\"access_key\":\"LTAI5tRm3YWuGVpjLTsz4RHs\",\"domain\":\"https://mooc-love-storage.oss-cn-beijing.aliyuncs.com\"}', 1660620367, 1700758434);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (5, 'storage', 'qcloud', '{\"engine\":\"qcloud\",\"name\":\"腾讯云存储\",\"describe\":\"存储在腾讯云,请前往腾讯云开通存储服务\",\"bucket\":\"mytest-1252415727\",\"secret_key\":\"LUdk4ShkeLsCR\",\"access_key\":\"AKID364qQq1558PXUFoAKNGiwvumX8XicOj5\",\"domain\":\"https://mytest-1252415727.cos.ap-shanghai.myqcloud.com\",\"region\":\"ap-shanghai\"}', 1660620367, 1700758438);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (6, 'sms', 'default', 'aliyun', 1660620367, 1700112398);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (7, 'sms', 'aliyun', '{\"name\":\"阿里云短信\",\"alias\":\"aliyun\",\"sign\":\"dfsdf\",\"appKey\":\"sdfsdf\",\"appId\":\"\",\"secretKey\":\"dsfdsfdssssssssss\",\"secretId\":\"\",\"status\":1}', 1660620367, 1700112398);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (10, 'website', 'name', 'Byteadmin管理系统', 1660620367, 1699336964);
|
||||
@@ -915,7 +898,7 @@ INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `u
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (70, 'login', 'config', '{\"loginWay\":[1,2],\"forceBindMobile\":1,\"openAgreement\":1,\"openOtherAuth\":1,\"autoLoginAuth\":[1]}', 1660620367, 1700109725);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (80, 'user', 'defaultAvatar', '/api/static/default_avatar.png', 1660620367, 1700109615);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (90, 'recharge', 'config', '{\"status\":1,\"min_amount\":1}', 1699517800, 1700116427);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (91, 'pay_config', 'balance', '{\"name\":\"balance\",\"display_name\":\"余额支付\",\"icon\":\"/image/20231611/f15d9858074e4aa5ac99536f0c45a285.png\",\"remark\":\"\",\"domain\":\"\",\"sort\":1,\"config\":{}}', 0, 1700132355);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (91, 'pay_config', 'balance', '{\"name\":\"balance\",\"display_name\":\"余额支付\",\"icon\":\"/image/20232311/ac3004cd8e434cd38cf85e5ded07bc02.png\",\"remark\":\"\",\"domain\":\"\",\"sort\":1,\"config\":{}}', 0, 1700754397);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (92, 'pay_config', 'wechat', '{\"name\":\"wechat\",\"display_name\":\"微信支付\",\"icon\":\"/image/20231611/1022529df4d34afcb34d8624db3202ed.png\",\"remark\":\"\",\"domain\":\"\",\"sort\":2,\"config\":{\"api_client_cert\":\"dsfsdfsdfsd\",\"api_client_key\":\"cccccccccccc\",\"interface_version\":\"v3\",\"mch_id\":\"dddddddd\",\"merchant_type\":\"ordinary_merchant\",\"pay_sign_key\":\"ssssssssss\"}}', 0, 1700132322);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (93, 'pay_config', 'alipay', '{\"name\":\"alipay\",\"display_name\":\"支付宝\",\"icon\":\"/image/20231611/a3f22d1b805c43d483e063399c846c40.png\",\"remark\":\"\",\"domain\":\"\",\"sort\":3,\"config\":{\"merchant_type\":\"ordinary_merchant\",\"ali_public_key\":\"adsfadsfasdfasdfsadfsda\",\"app_id\":\"sdfsdfssdfsdfsd\",\"mode\":\"normal_mode\",\"private_key\":\"sdfsdfsdfsdfsdfsdfsdfds\"}}', 0, 1700135011);
|
||||
INSERT INTO `la_system_config` (`id`, `type`, `name`, `value`, `create_time`, `update_time`) VALUES (94, 'pay_scene', 'oa', '[{\"scene\":\"oa\",\"is_default\":0,\"status\":1,\"payment_name\":\"balance\"},{\"scene\":\"oa\",\"is_default\":1,\"status\":1,\"payment_name\":\"wechat\"},{\"scene\":\"oa\",\"is_default\":0,\"status\":0,\"payment_name\":\"alipay\"}]', 0, 1700152551);
|
||||
@@ -938,7 +921,7 @@ CREATE TABLE `la_system_log_login` (
|
||||
`status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '操作状态: 1=成功, 2=失败',
|
||||
`create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统登录日志表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统登录日志表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of la_system_log_login
|
||||
@@ -1024,6 +1007,17 @@ INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `br
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (78, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700116246);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (79, 2, 'luojinyi', '::1', 'Mac OS X', 'Chrome', 1, 1700116411);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (80, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700116477);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (81, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700195859);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (82, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700230033);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (83, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700288875);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (84, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700483424);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (85, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700540875);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (86, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700631255);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (87, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700639672);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (88, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700669898);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (89, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700711588);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (90, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700726062);
|
||||
INSERT INTO `la_system_log_login` (`id`, `admin_id`, `username`, `ip`, `os`, `browser`, `status`, `create_time`) VALUES (91, 1, 'admin', '::1', 'Mac OS X', 'Chrome', 1, 1700744919);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -1046,7 +1040,7 @@ CREATE TABLE `la_system_log_operate` (
|
||||
`task_time` int unsigned NOT NULL DEFAULT '0' COMMENT '执行耗时',
|
||||
`create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统操作日志表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统操作日志表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of la_system_log_operate
|
||||
@@ -1144,6 +1138,36 @@ INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `u
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (90, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'alipay.png', '', 1, 1700132228, 1700132228, 8, 1700132228);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (91, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'balance.png', '', 1, 1700132264, 1700132264, 8, 1700132264);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (92, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'wechat.png', '', 1, 1700132313, 1700132313, 8, 1700132313);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (93, 1, 'GET', '角色列表', '::1', '/api/system/role/list', 'likeadmin/admin/routers/system.roleHandler.list-fm', 'pageNo=1&pageSize=15', '', 1, 1700722072, 1700722072, 8, 1700722072);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (94, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', '04879a5cb178389f2c549ef42c2800c2.JPG', 'Error #01: 500:系统错误\n', 2, 1700729500, 1700729500, 113, 1700729500);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (95, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[7]}', '', 1, 1700729562, 1700729562, 15, 1700729562);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (96, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'u=2725031792,168326554&fm=30&app=106&f=JPEG.jpeg', 'Error #01: 500:系统错误\n', 2, 1700729793, 1700729793, 135, 1700729793);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (97, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'u=2725031792,168326554&fm=30&app=106&f=JPEG.jpeg', 'Error #01: 500:系统错误\n', 2, 1700729990, 1700729990, 218, 1700729990);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (98, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', 'Error #01: 500:系统错误\n', 2, 1700730032, 1700730032, 18, 1700730032);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (99, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', 'Error #01: 500:系统错误\n', 2, 1700730065, 1700730065, 4, 1700730065);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (100, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', 'Error #01: 500:系统错误\n', 2, 1700730217, 1700730217, 7, 1700730217);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (101, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', 'Error #01: 500:系统错误\n', 2, 1700730252, 1700730252, 7, 1700730252);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (102, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop2.png', 'Error #01: 500:系统错误\n', 2, 1700730416, 1700730417, 534, 1700730417);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (103, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', '', 1, 1700730928, 1700730929, 601, 1700730929);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (104, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[15]}', '', 1, 1700732213, 1700732213, 24, 1700732213);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (105, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', '', 1, 1700732218, 1700732219, 692, 1700732219);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (106, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[16]}', '', 1, 1700735943, 1700735943, 27, 1700735943);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (107, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', '', 1, 1700749117, 1700749117, 17, 1700749117);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (108, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[17]}', '', 1, 1700749130, 1700749130, 21, 1700749130);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (109, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', '', 1, 1700749382, 1700749382, 15, 1700749382);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (110, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[18]}', '', 1, 1700749389, 1700749389, 20, 1700749389);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (111, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop2.png', '', 1, 1700749895, 1700749895, 13, 1700749895);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (112, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[19]}', '', 1, 1700749904, 1700749904, 40, 1700749904);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (113, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'backend_backdrop.png', '', 1, 1700749929, 1700749929, 353, 1700749929);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (114, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[20]}', '', 1, 1700749992, 1700749992, 212, 1700749992);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (115, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'WX20230811-002454@2x.png', '', 1, 1700754054, 1700754054, 476, 1700754054);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (116, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[21]}', '', 1, 1700754137, 1700754137, 359, 1700754137);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (117, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', 'WX20230811-003408@2x.png', '', 1, 1700754357, 1700754357, 560, 1700754357);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (118, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[22]}', '', 1, 1700754440, 1700754440, 326, 1700754440);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (119, 1, 'POST', '上传图片', '::1', '/api/common/upload/image', 'likeadmin/admin/routers/common.uploadHandler.uploadImage-fm', '04879a5cb178389f2c549ef42c2800c2.JPG', '', 1, 1700757959, 1700757960, 791, 1700757960);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (120, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[23]}', '', 1, 1700758006, 1700758006, 347, 1700758006);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (121, 1, 'POST', '上传视频', '::1', '/api/common/upload/video', 'likeadmin/admin/routers/common.uploadHandler.uploadVideo-fm', '19323.MP4', '', 1, 1700758133, 1700758134, 1067, 1700758134);
|
||||
INSERT INTO `la_system_log_operate` (`id`, `admin_id`, `type`, `title`, `ip`, `url`, `method`, `args`, `error`, `status`, `start_time`, `end_time`, `task_time`, `create_time`) VALUES (122, 1, 'POST', '相册文件删除', '::1', '/api/common/album/albumDel', 'likeadmin/admin/routers/common.albumHandler.albumDel-fm', '{\"ids\":[24]}', '', 1, 1700758213, 1700758213, 310, 1700758213);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -1206,7 +1230,7 @@ CREATE TABLE `la_user` (
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `la_user` (`id`, `sn`, `avatar`, `real_name`, `nickname`, `account`, `password`, `mobile`, `sex`, `channel`, `is_disable`, `login_ip`, `login_time`, `is_new_user`, `user_money`, `total_recharge_amount`, `create_time`, `update_time`, `delete_time`) VALUES (1, 23230, '/api/static/default_avatar.png', '时代发生的d', 'wewe', '是多大的的', 'ere', '13880000000', 1, 0, 0, '', 1699274409, 0, 2129.00, 0.00, 1699274409, 1700108468, NULL);
|
||||
INSERT INTO `la_user` (`id`, `sn`, `avatar`, `real_name`, `nickname`, `account`, `password`, `mobile`, `sex`, `channel`, `is_disable`, `login_ip`, `login_time`, `is_new_user`, `user_money`, `total_recharge_amount`, `create_time`, `update_time`, `delete_time`) VALUES (2, 5454, '/api/static/default_avatar.png', 'sdfsd', '3434', 'dsfdsf', '', '18608012488', 2, 0, 0, '', 1699274409, 0, 5405.00, 0.00, 1699274409, 1699274409, NULL);
|
||||
INSERT INTO `la_user` (`id`, `sn`, `avatar`, `real_name`, `nickname`, `account`, `password`, `mobile`, `sex`, `channel`, `is_disable`, `login_ip`, `login_time`, `is_new_user`, `user_money`, `total_recharge_amount`, `create_time`, `update_time`, `delete_time`) VALUES (2, 5454, '/api/static/default_avatar.png', 'sdfsd', '3434', 'dsfdsf', '', '13788888888', 2, 0, 0, '', 1699274409, 0, 5405.00, 0.00, 1699274409, 1700500980, NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
||||
Reference in New Issue
Block a user