Compare commits
9 Commits
74b0638a07
...
warm-flow
| Author | SHA1 | Date | |
|---|---|---|---|
| 760f085d9c | |||
| 12cf45a106 | |||
| b774806e58 | |||
| bb9f87dbd2 | |||
| 381c23e94c | |||
| 30b991cc28 | |||
| fbb0ce5da3 | |||
| 5a0c44ff35 | |||
| 615edb57b8 |
5
.idea/jarRepositories.xml
generated
5
.idea/jarRepositories.xml
generated
@@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="mavenCentral" />
|
||||
<option name="name" value="mavenCentral" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export const information = {
|
||||
debug: true,
|
||||
baseUrl: 'http://127.0.0.1:20080',
|
||||
debug: import.meta.env.DEV,
|
||||
baseUrl: import.meta.env.DEV ? 'http://127.0.0.1:20080' : '',
|
||||
title: '可信供给中心',
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ export function useAmis(amisObject) {
|
||||
struct,
|
||||
{
|
||||
data: {
|
||||
debug: information.debug ?? false,
|
||||
base: information.baseUrl ?? '',
|
||||
debug: information.debug,
|
||||
base: information.baseUrl,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -99,6 +99,16 @@ function detailForm() {
|
||||
trimContents: true,
|
||||
minRows: 2,
|
||||
maxRows: 2,
|
||||
maxLength: 100,
|
||||
},
|
||||
{
|
||||
type: 'input-tag',
|
||||
name: 'tags',
|
||||
label: '标签',
|
||||
max: 10,
|
||||
maxTagLength: 10,
|
||||
joinValues: false,
|
||||
extractValue: true,
|
||||
},
|
||||
{
|
||||
type: 'input-rich-text',
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import './style.css'
|
||||
import {apiGet, useAmis} from '../../components/constants.js'
|
||||
import {userChangePasswordDialog} from "../../components/user/dialog-user-change-password.js";
|
||||
import {tabUser} from "./tab-user.js";
|
||||
import {tabData} from "./tab-data.js";
|
||||
import {tabSettings} from "./tab-settings.js";
|
||||
import {tabCheck} from "./tab-check.js";
|
||||
import {tabPermissions} from "./tab-permissions.js";
|
||||
import {tabMarket} from "./tab-market.js";
|
||||
import {administratorOnly, apiGet, checkerOnly, useAmis, userOnly} from '../../components/constants.js'
|
||||
import {userChangePasswordDialog} from '../../components/user/dialog-user-change-password.js'
|
||||
import {tabUser} from './tab-user.js'
|
||||
import {tabData} from './tab-data.js'
|
||||
import {tabSettings} from './tab-settings.js'
|
||||
import {tabCheck} from './tab-check.js'
|
||||
import {tabPermissions} from './tab-permissions.js'
|
||||
import {tabMarket} from './tab-market.js'
|
||||
|
||||
useAmis(information => {
|
||||
useAmis((information) => {
|
||||
return {
|
||||
id: 'header-service',
|
||||
className: 'h-full',
|
||||
@@ -23,22 +23,105 @@ useAmis(information => {
|
||||
args: {
|
||||
url: '/pages/login/index.html',
|
||||
blank: false,
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
body: [
|
||||
{
|
||||
id: 'root-page',
|
||||
type: 'page',
|
||||
title: information.title,
|
||||
subTitle: '提供合法合规的数据要素可信供给工具',
|
||||
title: {
|
||||
type: 'flex',
|
||||
justify: 'flex-start',
|
||||
items: [
|
||||
{
|
||||
type: 'avatar',
|
||||
className: 'mr-2 bg-transparent',
|
||||
src: '/logo.svg',
|
||||
shape: 'square',
|
||||
fit: 'contain',
|
||||
},
|
||||
{
|
||||
type: 'flex',
|
||||
className: 'w-50',
|
||||
direction: 'column',
|
||||
items: [
|
||||
{
|
||||
type: 'tpl',
|
||||
className: 'font-bold text-white',
|
||||
tpl: information.title,
|
||||
},
|
||||
{
|
||||
type: 'tpl',
|
||||
className: 'font-bold text-xs text-gray-200',
|
||||
tpl: '提供合法合规的数据要素可信供给工具',
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// subTitle: '提供合法合规的数据要素可信供给工具',
|
||||
headerClassName: 'bg-gray-800 text-white',
|
||||
toolbarClassName: 'bg-gray-800',
|
||||
toolbar: [
|
||||
{
|
||||
type: 'action',
|
||||
label: '数据市场',
|
||||
icon: 'fa fa-store',
|
||||
level: 'link',
|
||||
className: "text-bold ${IF(activePage === 'market', 'text-primary', 'text-white')}",
|
||||
onEvent: {
|
||||
click: {
|
||||
actions: [
|
||||
{
|
||||
actionType: 'setValue',
|
||||
componentId: 'root-page',
|
||||
args: {
|
||||
value: {
|
||||
activePage: 'market',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '我的资源',
|
||||
icon: 'fa fa-database',
|
||||
level: 'link',
|
||||
className: "text-bold ${IF(activePage === 'tab', 'text-primary', 'text-white')}",
|
||||
onEvent: {
|
||||
click: {
|
||||
actions: [
|
||||
{
|
||||
actionType: 'setValue',
|
||||
componentId: 'root-page',
|
||||
args: {
|
||||
value: {
|
||||
activePage: 'tab',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'divider',
|
||||
direction: 'vertical',
|
||||
color: '#4d4d4d',
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
label: '${username}',
|
||||
align: 'right',
|
||||
trigger: 'hover',
|
||||
btnClassName: 'text-white',
|
||||
level: 'link',
|
||||
buttons: [
|
||||
{
|
||||
label: '修改密码',
|
||||
@@ -49,26 +132,69 @@ useAmis(information => {
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/user/logout'),
|
||||
reload: 'header-service',
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
bodyClassName: 'p-0',
|
||||
body: {
|
||||
className: 'h-full border-0',
|
||||
type: 'tabs',
|
||||
tabsMode: 'vertical',
|
||||
tabs: [
|
||||
// tabOverview(),
|
||||
tabMarket(),
|
||||
tabData(),
|
||||
tabPermissions(),
|
||||
tabCheck(),
|
||||
tabUser(),
|
||||
tabSettings(),
|
||||
]
|
||||
data: {
|
||||
activePage: 'tab',
|
||||
tabActiveKey: 'data'
|
||||
},
|
||||
}
|
||||
]
|
||||
body: [
|
||||
{
|
||||
visibleOn: "${activePage === 'market'}",
|
||||
type: 'wrapper',
|
||||
body: tabMarket(),
|
||||
},
|
||||
{
|
||||
visibleOn: "${activePage === 'tab'}",
|
||||
className: 'h-full border-0',
|
||||
type: 'tabs',
|
||||
tabsMode: 'vertical',
|
||||
activeKey: '${tabActiveKey}',
|
||||
tabs: [
|
||||
// tabOverview(),
|
||||
{
|
||||
hash: 'data',
|
||||
visibleOn: userOnly,
|
||||
title: '数据资源',
|
||||
icon: 'fa fa-database',
|
||||
reload: true,
|
||||
body: tabData()
|
||||
},
|
||||
{
|
||||
hash: 'permission',
|
||||
visibleOn: userOnly,
|
||||
title: '权属管理',
|
||||
icon: 'fa fa-key',
|
||||
reload: true,
|
||||
body: tabPermissions(),
|
||||
},
|
||||
{
|
||||
hash: 'check',
|
||||
visibleOn: checkerOnly,
|
||||
title: '审核审查',
|
||||
icon: 'fa fa-shield-halved',
|
||||
reload: true,
|
||||
body: tabCheck(),
|
||||
},
|
||||
{
|
||||
hash: 'user',
|
||||
visibleOn: administratorOnly,
|
||||
title: '用户管理',
|
||||
icon: 'fa fa-user',
|
||||
reload: true,
|
||||
body: tabUser(),
|
||||
},
|
||||
{
|
||||
hash: 'settings',
|
||||
...tabSettings(),
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {
|
||||
apiGet,
|
||||
checkerOnly,
|
||||
checkOverMapping,
|
||||
checkTypeMapping,
|
||||
crudCommonOptions,
|
||||
@@ -13,134 +12,128 @@ import {authenticationDetailDialog, confirmationDetailDialog} from "../../compon
|
||||
import {wareDetailDialog} from "../../components/ware/dialog-ware.js";
|
||||
|
||||
export function tabCheck() {
|
||||
return {
|
||||
visibleOn: checkerOnly,
|
||||
title: '审核审查',
|
||||
icon: 'fa fa-shield-halved',
|
||||
reload: true,
|
||||
body: [
|
||||
{
|
||||
name: 'check_order_list',
|
||||
type: 'crud',
|
||||
api: apiGet('${base}/check_order/list'),
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
],
|
||||
columns: [
|
||||
stringField('description', '描述'),
|
||||
mappingField('type', '类型', checkTypeMapping),
|
||||
mappingField('state', '状态', checkOverMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
stringField('createdUsername', '创建人', 100),
|
||||
timeField('modifiedTime', '最后修改时间'),
|
||||
stringField('modifiedUsername', '最后操作人', 100),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
visibleOn: `\${type === 'CONFIRMATION' && state === 'CHECKING'}`,
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
...confirmationDetailDialog(
|
||||
'parameters.confirmationId',
|
||||
[
|
||||
{
|
||||
type: 'action',
|
||||
label: '同意',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '拒绝',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
{
|
||||
visibleOn: `\${type === 'CONFIRMATION' && state !== NORMAL}`,
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...confirmationDetailDialog('parameters.confirmationId'),
|
||||
},
|
||||
{
|
||||
visibleOn: `\${type === 'AUTHENTICATION' && state === 'CHECKING'}`,
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
...authenticationDetailDialog(
|
||||
'parameters.authenticationId',
|
||||
[
|
||||
{
|
||||
type: 'action',
|
||||
label: '同意',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '拒绝',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
{
|
||||
visibleOn: `\${type === 'AUTHENTICATION' && state !== NORMAL}`,
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...authenticationDetailDialog('parameters.authenticationId'),
|
||||
},
|
||||
{
|
||||
visibleOn: `\${type === 'MARKET' && state === 'CHECKING'}`,
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
...wareDetailDialog(
|
||||
'parameters.wareId',
|
||||
[
|
||||
{
|
||||
type: 'action',
|
||||
label: '同意',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '拒绝',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
{
|
||||
visibleOn: `\${type === 'MARKET' && state !== NORMAL}`,
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...wareDetailDialog('parameters.wareId'),
|
||||
},
|
||||
]),
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
return [
|
||||
{
|
||||
name: 'check_order_list',
|
||||
type: 'crud',
|
||||
api: apiGet('${base}/check_order/list'),
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
],
|
||||
columns: [
|
||||
stringField('description', '描述'),
|
||||
mappingField('type', '类型', checkTypeMapping),
|
||||
mappingField('state', '状态', checkOverMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
stringField('createdUsername', '创建人', 100),
|
||||
timeField('modifiedTime', '最后修改时间'),
|
||||
stringField('modifiedUsername', '最后操作人', 100),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
visibleOn: "${type === 'CONFIRMATION' && state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
...confirmationDetailDialog(
|
||||
'parameters.confirmationId',
|
||||
[
|
||||
{
|
||||
type: 'action',
|
||||
label: '同意',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '拒绝',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
{
|
||||
visibleOn: "${type === 'CONFIRMATION' && state !== NORMAL}",
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...confirmationDetailDialog('parameters.confirmationId'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${type === 'AUTHENTICATION' && state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
...authenticationDetailDialog(
|
||||
'parameters.authenticationId',
|
||||
[
|
||||
{
|
||||
type: 'action',
|
||||
label: '同意',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '拒绝',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
{
|
||||
visibleOn: "${type === 'AUTHENTICATION' && state !== NORMAL}",
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...authenticationDetailDialog('parameters.authenticationId'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${type === 'MARKET' && state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
...wareDetailDialog(
|
||||
'parameters.wareId',
|
||||
[
|
||||
{
|
||||
type: 'action',
|
||||
label: '同意',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '拒绝',
|
||||
actionType: 'ajax',
|
||||
close: true,
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
||||
reload: 'check_order_list',
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
{
|
||||
visibleOn: "${type === 'MARKET' && state !== NORMAL}",
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...wareDetailDialog('parameters.wareId'),
|
||||
},
|
||||
]),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import {
|
||||
mappingField,
|
||||
operationField,
|
||||
permissionStateMapping,
|
||||
timeField,
|
||||
userOnly
|
||||
timeField
|
||||
} from "../../components/constants.js";
|
||||
import {wareAddDialog, wareDetailDialog, wareEditeDialog} from "../../components/ware/dialog-ware.js";
|
||||
|
||||
@@ -86,101 +85,97 @@ export function resourceList(showMode = false) {
|
||||
|
||||
export function tabData() {
|
||||
return {
|
||||
visibleOn: userOnly,
|
||||
title: '数据资源',
|
||||
icon: 'fa fa-database',
|
||||
reload: true,
|
||||
body: {
|
||||
type: 'tabs',
|
||||
tabs: [
|
||||
{
|
||||
title: '资源定义',
|
||||
tab: resourceList()
|
||||
},
|
||||
{
|
||||
title: '资源上架',
|
||||
tab: {
|
||||
type: 'crud',
|
||||
api: apiGet('${base}/ware/list'),
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
type: 'tabs',
|
||||
tabs: [
|
||||
{
|
||||
title: '资源定义',
|
||||
tab: resourceList()
|
||||
},
|
||||
{
|
||||
title: '资源上架',
|
||||
tab: {
|
||||
type: 'crud',
|
||||
api: apiGet('${base}/ware/list'),
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...wareAddDialog()
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
name: 'name',
|
||||
label: '名称',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
label: '描述',
|
||||
type: 'tpl',
|
||||
tpl: '${TRUNCATE(description, 100)}',
|
||||
},
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...wareAddDialog()
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
name: 'name',
|
||||
label: '名称',
|
||||
width: 200,
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...wareDetailDialog(),
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
label: '描述',
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '撤销',
|
||||
level: 'link',
|
||||
confirmTitle: '确认撤销',
|
||||
confirmText: '确认撤销名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/ware/retract/${id}'),
|
||||
},
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...wareDetailDialog(),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '撤销',
|
||||
level: 'link',
|
||||
confirmTitle: '确认撤销',
|
||||
confirmText: '确认撤销名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/ware/retract/${id}'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'DRAFT' || state === 'REJECT'}",
|
||||
type: 'action',
|
||||
label: '提交',
|
||||
level: 'link',
|
||||
confirmTitle: '确认提交',
|
||||
confirmText: '确认提交名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/ware/submit/${id}'),
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
level: 'link',
|
||||
icon: 'fa fa-ellipsis-h',
|
||||
hideCaret: true,
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
disabledOn: "${state !== 'DRAFT'}",
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...wareEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: "删除",
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的确权申请吗?删除后对应的数据资源处于未确权状态。',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/ware/remove/${id}'),
|
||||
},
|
||||
]
|
||||
},
|
||||
]),
|
||||
]
|
||||
}
|
||||
{
|
||||
visibleOn: "${state === 'DRAFT' || state === 'REJECT'}",
|
||||
type: 'action',
|
||||
label: '提交',
|
||||
level: 'link',
|
||||
confirmTitle: '确认提交',
|
||||
confirmText: '确认提交名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/ware/submit/${id}'),
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
level: 'link',
|
||||
icon: 'fa fa-ellipsis-h',
|
||||
hideCaret: true,
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
disabledOn: "${state !== 'DRAFT'}",
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...wareEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: "删除",
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的确权申请吗?删除后对应的数据资源处于未确权状态。',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/ware/remove/${id}'),
|
||||
},
|
||||
]
|
||||
},
|
||||
]),
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -3,88 +3,83 @@ import {authenticationAddDialog} from "../../components/permission/dialog-permis
|
||||
|
||||
export function tabMarket() {
|
||||
return {
|
||||
title: '数据市场',
|
||||
icon: 'fa fa-store',
|
||||
reload: true,
|
||||
body: {
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/ware/list_public'),
|
||||
adaptor: (payload, response, api, context) => {
|
||||
payload.data = payload.data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
targetId: i.resourceId,
|
||||
}
|
||||
})
|
||||
return payload
|
||||
}
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
],
|
||||
mode: 'cards',
|
||||
columnsCount: 3,
|
||||
card: {
|
||||
header: {
|
||||
title: '${name}',
|
||||
subTitle: '${createdTime}',
|
||||
avatar: '${icon}',
|
||||
avatarClassName: 'pull-left thumb-md avatar b-3x m-r'
|
||||
},
|
||||
body: '${TRUNCATE(description, 50)}',
|
||||
actions: [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '数据产品详情',
|
||||
size: 'md',
|
||||
actions: [],
|
||||
body: {
|
||||
type: 'service',
|
||||
api: apiGet(`\${base}/ware/detail/\${id}`),
|
||||
body: [
|
||||
{
|
||||
type: 'property',
|
||||
title: '产品信息',
|
||||
items: [
|
||||
{
|
||||
label: '名称',
|
||||
content: '${name}',
|
||||
},
|
||||
{
|
||||
label: '归属',
|
||||
content: '${createdUsername}',
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
content: '${createdTime}',
|
||||
},
|
||||
{
|
||||
span: 3,
|
||||
label: '描述',
|
||||
content: '${description}',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '${content|raw}'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '申请授权',
|
||||
...authenticationAddDialog(),
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/ware/list_public'),
|
||||
adaptor: (payload, response, api, context) => {
|
||||
payload.data = payload.data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
targetId: i.resourceId,
|
||||
}
|
||||
]
|
||||
})
|
||||
return payload
|
||||
}
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
],
|
||||
mode: 'cards',
|
||||
columnsCount: 3,
|
||||
card: {
|
||||
header: {
|
||||
title: '${name}',
|
||||
subTitle: '${createdTime}',
|
||||
avatar: '${icon}',
|
||||
avatarClassName: 'pull-left thumb-md avatar b-3x m-r'
|
||||
},
|
||||
body: '${TRUNCATE(description, 50)}',
|
||||
actions: [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '数据产品详情',
|
||||
size: 'md',
|
||||
actions: [],
|
||||
body: {
|
||||
type: 'service',
|
||||
api: apiGet(`\${base}/ware/detail/\${id}`),
|
||||
body: [
|
||||
{
|
||||
type: 'property',
|
||||
title: '产品信息',
|
||||
items: [
|
||||
{
|
||||
label: '名称',
|
||||
content: '${name}',
|
||||
},
|
||||
{
|
||||
label: '归属',
|
||||
content: '${createdUsername}',
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
content: '${createdTime}',
|
||||
},
|
||||
{
|
||||
span: 3,
|
||||
label: '描述',
|
||||
content: '${description}',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '${content|raw}'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '申请授权',
|
||||
...authenticationAddDialog(),
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
stringField,
|
||||
stringWrapField,
|
||||
timeField,
|
||||
userOnly,
|
||||
} from "../../components/constants.js";
|
||||
import {
|
||||
authenticationAddDialog,
|
||||
@@ -25,172 +24,166 @@ import {
|
||||
|
||||
export function tabPermissions() {
|
||||
return {
|
||||
visibleOn: userOnly,
|
||||
title: '权属管理',
|
||||
icon: 'fa fa-key',
|
||||
reload: true,
|
||||
body: {
|
||||
type: 'tabs',
|
||||
tabs: [
|
||||
{
|
||||
visibleOn: providerOnly,
|
||||
title: '确权管理',
|
||||
body: {
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/confirmation/list')
|
||||
type: 'tabs',
|
||||
tabs: [
|
||||
{
|
||||
visibleOn: providerOnly,
|
||||
title: '确权管理',
|
||||
body: {
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/confirmation/list')
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...confirmationAddDialog()
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
],
|
||||
columns: [
|
||||
stringField('name', '名称', 200),
|
||||
stringWrapField('description', '描述'),
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...confirmationAddDialog()
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...confirmationDetailDialog(),
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
stringField('name', '名称', 200),
|
||||
stringWrapField('description', '描述'),
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...confirmationDetailDialog(),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '撤销',
|
||||
level: 'link',
|
||||
confirmTitle: '确认撤销',
|
||||
confirmText: '确认撤销名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/confirmation/retract/${id}'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'DRAFT' || state === 'REJECT'}",
|
||||
type: 'action',
|
||||
label: '提交',
|
||||
level: 'link',
|
||||
confirmTitle: '确认提交',
|
||||
confirmText: '确认提交名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/confirmation/submit/${id}'),
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
level: 'link',
|
||||
icon: 'fa fa-ellipsis-h',
|
||||
hideCaret: true,
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
disabledOn: "${state !== 'DRAFT'}",
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...confirmationEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: "删除",
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的确权申请吗?删除后对应的数据资源处于未确权状态。',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/confirmation/remove/${id}'),
|
||||
},
|
||||
]
|
||||
},
|
||||
]),
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
visibleOn: customerOnly,
|
||||
title: '授权管理',
|
||||
body: {
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/authentication/list')
|
||||
{
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: '撤销',
|
||||
level: 'link',
|
||||
confirmTitle: '确认撤销',
|
||||
confirmText: '确认撤销名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/confirmation/retract/${id}'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'DRAFT' || state === 'REJECT'}",
|
||||
type: 'action',
|
||||
label: '提交',
|
||||
level: 'link',
|
||||
confirmTitle: '确认提交',
|
||||
confirmText: '确认提交名称为「${name}」的确权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/confirmation/submit/${id}'),
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
level: 'link',
|
||||
icon: 'fa fa-ellipsis-h',
|
||||
hideCaret: true,
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
disabledOn: "${state !== 'DRAFT'}",
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...confirmationEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: "${state === 'CHECKING'}",
|
||||
type: 'action',
|
||||
label: "删除",
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的确权申请吗?删除后对应的数据资源处于未确权状态。',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/confirmation/remove/${id}'),
|
||||
},
|
||||
]
|
||||
},
|
||||
]),
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
visibleOn: customerOnly,
|
||||
title: '授权管理',
|
||||
body: {
|
||||
type: 'crud',
|
||||
api: {
|
||||
...apiGet('${base}/authentication/list')
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...authenticationAddDialog()
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
],
|
||||
columns: [
|
||||
stringField('name', '名称', 200),
|
||||
stringWrapField('description', '描述'),
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
...authenticationAddDialog()
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...authenticationDetailDialog(),
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
stringField('name', '名称', 200),
|
||||
stringWrapField('description', '描述'),
|
||||
mappingField('state', '状态', permissionStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
label: '查看',
|
||||
level: 'link',
|
||||
...authenticationDetailDialog(),
|
||||
},
|
||||
{
|
||||
visibleOn: arrayInCheck([checkState.ownerChecking, checkState.checking], 'state'),
|
||||
type: 'action',
|
||||
label: '撤销',
|
||||
level: 'link',
|
||||
confirmTitle: '确认撤销',
|
||||
confirmText: '确认撤销名称为「${name}」的授权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/retract/${id}'),
|
||||
},
|
||||
{
|
||||
visibleOn: arrayInCheck([checkState.draft], 'state'),
|
||||
type: 'action',
|
||||
label: '提交',
|
||||
level: 'link',
|
||||
confirmTitle: '确认提交',
|
||||
confirmText: '确认提交名称为「${name}」的授权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/submit/${id}'),
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
level: 'link',
|
||||
icon: 'fa fa-ellipsis-h',
|
||||
hideCaret: true,
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
disabledOn: arrayOutCheck([checkState.draft], 'state'),
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...authenticationEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: arrayInCheck([checkState.ownerChecking, checkState.checking], 'state'),
|
||||
type: 'action',
|
||||
label: "删除",
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的确权申请吗?删除后对应的数据资源处于未确权状态。',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/remove/${id}'),
|
||||
},
|
||||
]
|
||||
},
|
||||
]),
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
{
|
||||
visibleOn: arrayInCheck([checkState.ownerChecking, checkState.checking], 'state'),
|
||||
type: 'action',
|
||||
label: '撤销',
|
||||
level: 'link',
|
||||
confirmTitle: '确认撤销',
|
||||
confirmText: '确认撤销名称为「${name}」的授权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/retract/${id}'),
|
||||
},
|
||||
{
|
||||
visibleOn: arrayInCheck([checkState.draft], 'state'),
|
||||
type: 'action',
|
||||
label: '提交',
|
||||
level: 'link',
|
||||
confirmTitle: '确认提交',
|
||||
confirmText: '确认提交名称为「${name}」的授权申请吗?',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/submit/${id}'),
|
||||
},
|
||||
{
|
||||
type: 'dropdown-button',
|
||||
level: 'link',
|
||||
icon: 'fa fa-ellipsis-h',
|
||||
hideCaret: true,
|
||||
trigger: 'hover',
|
||||
buttons: [
|
||||
{
|
||||
disabledOn: arrayOutCheck([checkState.draft], 'state'),
|
||||
type: 'action',
|
||||
label: '编辑',
|
||||
level: 'link',
|
||||
...authenticationEditeDialog(),
|
||||
},
|
||||
{
|
||||
disabledOn: arrayInCheck([checkState.ownerChecking, checkState.checking], 'state'),
|
||||
type: 'action',
|
||||
label: "删除",
|
||||
confirmTitle: '确认删除',
|
||||
confirmText: '确认删除名称为「${name}」的确权申请吗?删除后对应的数据资源处于未确权状态。',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/authentication/remove/${id}'),
|
||||
},
|
||||
]
|
||||
},
|
||||
]),
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
administratorOnly,
|
||||
apiGet,
|
||||
copyField,
|
||||
crudCommonOptions,
|
||||
@@ -13,71 +12,65 @@ import {userCheckDialog, userDetailDialog} from "../../components/user/dialog-us
|
||||
import {userAdministratorRegisterDialog} from "../../components/user/dialog-user-register.js";
|
||||
|
||||
export function tabUser() {
|
||||
return {
|
||||
visibleOn: administratorOnly,
|
||||
title: '用户管理',
|
||||
icon: 'fa fa-user',
|
||||
reload: true,
|
||||
body: [
|
||||
{
|
||||
type: 'crud',
|
||||
api: apiGet('${base}/user_management/list'),
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
return [
|
||||
{
|
||||
type: 'crud',
|
||||
api: apiGet('${base}/user_management/list'),
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
{
|
||||
type: 'action',
|
||||
icon: 'fa fa-plus',
|
||||
tooltip: '新增账号',
|
||||
...userAdministratorRegisterDialog(),
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
copyField(
|
||||
'username',
|
||||
'邮箱',
|
||||
undefined,
|
||||
undefined,
|
||||
userDetailDialog(),
|
||||
),
|
||||
mappingField('role', '角色', userRoleMapping, 120),
|
||||
mappingField('state', '账号状态', userStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
timeField('lastLoginTime', '上次登陆时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
type: 'action',
|
||||
icon: 'fa fa-plus',
|
||||
tooltip: '新增账号',
|
||||
...userAdministratorRegisterDialog(),
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
label: '审核',
|
||||
icon: 'fa fa-fingerprint',
|
||||
level: 'primary',
|
||||
size: 'xs',
|
||||
...userCheckDialog(),
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
copyField(
|
||||
'username',
|
||||
'邮箱',
|
||||
undefined,
|
||||
undefined,
|
||||
userDetailDialog(),
|
||||
),
|
||||
mappingField('role', '角色', userRoleMapping, 120),
|
||||
mappingField('state', '账号状态', userStateMapping),
|
||||
timeField('createdTime', '创建时间'),
|
||||
timeField('lastLoginTime', '上次登陆时间'),
|
||||
operationField('操作', undefined, [
|
||||
{
|
||||
visibleOn: "${state === 'CHECKING'}",
|
||||
label: '审核',
|
||||
icon: 'fa fa-fingerprint',
|
||||
level: 'primary',
|
||||
size: 'xs',
|
||||
...userCheckDialog(),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'NORMAL' && role !== 'ADMINISTRATOR'}",
|
||||
label: '禁用',
|
||||
icon: 'fa fa-ban',
|
||||
level: 'danger',
|
||||
size: 'xs',
|
||||
confirmText: '确认禁用账号${username}?',
|
||||
confirmTitle: '禁用账号',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/user_management/disable/${username}'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'DISABLED' && role !== 'ADMINISTRATOR'}",
|
||||
label: '启用',
|
||||
icon: 'fa fa-check',
|
||||
level: 'success',
|
||||
size: 'xs',
|
||||
confirmText: '确认启用账号${username}?',
|
||||
confirmTitle: '启用账号',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/user_management/enable/${username}'),
|
||||
}
|
||||
]),
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
visibleOn: "${state === 'NORMAL' && role !== 'ADMINISTRATOR'}",
|
||||
label: '禁用',
|
||||
icon: 'fa fa-ban',
|
||||
level: 'danger',
|
||||
size: 'xs',
|
||||
confirmText: '确认禁用账号${username}?',
|
||||
confirmTitle: '禁用账号',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/user_management/disable/${username}'),
|
||||
},
|
||||
{
|
||||
visibleOn: "${state === 'DISABLED' && role !== 'ADMINISTRATOR'}",
|
||||
label: '启用',
|
||||
icon: 'fa fa-check',
|
||||
level: 'success',
|
||||
size: 'xs',
|
||||
confirmText: '确认启用账号${username}?',
|
||||
confirmTitle: '启用账号',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/user_management/enable/${username}'),
|
||||
}
|
||||
]),
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,74 +4,103 @@ import {userRegisterDialog} from '../../components/user/dialog-user-register.js'
|
||||
useAmis(information => {
|
||||
return {
|
||||
type: 'page',
|
||||
title: information.title,
|
||||
subTitle: '统一登陆入口',
|
||||
className: 'h-screen bg-gray-900',
|
||||
bodyClassName: 'h-full flex items-start mt-20',
|
||||
body: [
|
||||
{
|
||||
type: 'grid',
|
||||
columns: [
|
||||
type: 'wrapper',
|
||||
className: 'relative w-full max-w-md mx-auto',
|
||||
body: [
|
||||
{
|
||||
xs: 0,
|
||||
sm: 0,
|
||||
md: 4,
|
||||
body: [],
|
||||
type: 'flex',
|
||||
justify: 'center',
|
||||
className: 'mb-8',
|
||||
items: [
|
||||
{
|
||||
type: 'avatar',
|
||||
src: '/logo.svg',
|
||||
shape: 'square',
|
||||
size: 64,
|
||||
fit: 'contain',
|
||||
className: 'mr-4 bg-transparent'
|
||||
},
|
||||
{
|
||||
type: 'flex',
|
||||
direction: 'column',
|
||||
justify: 'center',
|
||||
items: [
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: information.title,
|
||||
className: 'text-2xl font-bold text-white'
|
||||
},
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '统一登录入口',
|
||||
className: 'text-lg ml-1 mt-1 text-gray-100'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
xs: 12,
|
||||
sm: 12,
|
||||
md: 4,
|
||||
type: 'form',
|
||||
className: 'bg-white rounded-xl p-10 shadow-2xl',
|
||||
api: '${base}/user/login',
|
||||
redirect: '/pages/index/index.html?token=${token}',
|
||||
mode: 'normal',
|
||||
wrapWithPanel: false,
|
||||
body: [
|
||||
{
|
||||
type: 'form',
|
||||
title: '用户登陆',
|
||||
api: '${base}/user/login',
|
||||
redirect: '/pages/index/index.html?token=${token}',
|
||||
mode: 'horizontal',
|
||||
horizontal: {
|
||||
left: 2,
|
||||
},
|
||||
actions: [
|
||||
type: 'input-email',
|
||||
name: 'username',
|
||||
label: false,
|
||||
placeholder: '请输入邮箱',
|
||||
required: true,
|
||||
clearable: true,
|
||||
className: 'mb-4',
|
||||
inputClassName: 'rounded-lg',
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
name: 'password',
|
||||
label: false,
|
||||
placeholder: '请输入密码',
|
||||
required: true,
|
||||
className: 'mb-4',
|
||||
inputClassName: 'rounded-lg',
|
||||
},
|
||||
{
|
||||
type: 'flex',
|
||||
justify: 'space-between',
|
||||
className: 'mb-4',
|
||||
items: [
|
||||
{
|
||||
type: 'action',
|
||||
label: '注册',
|
||||
type: 'button',
|
||||
label: '注册账号',
|
||||
className: 'text-blue-600 hover:text-blue-700',
|
||||
level: 'link',
|
||||
...userRegisterDialog(),
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
actionType: 'submit',
|
||||
label: '登陆',
|
||||
level: 'primary',
|
||||
},
|
||||
],
|
||||
body: [
|
||||
{
|
||||
type: 'input-email',
|
||||
name: 'username',
|
||||
label: '邮箱',
|
||||
placeholder: '请输入邮箱',
|
||||
required: true,
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
name: 'password',
|
||||
label: '密码',
|
||||
placeholder: '请再次输入密码',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
type: 'button',
|
||||
label: '忘记密码?',
|
||||
level: 'link',
|
||||
className: 'text-gray-600 hover:text-gray-700'
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
xs: 0,
|
||||
sm: 0,
|
||||
md: 4,
|
||||
body: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
{
|
||||
type: 'submit',
|
||||
label: '登录',
|
||||
level: 'primary',
|
||||
className: 'w-full rounded-lg',
|
||||
size: 'lg'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
8
gringotts-frontend/public/logo.svg
Normal file
8
gringotts-frontend/public/logo.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1589 1540" width="1589" height="1540">
|
||||
<title>China_Telecom_Logo-svg</title>
|
||||
<style>
|
||||
.s0 { fill: #FFFFFF }
|
||||
</style>
|
||||
<path id="path8564" class="s0"
|
||||
d="m1004.4 258.8c0 0-27.8-30.7-64.4-30.7 0 0-80.2 0-134.7 173.4 0 0-46.5 151.5-46.5 376.4 0 0 0 212 43.6 361.6 0 0 43.5 151.6 106.9 151.6 0 0 44.6 0 82.2-83.2 0 0 37.6-83.2 53.5-219l118.8-29.7c0 0-30.7 252.7-125.8 416.1 0 0-98 164.5-221.8 164.5 0 0-148.5 0-253.4-222.9 0 0-105-222.9-105-539 0 0 0-316 105-540.9 0 0 104.9-223.9 253.4-223.9 0 0 148.6 0 254.5 227.9zm417.8 304.1c0 0-204.9 169.4-531.7 251.6 0 0-327.7 81.3-588.1 27.8 0 0-260.4-55.5-299-215 0 0-32.7-132.8 110.9-279.4 0 0 141.6-145.6 396-242.7l16.9 65.4c0 0-148.5 63.4-230.7 143.6 0 0-84.2 84.2-65.4 156.6 0 0 24.8 92.1 199 119.8 0 0 173.3 26.8 398.1-28.7 0 0 222.7-55.5 365.3-161.5 0 0 140.6-107 116.8-200.1 0 0-19.8-80.2-162.3-114.9l-21.8-85.2c0 0 185.1 6.9 307.9 68.3 0 0 125.7 61.5 151.5 165.5 0 0 40.6 158.5-163.4 328.9z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -28,6 +28,16 @@
|
||||
<groupId>com.blinkfox</groupId>
|
||||
<artifactId>fenix-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara.warm</groupId>
|
||||
<artifactId>warm-flow-jpa-sb-starter</artifactId>
|
||||
<version>1.3.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara.warm</groupId>
|
||||
<artifactId>warm-flow-plugin-ui-sb-web</artifactId>
|
||||
<version>1.3.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-jpamodelgen</artifactId>
|
||||
|
||||
@@ -4,10 +4,14 @@ import com.blinkfox.fenix.EnableFenix;
|
||||
import com.eshore.gringotts.web.domain.entity.User;
|
||||
import com.eshore.gringotts.web.domain.service.UserService;
|
||||
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.warm.flow.core.service.DefService;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -21,7 +25,12 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
* @author lanyuanxiaoyao
|
||||
* @date 2024-11-14
|
||||
*/
|
||||
@Slf4j
|
||||
@SpringBootApplication(scanBasePackages = {"com.eshore.gringotts"})
|
||||
@EntityScan({
|
||||
"com.eshore.gringotts.web.domain.entity",
|
||||
"org.dromara.warm.flow.orm.entity"
|
||||
})
|
||||
@EnableFenix
|
||||
@EnableJpaAuditing
|
||||
@EnableAsync
|
||||
@@ -39,10 +48,15 @@ public class WebApplication implements ApplicationRunner {
|
||||
SpringApplication.run(WebApplication.class, args);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private DefService defService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
// 初始化系统管理员
|
||||
userService.initial();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -30,6 +30,8 @@ public class SaTokenConfiguration implements WebMvcConfigurer {
|
||||
.notMatch("/pages/**")
|
||||
.notMatch("/user/**")
|
||||
.notMatch("/upload/download/**")
|
||||
.notMatch("/warm-flow-ui/**")
|
||||
.notMatch("/warm-flow/**")
|
||||
.check(r -> {
|
||||
try {
|
||||
StpUtil.checkLogin();
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.eshore.gringotts.web.domain.base.controller;
|
||||
|
||||
import com.eshore.gringotts.web.configuration.amis.AmisResponse;
|
||||
import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity;
|
||||
import com.eshore.gringotts.web.domain.base.service.CheckingService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
/**
|
||||
* @author wn
|
||||
* @version 20241224
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class CheckingController<ENTITY extends CheckingNeededEntity, SAVE_ITEM, LIST_ITEM, DETAIL_ITEM> extends SimpleControllerSupport<ENTITY, SAVE_ITEM, LIST_ITEM, DETAIL_ITEM> {
|
||||
private final CheckingService<ENTITY> checkingService;
|
||||
|
||||
public CheckingController(CheckingService<ENTITY> service) {
|
||||
super(service);
|
||||
this.checkingService = service;
|
||||
}
|
||||
|
||||
@GetMapping("/submit/{id}")
|
||||
public AmisResponse<Object> submit(@PathVariable Long id) throws Exception {
|
||||
checkingService.submit(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
|
||||
@GetMapping("/retract/{id}")
|
||||
public AmisResponse<Object> retract(@PathVariable Long id) throws Exception {
|
||||
checkingService.retract(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.eshore.gringotts.web.domain.base.service;
|
||||
|
||||
import com.eshore.gringotts.web.domain.base.entity.LogicDeleteEntity;
|
||||
import com.eshore.gringotts.web.domain.base.repository.SimpleRepository;
|
||||
import com.eshore.gringotts.web.domain.entity.CheckOrder;
|
||||
import com.eshore.gringotts.web.domain.service.UserService;
|
||||
import javax.persistence.EntityManager;
|
||||
import org.eclipse.collections.api.map.ImmutableMap;
|
||||
|
||||
/**
|
||||
@@ -9,6 +13,16 @@ import org.eclipse.collections.api.map.ImmutableMap;
|
||||
* @author lanyuanxiaoyao
|
||||
* @date 2024-11-28
|
||||
*/
|
||||
public interface CheckingService {
|
||||
void onChecked(CheckOrder order, CheckOrder.Operation operation, ImmutableMap<String, Object> parameters);
|
||||
public abstract class CheckingService<ENTITY extends LogicDeleteEntity> extends LogicDeleteService<ENTITY> {
|
||||
public CheckingService(SimpleRepository<ENTITY, Long> repository, UserService userService, EntityManager manager) {
|
||||
super(repository, userService, manager);
|
||||
}
|
||||
|
||||
abstract public void submit(Long id) throws Exception;
|
||||
|
||||
abstract public void retract(Long id) throws Exception;
|
||||
|
||||
abstract public void onChecked(CheckOrder order, CheckOrder.Operation operation, ImmutableMap<String, Object> parameters);
|
||||
|
||||
abstract public ImmutableMap<String, Object> archive(ENTITY entity);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.eshore.gringotts.web.domain.controller;
|
||||
|
||||
import com.eshore.gringotts.web.configuration.amis.AmisResponse;
|
||||
import com.eshore.gringotts.web.domain.base.controller.SimpleControllerSupport;
|
||||
import com.eshore.gringotts.web.domain.base.controller.CheckingController;
|
||||
import com.eshore.gringotts.web.domain.base.entity.FileInfo;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleListItem;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem;
|
||||
@@ -9,7 +8,6 @@ import com.eshore.gringotts.web.domain.entity.Authentication;
|
||||
import com.eshore.gringotts.web.domain.service.AuthenticationService;
|
||||
import com.eshore.gringotts.web.domain.service.DataFileService;
|
||||
import com.eshore.gringotts.web.domain.service.DataResourceService;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -17,8 +15,6 @@ import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.collections.api.factory.Sets;
|
||||
import org.eclipse.collections.api.set.ImmutableSet;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -29,30 +25,16 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("authentication")
|
||||
public class AuthenticationController extends SimpleControllerSupport<Authentication, AuthenticationController.SaveItem, AuthenticationController.ListItem, AuthenticationController.DetailItem> {
|
||||
private final AuthenticationService authenticationService;
|
||||
public class AuthenticationController extends CheckingController<Authentication, AuthenticationController.SaveItem, AuthenticationController.ListItem, AuthenticationController.DetailItem> {
|
||||
private final DataResourceService dataResourceService;
|
||||
private final DataFileService dataFileService;
|
||||
|
||||
public AuthenticationController(AuthenticationService service, DataResourceService dataResourceService, DataFileService dataFileService) {
|
||||
super(service);
|
||||
this.authenticationService = service;
|
||||
this.dataResourceService = dataResourceService;
|
||||
this.dataFileService = dataFileService;
|
||||
}
|
||||
|
||||
@GetMapping("/submit/{id}")
|
||||
public AmisResponse<Object> submit(@PathVariable Long id) throws JsonProcessingException {
|
||||
authenticationService.submit(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
|
||||
@GetMapping("/retract/{id}")
|
||||
public AmisResponse<Object> retract(@PathVariable Long id) {
|
||||
authenticationService.retract(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Authentication fromSaveItem(SaveItem item) throws Exception {
|
||||
Authentication authentication = new Authentication();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.eshore.gringotts.web.domain.controller;
|
||||
|
||||
import com.eshore.gringotts.web.configuration.amis.AmisResponse;
|
||||
import com.eshore.gringotts.web.domain.base.controller.SimpleControllerSupport;
|
||||
import com.eshore.gringotts.web.domain.base.controller.CheckingController;
|
||||
import com.eshore.gringotts.web.domain.base.entity.FileInfo;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleListItem;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem;
|
||||
@@ -9,15 +8,12 @@ import com.eshore.gringotts.web.domain.entity.Confirmation;
|
||||
import com.eshore.gringotts.web.domain.service.ConfirmationService;
|
||||
import com.eshore.gringotts.web.domain.service.DataFileService;
|
||||
import com.eshore.gringotts.web.domain.service.DataResourceService;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.collections.api.factory.Sets;
|
||||
import org.eclipse.collections.api.set.ImmutableSet;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -28,30 +24,16 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("confirmation")
|
||||
public class ConfirmationController extends SimpleControllerSupport<Confirmation, ConfirmationController.SaveItem, ConfirmationController.ListItem, ConfirmationController.DetailItem> {
|
||||
private final ConfirmationService confirmationService;
|
||||
public class ConfirmationController extends CheckingController<Confirmation, ConfirmationController.SaveItem, ConfirmationController.ListItem, ConfirmationController.DetailItem> {
|
||||
private final DataResourceService dataResourceService;
|
||||
private final DataFileService dataFileService;
|
||||
|
||||
public ConfirmationController(ConfirmationService service, ConfirmationService confirmationService, DataResourceService dataResourceService, DataFileService dataFileService) {
|
||||
public ConfirmationController(ConfirmationService service, DataResourceService dataResourceService, DataFileService dataFileService) {
|
||||
super(service);
|
||||
this.confirmationService = confirmationService;
|
||||
this.dataResourceService = dataResourceService;
|
||||
this.dataFileService = dataFileService;
|
||||
}
|
||||
|
||||
@GetMapping("/submit/{id}")
|
||||
public AmisResponse<Object> submit(@PathVariable Long id) throws JsonProcessingException {
|
||||
confirmationService.submit(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
|
||||
@GetMapping("/retract/{id}")
|
||||
public AmisResponse<Object> retract(@PathVariable Long id) {
|
||||
confirmationService.retract(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Confirmation fromSaveItem(SaveItem item) throws Exception {
|
||||
Confirmation confirmation = new Confirmation();
|
||||
|
||||
@@ -3,21 +3,19 @@ package com.eshore.gringotts.web.domain.controller;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.eshore.gringotts.web.configuration.HostConfiguration;
|
||||
import com.eshore.gringotts.web.configuration.amis.AmisResponse;
|
||||
import com.eshore.gringotts.web.domain.base.controller.SimpleControllerSupport;
|
||||
import com.eshore.gringotts.web.domain.base.controller.CheckingController;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleListItem;
|
||||
import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem;
|
||||
import com.eshore.gringotts.web.domain.entity.Ware;
|
||||
import com.eshore.gringotts.web.domain.service.DataFileService;
|
||||
import com.eshore.gringotts.web.domain.service.DataResourceService;
|
||||
import com.eshore.gringotts.web.domain.service.WareService;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.collections.api.list.ImmutableList;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -28,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("ware")
|
||||
public class WareController extends SimpleControllerSupport<Ware, WareController.SaveItem, WareController.ListItem, WareController.DetailItem> {
|
||||
public class WareController extends CheckingController<Ware, WareController.SaveItem, WareController.ListItem, WareController.DetailItem> {
|
||||
private final HostConfiguration hostConfiguration;
|
||||
private final WareService wareService;
|
||||
private final DataResourceService dataResourceService;
|
||||
@@ -47,18 +45,6 @@ public class WareController extends SimpleControllerSupport<Ware, WareController
|
||||
return AmisResponse.responseSuccess(wareService.listPublic().collect(this::toListItem));
|
||||
}
|
||||
|
||||
@GetMapping("/submit/{id}")
|
||||
public AmisResponse<Object> submit(@PathVariable Long id) throws JsonProcessingException {
|
||||
wareService.submit(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
|
||||
@GetMapping("/retract/{id}")
|
||||
public AmisResponse<Object> retract(@PathVariable Long id) {
|
||||
wareService.retract(id);
|
||||
return AmisResponse.responseSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Ware fromSaveItem(SaveItem saveItem) {
|
||||
Ware ware = new Ware();
|
||||
|
||||
@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity;
|
||||
import com.eshore.gringotts.web.domain.base.service.CheckingService;
|
||||
import com.eshore.gringotts.web.domain.base.service.LogicDeleteService;
|
||||
import com.eshore.gringotts.web.domain.entity.Authentication;
|
||||
import com.eshore.gringotts.web.domain.entity.Authentication_;
|
||||
import com.eshore.gringotts.web.domain.entity.CheckOrder;
|
||||
@@ -33,7 +32,7 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service("com.eshore.gringotts.web.domain.service.AuthenticationService")
|
||||
public class AuthenticationService extends LogicDeleteService<Authentication> implements CheckingService {
|
||||
public class AuthenticationService extends CheckingService<Authentication> {
|
||||
private final AuthenticationRepository authenticationRepository;
|
||||
private final UserService userService;
|
||||
private final CheckOrderService checkOrderService;
|
||||
@@ -84,6 +83,7 @@ public class AuthenticationService extends LogicDeleteService<Authentication> im
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = Throwable.class)
|
||||
@Override
|
||||
public void submit(Long id) throws JsonProcessingException {
|
||||
Authentication authentication = detailOrThrow(id);
|
||||
authentication.setState(CheckingNeededEntity.State.OWNER_CHECKING);
|
||||
@@ -101,6 +101,7 @@ public class AuthenticationService extends LogicDeleteService<Authentication> im
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = Throwable.class)
|
||||
@Override
|
||||
public void retract(Long id) {
|
||||
Authentication authentication = detailOrThrow(id);
|
||||
authentication.setState(Authentication.State.DRAFT);
|
||||
@@ -145,6 +146,11 @@ public class AuthenticationService extends LogicDeleteService<Authentication> im
|
||||
checkOrderService.save(order);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableMap<String, Object> archive(Authentication authentication) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final class AuthenticationDuplicatedException extends RuntimeException {
|
||||
public AuthenticationDuplicatedException() {
|
||||
super("数据资源已绑定该账号的授权申请,无法再次申请");
|
||||
|
||||
@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity;
|
||||
import com.eshore.gringotts.web.domain.base.service.CheckingService;
|
||||
import com.eshore.gringotts.web.domain.base.service.LogicDeleteService;
|
||||
import com.eshore.gringotts.web.domain.entity.CheckOrder;
|
||||
import com.eshore.gringotts.web.domain.entity.CheckOrder_;
|
||||
import com.eshore.gringotts.web.domain.entity.Confirmation;
|
||||
@@ -35,7 +34,7 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service("com.eshore.gringotts.web.domain.service.ConfirmationService")
|
||||
public class ConfirmationService extends LogicDeleteService<Confirmation> implements CheckingService {
|
||||
public class ConfirmationService extends CheckingService<Confirmation> {
|
||||
private final ConfirmationRepository confirmationRepository;
|
||||
private final CheckOrderService checkOrderService;
|
||||
private final ObjectMapper mapper;
|
||||
@@ -81,6 +80,7 @@ public class ConfirmationService extends LogicDeleteService<Confirmation> implem
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = Throwable.class)
|
||||
@Override
|
||||
public void submit(Long id) throws JsonProcessingException {
|
||||
Confirmation confirmation = detailOrThrow(id);
|
||||
confirmation.setState(Confirmation.State.CHECKING);
|
||||
@@ -98,6 +98,7 @@ public class ConfirmationService extends LogicDeleteService<Confirmation> implem
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = Throwable.class)
|
||||
@Override
|
||||
public void retract(Long id) {
|
||||
Confirmation confirmation = detailOrThrow(id);
|
||||
confirmation.setState(CheckingNeededEntity.State.DRAFT);
|
||||
@@ -129,6 +130,11 @@ public class ConfirmationService extends LogicDeleteService<Confirmation> implem
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableMap<String, Object> archive(Confirmation confirmation) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final class ConfirmationDuplicatedException extends RuntimeException {
|
||||
public ConfirmationDuplicatedException() {
|
||||
super("数据资源已绑定确权申请,无法再次申请");
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.eshore.gringotts.web.domain.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.eshore.gringotts.web.domain.base.service.CheckingService;
|
||||
import com.eshore.gringotts.web.domain.base.service.LogicDeleteService;
|
||||
import com.eshore.gringotts.web.domain.entity.CheckOrder;
|
||||
import com.eshore.gringotts.web.domain.entity.User;
|
||||
import com.eshore.gringotts.web.domain.entity.Ware;
|
||||
@@ -25,7 +24,7 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service("com.eshore.gringotts.web.domain.service.WareService")
|
||||
public class WareService extends LogicDeleteService<Ware> implements CheckingService {
|
||||
public class WareService extends CheckingService<Ware> {
|
||||
private final WareRepository wareRepository;
|
||||
private final CheckOrderService checkOrderService;
|
||||
private final ObjectMapper mapper;
|
||||
@@ -64,7 +63,13 @@ public class WareService extends LogicDeleteService<Ware> implements CheckingSer
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableMap<String, Object> archive(Ware ware) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = Throwable.class)
|
||||
@Override
|
||||
public void submit(Long id) throws JsonProcessingException {
|
||||
Ware ware = detailOrThrow(id);
|
||||
ware.setState(Ware.State.CHECKING);
|
||||
@@ -82,6 +87,7 @@ public class WareService extends LogicDeleteService<Ware> implements CheckingSer
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = Throwable.class)
|
||||
@Override
|
||||
public void retract(Long id) {
|
||||
Ware ware = detailOrThrow(id);
|
||||
ware.setState(Ware.State.DRAFT);
|
||||
|
||||
@@ -34,6 +34,8 @@ logging:
|
||||
sdk:
|
||||
eventsub:
|
||||
EventSubscribeImp: error
|
||||
warm-flow:
|
||||
jpa_persistence_provider: org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider
|
||||
|
||||
---
|
||||
spring:
|
||||
|
||||
Reference in New Issue
Block a user