修改流量控制及安全部分

This commit is contained in:
xu_lw
2019-09-03 00:16:23 +08:00
parent dcf32c3dc4
commit 2f293449fd
41 changed files with 804 additions and 472 deletions
@@ -23,26 +23,26 @@
</el-menu-item>
<el-menu-item index="3">
<i class="el-icon-setting"></i>
<span slot="title">安全策略管理</span>
<span slot="title">安全控制</span>
</el-menu-item>
<el-menu-item index="4">
<i class="el-icon-setting"></i>
<span slot="title">全局白名单管理</span>
<span slot="title">流量控制</span>
</el-menu-item>
</el-menu>
</el-col>
<el-col :span="20">
<div>
<OpnInterfaceInf v-if="activeIndex=='1'" ref="opnInterfaceInf"></OpnInterfaceInf>
<div v-if="activeIndex=='1'">
<OpnInterfaceInf ref="opnInterfaceInf"></OpnInterfaceInf>
</div>
<div>
<OpnBackendServerInf v-if="activeIndex=='2'" ref="opnBackendServerInf"></OpnBackendServerInf>
<div v-if="activeIndex=='2'">
<OpnBackendServerInf ref="opnBackendServerInf"></OpnBackendServerInf>
</div>
<div>
<OpnStrategyMng v-if="activeIndex=='3'" ref="opnStrategyMng"></OpnStrategyMng>
<div v-if="activeIndex=='3'">
<OpnStrategyInf ref="opnStrategyInf"></OpnStrategyInf>
</div>
<div>
<OpnStrategyIpInf v-if="activeIndex=='4'" ref="opnStrategyIpInf"></OpnStrategyIpInf>
<div v-if="activeIndex=='4'">
<OpnStrategyFlowInf ref="opnStrategyFlowInf"></OpnStrategyFlowInf>
</div>
</el-col>
</el-row>
@@ -54,10 +54,9 @@
<script>
import { isGDASucc } from '@/utils'
import OpnInterfaceInf from './opninterfaceinf'
import OpnInterfaceGroupInf from './opninterfacegroupinf'
import OpnBackendServerInf from './opnbackendserverinf'
import OpnStrategyMng from './opnstrategy-mng'
import OpnStrategyIpInf from './opnstrategyipinf'
import OpnStrategyFlowInf from './opnstrategyflowinf'
import OpnStrategyInf from './opnstrategyinf1'
import OpnGatewayInf from './opngatewayinf'
export default {
@@ -73,10 +72,9 @@
},
components: {
OpnInterfaceInf,
OpnInterfaceGroupInf,
OpnBackendServerInf,
OpnStrategyMng,
OpnStrategyIpInf,
OpnStrategyFlowInf,
OpnStrategyInf,
OpnGatewayInf
},
activated() {
@@ -114,6 +112,8 @@
})
},
gatewaySelectChange() {
console.log('activeIndex1:' + this.activeIndex)
this.gatewayId = this.dataForm.gateway_id
this.$nextTick(() => {
if (this.activeIndex === '1') {
@@ -121,9 +121,10 @@
} else if (this.activeIndex === '2') {
this.$refs.opnBackendServerInf.refresh(this.dataForm.gateway_id)
} else if (this.activeIndex === '3') {
this.$refs.opnStrategyMng.refresh(this.dataForm.gateway_id)
this.$refs.opnStrategyInf.refresh(this.dataForm.gateway_id)
} else if (this.activeIndex === '4') {
this.$refs.opnStrategyIpInf.refresh(this.dataForm.gateway_id)
console.log('activeIndex:' + this.activeIndex)
this.$refs.opnStrategyFlowInf.refresh(this.dataForm.gateway_id)
}
})
},
@@ -54,7 +54,8 @@
<template slot-scope="scope">
<el-button v-if="true||isAuth('opn:opninterfaceinf:update')" type="text" size="small" @click="queryHandle(scope.row.id)">查看</el-button>
<el-button v-if="true||isAuth('opn:opninterfaceinf:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="true||isAuth('opn:opninterfaceinf:delete')" type="text" size="small" @click="deleteHandle(scope.row)">删除</el-button>
<!-- <el-button v-if="true||isAuth('opn:opninterfaceinf:delete')" type="text" size="small" @click="deleteHandle(scope.row)">删除</el-button> -->
<el-button v-if="true||isAuth('opn:opninterfaceinf:delete')" type="text" size="small" @click="flowCtrlHandle(scope.row)">流控</el-button>
</template>
</el-table-column>
</el-table>
@@ -71,12 +72,14 @@
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<interface-group-inf v-if="interfaceGroupInfVisible" ref="interfaceGroupInf" @refreshDataList="getGroupList"></interface-group-inf>
<OpnStrategyFlowInfAddOrUpdate v-if="opnStrategyFlowInfAddOrUpdateVisible" ref="opnStrategyFlowInfAddOrUpdate"></OpnStrategyFlowInfAddOrUpdate>
</div>
</template>
<script>
import AddOrUpdate from './opninterfaceinf-add-or-update'
import InterfaceGroupInf from './opninterfacegroupinf'
import OpnStrategyFlowInfAddOrUpdate from './opnstrategyflowinf-add-or-update2'
import { isGDASucc } from '@/utils'
@@ -96,12 +99,14 @@
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false,
interfaceGroupInfVisible: false
interfaceGroupInfVisible: false,
opnStrategyFlowInfAddOrUpdateVisible: false
}
},
components: {
AddOrUpdate,
InterfaceGroupInf
InterfaceGroupInf,
OpnStrategyFlowInfAddOrUpdate
},
activated() {
// this.getGroupList()
@@ -199,15 +204,6 @@
this.$refs.addOrUpdate.init(id)
})
},
queryHandle() {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.readonly = true
this.$refs.addOrUpdate.dataForm.gateway_id = this.dataForm.gateway_id
this.$refs.addOrUpdate.dataForm.group_id = this.dataForm.group_id
this.$refs.addOrUpdate.init(id)
})
},
interfaceGroupInfHandle() {
this.interfaceGroupInfVisible = true
this.$nextTick(() => {
@@ -224,6 +220,12 @@
this.$refs.addOrUpdate.init(id)
})
},
flowCtrlHandle(row) {
this.opnStrategyFlowInfAddOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.opnStrategyFlowInfAddOrUpdate.init(row)
})
},
// 删除
deleteHandle(row) {
var ids = row ? [row.id] : this.dataListSelections.map(item => {
@@ -127,7 +127,7 @@
dataForm: {
id: 0,
gateway_id: '',
strategy_id: '',
interface_id: '',
name: '',
type: '1',
unit_time_type: '2',
@@ -146,7 +146,7 @@
gateway_id: [
{ required: true, message: '网关标识不能为空', trigger: 'blur' }
],
strategy_id: [
interface_id: [
{ required: true, message: '策略标识不能为空', trigger: 'blur' }
],
name: [
@@ -220,7 +220,7 @@
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'gateway_id': this.dataForm.gateway_id,
'strategy_id': this.dataForm.strategy_id,
'interface_id': this.dataForm.interface_id,
'name': this.dataForm.name,
'type': this.dataForm.type,
'unit_time_type': this.dataForm.unit_time_type,
@@ -1,9 +1,9 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList01()">
<!-- <el-form-item>
<el-form-item>
<el-input v-model="dataForm.search" placeholder="搜索内容" clearable></el-input>
</el-form-item>-->
</el-form-item>
<el-form-item>
<el-button @click="getDataList01()">刷新</el-button>
<el-button v-if="isAuth('opn:opnstrategyflowinf:add')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
@@ -72,7 +72,7 @@
<el-tag v-if="scope.row.status === '0'" size="small">有效</el-tag>
<el-tag v-else size="small" type="danger">无效</el-tag>
</el-button>
<el-button v-if="isAuth('opn:opnstrategyflowinf:query')" type="text" size="small" @click="queryHandle(scope.row.id)">查看</el-button>
<!-- <el-button v-if="isAuth('opn:opnstrategyflowinf:query')" type="text" size="small" @click="queryHandle(scope.row.id)">查看</el-button> -->
<el-button v-if="isAuth('opn:opnstrategyflowinf:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('opn:opnstrategyflowinf:delete')" type="text" size="small" @click="deleteHandle(scope.row)">删除</el-button>
</template>
@@ -93,7 +93,7 @@
dataForm: {
search: '',
gateway_id: '',
strategy_id: ''
strategy_id: '999999'
},
dataList: [],
pageIndex: 1,
@@ -108,9 +108,8 @@
AddOrUpdate
},
methods: {
refresh(gatewayId, strategyId) {
refresh(gatewayId) {
this.dataForm.gateway_id = gatewayId
this.dataForm.strategy_id = strategyId
this.getDataList01()
},
// 获取数据列表
@@ -121,7 +120,7 @@
getDataList() {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/buiopnbpc1/opnstrategyflowinf/listByGatewayAndStrategy.do'),
url: this.$http.adornUrl('/buiopnbpc1/opnstrategyflowinf/listByGateway.do'),
method: 'get',
params: this.$http.adornParams({
'page_no': this.pageIndex,
@@ -184,9 +183,9 @@
})
},
//修改
// 修改
addOrUpdateByStatus(row) {
row.status = row.status === '1' ? 0 : 1;
let status = row.status === '1' ? 0 : 1
this.$confirm(`确定对[状态]进行['切换']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -197,7 +196,7 @@
method: 'post',
data: this.$http.adornData({
'id': row.id,
'status': row.status,
'status': status,
'gateway_id': row.gateway_id,
'strategy_id': row.strategy_id,
'name': row.name,
@@ -1,141 +1,214 @@
<template>
<el-dialog title="策略管理" :close-on-click-modal="false" :visible.sync="visible" @close="closeDialog">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList01()">
<el-form-item>
<el-input v-model="dataForm.search" placeholder="搜索内容" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList01()">查询</el-button>
<el-button v-if="isAuth('opn:opnstrategyinf:add')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<el-button
v-if="isAuth('opn:opnstrategyinf:delete')"
type="danger"
@click="deleteHandle()"
:disabled="dataListSelections.length <= 0"
>批量删除</el-button>
</el-form-item>
</el-form>
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="id" header-align="center" align="center" label="标识"></el-table-column>
<el-table-column prop="gateway_id" header-align="center" align="center" label="网关标识"></el-table-column>
<el-table-column prop="name" header-align="center" align="center" label="名称"></el-table-column>
<el-table-column prop="status" header-align="center" align="center" label="状态" column-key="status" :formatter="dict.formatter"></el-table-column>
<el-table-column prop="remark" header-align="center" align="center" label="备注"></el-table-column>
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
<template slot-scope="scope">
<el-button v-if="isAuth('opn:opnstrategyinf:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('opn:opnstrategyinf:delete')" type="text" size="small" @click="deleteHandle(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</el-dialog>
<div class="mod-config">
<div v-if="!settings">
<el-button type="primary" @click="settings=true">设置</el-button>
</div>
<div v-if="settings">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px">
<el-row type="flex" class="row-bg">
<el-col :span="12">
<el-form-item label="签名算法" prop="auth_type">
<el-select placeholder="请选择" v-model="dataForm.sign_alg_type" style="width:170px;">
<el-option label="不设置" value="0"></el-option>
<el-option label="国际RSA" value="1"></el-option>
<el-option label="国密SM2" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="加密算法" prop="auth_type">
<el-select placeholder="请选择" v-model="dataForm.enc_alg_type" style="width:170px;">
<el-option label="不设置" value="0"></el-option>
<el-option label="3DES" value="1"></el-option>
<el-option label="AES" value="2"></el-option>
<el-option label="国密SM3" value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" class="row-bg">
<el-col>
<el-form-item label="授权类型" prop="auth_type">
<el-select placeholder="请选择" v-model="dataForm.auth_type" style="width:170px;">
<el-option label="不设置" value="0"></el-option>
<el-option label="Token" value="1"></el-option>
<el-option label="用户密码" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dataForm.auth_type == '1'" type="flex" class="row-bg">
<el-col :span="14">
<el-form-item label="apikey" prop="api_key">
<el-input v-model="dataForm.api_key" placeholder="apikey" style="width:400px"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" size="mini" @click="genApiKey()">生成</el-button>
</el-col>
</el-row>
<el-row v-if="dataForm.auth_type == '2'" type="flex" class="row-bg">
<el-col :span="12">
<el-form-item label="用户名" prop="username">
<el-input v-model="dataForm.username" placeholder="用户名" style="width:170px"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="密码" prop="password">
<el-input v-model="dataForm.password" placeholder="密码" style="width:170px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" class="row-bg">
<el-col>
<el-form-item label="黑白名单类型" prop="type">
<el-select placeholder="请选择" v-model="dataForm.ip_type" style="width:170px;">
<el-option label="不设置" value="0"></el-option>
<el-option label="白名单" value="1"></el-option>
<el-option label="黑名单" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" class="row-bg" v-if="dataForm.ip_type == 1">
<el-col>
<el-form-item label="黑名单" prop="ip_lst">
<el-input v-model="dataForm.ip_lst" placeholder="IP地址(如192.168.0.1;192.168.0.2)" style="width:300px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" class="row-bg" v-if="dataForm.ip_type == 2">
<el-col>
<el-form-item label="白名单" prop="ip_lst">
<el-input v-model="dataForm.ip_lst" placeholder="IP地址(如192.168.0.1;192.168.0.2)" style="width:300px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" class="row-bg">
<el-col :offset="6">
<el-button type="primary" @click="dataFormSubmit()">设置</el-button>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script>
import AddOrUpdate from './opnstrategyinf-add-or-update'
import { isGDASucc } from '@/utils'
export default {
data() {
return {
visible: false,
settings: false,
dataForm: {
gateway_id: ''
enc_alg_type: '2',
sign_alg_type: '2',
gateway_id: '',
auth_type: '0',
api_key: '',
username: '',
password: '',
ip_type: '0',
ip_lst: ''
},
dataList: [],
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
dataRule: {
gateway_id: [
{ required: true, message: '网关标识不能为空', trigger: 'blur' }
],
sign_alg_type: [
{ required: true, message: '签名算法', trigger: 'blur' }
],
enc_alg_type: [
{ required: true, message: '加密算法', trigger: 'blur' }
],
auth_type: [
{ required: true, message: '授权类型', trigger: 'blur' }
],
api_key: [
{ required: true, message: '白名单不能为空', trigger: 'blur' }
],
username: [
{ required: true, message: '状态(1-有效,0-无效)不能为空', trigger: 'blur' }
],
password: [
{ required: true, message: '备注不能为空', trigger: 'blur' }
],
ip_type: [
{ required: true, message: '黑白名单类型', trigger: 'blur' }
],
ip_lst: [
{ required: true, message: 'IP列表', trigger: 'blur' }
]
}
}
},
components: {
AddOrUpdate
},
methods: {
init() {
this.visible = true
this.getDataList()
},
// 获取数据列表
getDataList01() {
this.pageIndex = 1
refresh(gatewayId) {
this.dataForm.gateway_id = gatewayId
this.getDataList()
},
getDataList() {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl(`/buiopnbpc1/opnstrategyinf/listByGateway.do`),
url: this.$http.adornUrl(`/buiopnbpc1/opnsecurityinf/query.do`),
method: 'get',
params: this.$http.adornParams({
'gateway_id': this.dataForm.gateway_id
})
}).then(({ data }) => {
if (isGDASucc(data)) {
if (data.data) {
this.dataList = data.data
} else {
this.dataList = []
}
this.dataForm = data.data
this.settings = true
} else {
this.dataList = []
this.settings = false
}
this.dataListLoading = false
})
},
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.gateway_id = this.dataForm.gateway_id
this.$refs.addOrUpdate.init(id)
})
},
// 删除
deleteHandle(row) {
var ids = row ? [row.id] : this.dataListSelections.map(item => {
return item.id
})
var ids2 = row ? [row.name] : this.dataListSelections.map(item => {
return item.name
})
this.$confirm(`确定对[${ids2.join(',')}]进行[${row ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/buiopnbpc1/opnstrategyinf/delete.do'),
method: 'post',
data: this.$http.adornData({
'ids': ids.join(',')
}, false)
}).then(({ data }) => {
if (isGDASucc(data)) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/buiopnbpc1/opnsecurityinf/update.do`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'gateway_id': this.dataForm.gateway_id,
'enc_alg_type': this.dataForm.enc_alg_type,
'sign_alg_type': this.dataForm.sign_alg_type,
'auth_type': this.dataForm.auth_type,
'api_key': this.dataForm.api_key,
'username': this.dataForm.username,
'password': this.dataForm.password,
'ip_type': this.dataForm.ip_type,
'ip_lst': this.dataForm.ip_lst
})
} else {
this.$message.error(data.msg)
}
})
}).then(({ data }) => {
if (isGDASucc(data)) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
},
closeDialog() {
this.$emit('refreshDataList')
genApiKey() {
let chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
let result = ''
for (let i = 32; i > 0; --i) {
result += chars[Math.floor(Math.random() * chars.length)]
}
this.dataForm.api_key = result
}
}
}
+35
View File
@@ -1,4 +1,39 @@
-- 开放平台SQL
DROP TABLE T_OPN_SECURITY_INF;
CREATE TABLE T_OPN_SECURITY_INF
(
GATEWAY_ID NUMBER DEFAULT 0 NOT NULL,
SIGN_ALG_TYPE VARCHAR(1) DEFAULT '2' NOT NULL,
ENC_ALG_TYPE VARCHAR(1) DEFAULT '2' NOT NULL,
AUTH_TYPE VARCHAR(1) DEFAULT '0' NOT NULL,
API_KEY VARCHAR(1) DEFAULT ' ' NOT NULL,
USERNAME VARCHAR(1) DEFAULT ' ' NOT NULL,
PASSWORD VARCHAR(1) DEFAULT ' ' NOT NULL,
IP_TYPE VARCHAR(1) DEFAULT '0' NOT NULL,
IP_LST VARCHAR(1) DEFAULT ' ' NOT NULL,
REQ_ID VARCHAR2(64) DEFAULT ' ' NOT NULL,
TM_SMP VARCHAR2(14) DEFAULT ' ' NOT NULL,
NOD_ID VARCHAR2(20) DEFAULT ' ' NOT NULL,
UPD_OPR VARCHAR2(10) DEFAULT ' ' NOT NULL,
PRIMARY KEY (GATEWAY_ID)
);
comment on table T_OPN_SECURITY_INF is '安全信息表';
comment on column T_OPN_SECURITY_INF.GATEWAY_ID is '请求id';
comment on column T_OPN_SECURITY_INF.SIGN_ALG_TYPE is '签名算法(0-不设置,1-国际RSA,2-国密SM2)';
comment on column T_OPN_SECURITY_INF.ENC_ALG_TYPE is '加密算法(0-不设置,1-3DES,2-AES,3-国密SM3)';
comment on column T_OPN_SECURITY_INF.AUTH_TYPE is '授权类型(0-不设置,1-Token,2-用户密码)';
comment on column T_OPN_SECURITY_INF.API_KEY is 'APIKey';
comment on column T_OPN_SECURITY_INF.USERNAME is '用户';
comment on column T_OPN_SECURITY_INF.PASSWORD is '密码';
comment on column T_OPN_SECURITY_INF.IP_TYPE is 'IP类型(0-不设置,1-白名单,2-黑名单)';
comment on column T_OPN_SECURITY_INF.IP_LST is 'IP地址';
comment on column T_OPN_SECURITY_INF.REQ_ID is '请求id';
comment on column T_OPN_SECURITY_INF.TM_SMP is '时间戳';
comment on column T_OPN_SECURITY_INF.NOD_ID is '更新节点';
comment on column T_OPN_SECURITY_INF.UPD_OPR is '更新操作员';
-- 合作伙伴信息
DROP TABLE T_OPN_PARTNER_INF;
CREATE TABLE T_OPN_PARTNER_INF
@@ -38,7 +38,7 @@ public class OpnInterfaceInfListByGatewayAndGroupAction extends BaseAction {
* @return
* @throws YGException
*/
public ResultT execute(YGBizMessageContext bizCtx, OpnInterfaceInfListByGatewayAndGroupReqBO reqBO) throws YGException {
public PageResultT execute(YGBizMessageContext bizCtx, OpnInterfaceInfListByGatewayAndGroupReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
YGEDB root = bizMsg.getEDBBody();
@@ -46,10 +46,17 @@ public class OpnInterfaceInfListByGatewayAndGroupAction extends BaseAction {
ValidatorUtil.validateObject(reqBO);
YGPageEntity pageEntity = YGPageEntity.createPageEntity(root);
pageEntity.setTot_rec_num(NumberUtils.toInt(root.getData("totalrows")));
List<OpnInterfaceInfDO> list = opnInterfaceInfMapper.selectByGatewayAndGroup(reqBO.getGatewayId(), reqBO.getGroupId());
OpnInterfaceInfDO entity = new OpnInterfaceInfDO();
BeanUtils.copyProperties(reqBO, entity);
entity.setName(reqBO.getSearch());
ResultT resultT = new ResultT();
List<OpnInterfaceInfDO> list = opnInterfaceInfMapper.selectByGatewayAndGroupPage(pageEntity, entity);
PageResultT resultT = new PageResultT();
resultT.setPageEntity(pageEntity);
if( list == null || list.isEmpty() ) {
resultT.setMsgCod(CommonMessageCode.REC_NFND);
} else {
@@ -57,6 +64,7 @@ public class OpnInterfaceInfListByGatewayAndGroupAction extends BaseAction {
resultT.setData(list);
}
return resultT;
}
}
@@ -2,8 +2,8 @@ package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
import com.alibaba.fastjson.JSONObject;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnInterfaceInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnInterfaceInfMapper;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnSecurityInfMapper;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.yuangou.ecp.bp.core.common.exception.YGException;
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
@@ -18,17 +18,18 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import com.murong.ecp.netpay.mbu.web.opn.model.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
/**
* 接口信息表管理服务
* Created by xu_lw on 2019-08-29 22:54:06.
* 安全信息表管理服务
* Created by xu_lw on 2019-09-02 18:41:20.
*/
@Service("opninterfaceinfAdd")
@Service("opnsecurityinfAdd")
@Slf4j
public class OpnInterfaceInfAddAction extends BaseAction {
public class OpnSecurityInfAddAction extends BaseAction {
@Autowired
private OpnInterfaceInfMapper opnInterfaceInfMapper;
private OpnSecurityInfMapper opnSecurityInfMapper;
/**
@@ -38,18 +39,18 @@ public class OpnInterfaceInfAddAction extends BaseAction {
* @return
* @throws YGException
*/
public ResultT execute(YGBizMessageContext bizCtx, OpnInterfaceInfAddReqBO reqBO) throws YGException {
public ResultT execute(YGBizMessageContext bizCtx, OpnSecurityInfAddReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
msgLog.info("add, reqBO=" + JSONObject.toJSON(reqBO));
ValidatorUtil.validateObject(reqBO);
OpnInterfaceInfDO entity = new OpnInterfaceInfDO();
OpnSecurityInfDO entity = new OpnSecurityInfDO();
BeanUtils.copyProperties(reqBO, entity);
BuiOperDTO operDTO = OperSession.getOperInf(bizMsg);
AuditUtil.addAudit(entity, operDTO);
int retCode = opnInterfaceInfMapper.insertSelective(entity);
int retCode = opnSecurityInfMapper.insertSelective(entity);
ResultT resultT = new ResultT();
if( retCode > 0 ) {
@@ -2,8 +2,8 @@ package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
import com.alibaba.fastjson.JSONObject;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnInterfaceInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnInterfaceInfMapper;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnSecurityInfMapper;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.yuangou.ecp.bp.core.common.exception.YGException;
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
@@ -18,17 +18,18 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import com.murong.ecp.netpay.mbu.web.opn.model.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
/**
* 接口信息表管理服务
* Created by xu_lw on 2019-08-29 22:54:06.
* 安全信息表管理服务
* Created by xu_lw on 2019-09-02 18:41:20.
*/
@Service("opninterfaceinfDelete")
@Service("opnsecurityinfDelete")
@Slf4j
public class OpnInterfaceInfDeleteAction extends BaseAction {
public class OpnSecurityInfDeleteAction extends BaseAction {
@Autowired
private OpnInterfaceInfMapper opnInterfaceInfMapper;
private OpnSecurityInfMapper opnSecurityInfMapper;
/**
* 删除记录
@@ -37,14 +38,14 @@ public class OpnInterfaceInfDeleteAction extends BaseAction {
* @return
* @throws YGException
*/
public ResultT execute(YGBizMessageContext bizCtx, OpnInterfaceInfDeleteReqBO reqBO) throws YGException {
public ResultT execute(YGBizMessageContext bizCtx, OpnSecurityInfDeleteReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
msgLog.info("delete, reqBO=" + JSONObject.toJSON(reqBO));
ValidatorUtil.validateObject(reqBO);
int retCod = opnInterfaceInfMapper.deleteByIds(reqBO.getIds());
int retCod = opnSecurityInfMapper.deleteByIds(reqBO.getIds());
ResultT resultT = new ResultT();
if( retCod > 0 ) {
@@ -2,8 +2,8 @@ package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
import com.alibaba.fastjson.JSONObject;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyAuthInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnStrategyAuthInfMapper;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnSecurityInfMapper;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.yuangou.ecp.bp.core.common.exception.YGException;
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
@@ -18,17 +18,18 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import com.murong.ecp.netpay.mbu.web.opn.model.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
/**
* 策略信息表-鉴权管理服务
* Created by xu_lw on 2019-08-30 17:27:56.
* 安全信息表管理服务
* Created by xu_lw on 2019-09-02 18:41:20.
*/
@Service("opnstrategyauthinfList")
@Service("opnsecurityinfList")
@Slf4j
public class OpnStrategyAuthInfListAction extends BaseAction {
public class OpnSecurityInfListAction extends BaseAction {
@Autowired
private OpnStrategyAuthInfMapper opnStrategyAuthInfMapper;
private OpnSecurityInfMapper opnSecurityInfMapper;
/**
* 分页查询
@@ -37,7 +38,7 @@ public class OpnStrategyAuthInfListAction extends BaseAction {
* @return
* @throws YGException
*/
public PageResultT<OpnStrategyAuthInfDO> execute(YGBizMessageContext bizCtx, OpnStrategyAuthInfListReqBO reqBO) throws YGException {
public PageResultT<OpnSecurityInfDO> execute(YGBizMessageContext bizCtx, OpnSecurityInfListReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
YGEDB root = bizMsg.getEDBBody();
@@ -45,20 +46,21 @@ public class OpnStrategyAuthInfListAction extends BaseAction {
ValidatorUtil.validateObject(reqBO);
OpnStrategyAuthInfDO entity = new OpnStrategyAuthInfDO();
OpnSecurityInfDO entity = new OpnSecurityInfDO();
BeanUtils.copyProperties(reqBO, entity);
entity.setName(reqBO.getSearch());
entity.setSignAlgType(reqBO.getSearch());
entity.setEncAlgType(reqBO.getSearch());
entity.setAuthType(reqBO.getSearch());
entity.setApiKey(reqBO.getSearch());
entity.setUsername(reqBO.getSearch());
entity.setPassword(reqBO.getSearch());
entity.setStatus(reqBO.getSearch());
entity.setRemark(reqBO.getSearch());
entity.setIpType(reqBO.getSearch());
entity.setIpLst(reqBO.getSearch());
YGPageEntity pageEntity = YGPageEntity.createPageEntity(root);
pageEntity.setTot_rec_num(NumberUtils.toInt(root.getData("totalrows")));
List<OpnStrategyAuthInfDO> list = opnStrategyAuthInfMapper.selectPage(pageEntity, entity);
List<OpnSecurityInfDO> list = opnSecurityInfMapper.selectPage(pageEntity, entity);
PageResultT resultT = new PageResultT();
resultT.setPageEntity(pageEntity);
@@ -2,8 +2,8 @@ package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
import com.alibaba.fastjson.JSONObject;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyFlowInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnStrategyFlowInfMapper;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnSecurityInfMapper;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.yuangou.ecp.bp.core.common.exception.YGException;
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
@@ -18,17 +18,18 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import com.murong.ecp.netpay.mbu.web.opn.model.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
/**
* 策略信息表-流量管理服务
* Created by xu_lw on 2019-08-30 16:34:39.
* 安全信息表管理服务
* Created by xu_lw on 2019-09-02 18:41:20.
*/
@Service("opnstrategyflowinfQuery")
@Service("opnsecurityinfQuery")
@Slf4j
public class OpnStrategyFlowInfQueryAction extends BaseAction {
public class OpnSecurityInfQueryAction extends BaseAction {
@Autowired
private OpnStrategyFlowInfMapper opnStrategyFlowInfMapper;
private OpnSecurityInfMapper opnSecurityInfMapper;
/**
* 查询单笔
@@ -37,16 +38,16 @@ public class OpnStrategyFlowInfQueryAction extends BaseAction {
* @return
* @throws YGException
*/
public ResultT<OpnStrategyFlowInfDO> execute(YGBizMessageContext bizCtx, OpnStrategyFlowInfQueryReqBO reqBO) throws YGException {
public ResultT<OpnSecurityInfDO> execute(YGBizMessageContext bizCtx, OpnSecurityInfQueryReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
msgLog.info("query, reqBO=" + JSONObject.toJSON(reqBO));
ValidatorUtil.validateObject(reqBO);
OpnStrategyFlowInfDO entity = new OpnStrategyFlowInfDO();
OpnSecurityInfDO entity = new OpnSecurityInfDO();
BeanUtils.copyProperties(reqBO, entity);
entity = opnStrategyFlowInfMapper.selectByPrimaryKey(entity);
entity = opnSecurityInfMapper.selectByPrimaryKey(entity);
ResultT resultT = new ResultT();
if( entity != null ) {
@@ -2,8 +2,8 @@ package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
import com.alibaba.fastjson.JSONObject;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnInterfaceInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnInterfaceInfMapper;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnSecurityInfMapper;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.yuangou.ecp.bp.core.common.exception.YGException;
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
@@ -18,17 +18,18 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import com.murong.ecp.netpay.mbu.web.opn.model.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
/**
* 接口信息表管理服务
* Created by xu_lw on 2019-08-29 22:54:06.
* 安全信息表管理服务
* Created by xu_lw on 2019-09-02 18:41:20.
*/
@Service("opninterfaceinfUpdate")
@Service("opnsecurityinfUpdate")
@Slf4j
public class OpnInterfaceInfUpdateAction extends BaseAction {
public class OpnSecurityInfUpdateAction extends BaseAction {
@Autowired
private OpnInterfaceInfMapper opnInterfaceInfMapper;
private OpnSecurityInfMapper opnSecurityInfMapper;
/**
* 更新单笔
@@ -37,18 +38,25 @@ public class OpnInterfaceInfUpdateAction extends BaseAction {
* @return
* @throws YGException
*/
public ResultT execute(YGBizMessageContext bizCtx, OpnInterfaceInfUpdateReqBO reqBO) throws YGException {
public ResultT execute(YGBizMessageContext bizCtx, OpnSecurityInfUpdateReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
msgLog.info("update, reqBO=" + JSONObject.toJSON(reqBO));
ValidatorUtil.validateObject(reqBO);
OpnInterfaceInfDO entity = new OpnInterfaceInfDO();
OpnSecurityInfDO entity = new OpnSecurityInfDO();
BeanUtils.copyProperties(reqBO, entity);
BuiOperDTO operDTO = OperSession.getOperInf(bizMsg);
AuditUtil.updateAudit(entity, operDTO);
int retCode = opnInterfaceInfMapper.updateByPrimaryKeySelective(entity);
OpnSecurityInfDO entity1 = opnSecurityInfMapper.selectByPrimaryKey(entity);
int retCode = 0;
if( entity1 == null ) {
retCode = opnSecurityInfMapper.insertSelective(entity);
} else {
retCode = opnSecurityInfMapper.updateByPrimaryKeySelective(entity);
}
ResultT resultT = new ResultT();
if( retCode > 0 ) {
@@ -1,12 +1,13 @@
package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
import com.alibaba.fastjson.JSONObject;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.netpay.mbu.web.common.utils.BaseAction;
import com.murong.ecp.netpay.mbu.web.common.utils.CommonMessageCode;
import com.murong.ecp.netpay.mbu.web.common.utils.ResultT;
import com.murong.ecp.netpay.mbu.web.common.utils.ValidatorUtil;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnStrategyFlowInfMapper;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyFlowInfDO;
import com.murong.ecp.netpay.mbu.web.opn.model.OpnStrategyFlowInfListByGatewayAndStrategyReqBO;
import com.murong.ecp.netpay.mbu.web.opn.model.OpnStrategyFlowInfListReqBO;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.murong.ecp.netpay.mbu.web.opn.model.OpnStrategyFlowInfListByGatewayReqBO;
import com.yuangou.ecp.bp.core.common.exception.YGException;
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
import com.yuangou.ecp.bp.core.common.message.YGBizMessageContext;
@@ -14,8 +15,6 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import com.yuangou.ecp.bp.core.common.yglog4j.Logger;
import com.yuangou.ecp.bp.core.common.yglog4j.YGLogger;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.math.NumberUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -25,9 +24,9 @@ import java.util.List;
* 策略信息表-流量管理服务
* Created by xu_lw on 2019-08-30 16:34:39.
*/
@Service("opnstrategyflowinfListByGatewayAndStrategy")
@Service("opnstrategyflowinfListByGateway")
@Slf4j
public class OpnStrategyFlowInfListByGatewayAndStrategyAction extends BaseAction {
public class OpnStrategyFlowInfListByGatewayAction extends BaseAction {
@Autowired
private OpnStrategyFlowInfMapper opnStrategyFlowInfMapper;
@@ -39,7 +38,7 @@ public class OpnStrategyFlowInfListByGatewayAndStrategyAction extends BaseAction
* @return
* @throws YGException
*/
public ResultT execute(YGBizMessageContext bizCtx, OpnStrategyFlowInfListByGatewayAndStrategyReqBO reqBO) throws YGException {
public ResultT execute(YGBizMessageContext bizCtx, OpnStrategyFlowInfListByGatewayReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
YGEDB root = bizMsg.getEDBBody();
@@ -47,7 +46,7 @@ public class OpnStrategyFlowInfListByGatewayAndStrategyAction extends BaseAction
ValidatorUtil.validateObject(reqBO);
List<OpnStrategyFlowInfDO> list = opnStrategyFlowInfMapper.selectByGatewayAndStrategy(reqBO.getGatewayId(), reqBO.getStrategyId());
List<OpnStrategyFlowInfDO> list = opnStrategyFlowInfMapper.selectByGateway(reqBO.getGatewayId());
ResultT resultT = new ResultT();
if (list == null || list.isEmpty()) {
@@ -1,55 +1,54 @@
package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
import com.alibaba.fastjson.JSONObject;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnInterfaceInfDO;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnInterfaceInfMapper;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.murong.ecp.netpay.mbu.web.common.utils.BaseAction;
import com.murong.ecp.netpay.mbu.web.common.utils.CommonMessageCode;
import com.murong.ecp.netpay.mbu.web.common.utils.ResultT;
import com.murong.ecp.netpay.mbu.web.common.utils.ValidatorUtil;
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnStrategyFlowInfMapper;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyFlowInfDO;
import com.murong.ecp.netpay.mbu.web.opn.model.OpnStrategyFlowInfQueryByInterfaceReqBO;
import com.murong.ecp.netpay.mbu.web.opn.model.OpnStrategyFlowInfQueryReqBO;
import com.yuangou.ecp.bp.core.common.exception.YGException;
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
import com.yuangou.ecp.bp.core.common.message.YGBizMessageContext;
import com.yuangou.ecp.bp.core.common.yglog4j.Logger;
import com.yuangou.ecp.bp.core.common.yglog4j.YGLogger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.lang.StringUtils;
import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import com.murong.ecp.netpay.mbu.web.opn.model.*;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
* 接口信息表管理服务
* Created by xu_lw on 2019-08-29 22:54:06.
* 策略信息表-流量管理服务
* Created by xu_lw on 2019-08-30 16:34:39.
*/
@Service("opninterfaceinfQuery")
@Service("opnstrategyflowinfQueryByInterface")
@Slf4j
public class OpnInterfaceInfQueryAction extends BaseAction {
public class OpnStrategyFlowInfQueryByInterfaceAction extends BaseAction {
@Autowired
private OpnInterfaceInfMapper opnInterfaceInfMapper;
private OpnStrategyFlowInfMapper opnStrategyFlowInfMapper;
/**
* 查询单笔
*
* @param bizCtx 上下文
* @param reqBO 请求对象
* @param reqBO 请求对象
* @return
* @throws YGException
*/
public ResultT<OpnInterfaceInfDO> execute(YGBizMessageContext bizCtx, OpnInterfaceInfQueryReqBO reqBO) throws YGException {
public ResultT<OpnStrategyFlowInfDO> execute(YGBizMessageContext bizCtx, OpnStrategyFlowInfQueryByInterfaceReqBO reqBO) throws YGException {
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
Logger msgLog = YGLogger.getLogger(bizMsg);
msgLog.info("query, reqBO=" + JSONObject.toJSON(reqBO));
ValidatorUtil.validateObject(reqBO);
OpnInterfaceInfDO entity = new OpnInterfaceInfDO();
BeanUtils.copyProperties(reqBO, entity);
OpnStrategyFlowInfDO entity = null;
entity = opnInterfaceInfMapper.selectByPrimaryKey(entity);
entity = opnStrategyFlowInfMapper.selectByInterface(reqBO.getInterfaceId());
ResultT resultT = new ResultT();
if( entity != null ) {
if (entity != null) {
resultT.setMsgCod(CommonMessageCode.SUCC);
resultT.setData(entity);
} else {
@@ -27,6 +27,6 @@ public interface OpnInterfaceInfMapper {
List<OpnInterfaceInfDO> selectByGateway(Long gatewayId);
List<OpnInterfaceInfDO> selectByGatewayAndGroup(Long gatewayId, Long groupId);
List<OpnInterfaceInfDO> selectByGatewayAndGroupPage(YGPageEntity pageEntity, OpnInterfaceInfDO entity);
}
@@ -0,0 +1,27 @@
/**
* OpnSecurityInfMapper.java
* Copyright(C) 北京沐融信息科技有限公司
* All rights reserved
* ------------------------------------------------
* Created by xu_lw on 2019-09-02 18:41:20.
*/
package com.murong.ecp.netpay.mbu.web.opn.dal.dao;
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO;
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
import com.yuangou.ecp.biz.transengine.sqlsession.YGResultHandler;
import com.yuangou.ecp.biz.transengine.sqlsession.YGSqlCursor;
import java.util.List;
public interface OpnSecurityInfMapper {
OpnSecurityInfDO selectByPrimaryKey(OpnSecurityInfDO entity);
int updateByPrimaryKey(OpnSecurityInfDO entity);
int updateByPrimaryKeySelective(OpnSecurityInfDO entity);
int deleteByIds(String ids);
int deleteByPrimaryKey(OpnSecurityInfDO entity);
int insertSelective(OpnSecurityInfDO entity);
int insert(OpnSecurityInfDO entity);
List<OpnSecurityInfDO> selectPage(YGPageEntity pageEntity, OpnSecurityInfDO entity);
YGSqlCursor selectCursor(OpnSecurityInfDO entity);
void selectResultHandler(OpnSecurityInfDO entity, YGResultHandler resultHandler);
}
@@ -35,6 +35,9 @@ public interface OpnStrategyFlowInfMapper {
void selectResultHandler(OpnStrategyFlowInfDO entity, YGResultHandler resultHandler);
List<OpnStrategyFlowInfDO> selectByGatewayAndStrategy(Long gatewayId, Long strategyId);
List<OpnStrategyFlowInfDO> selectByGateway(Long gatewayId);
OpnStrategyFlowInfDO selectByInterface(Long interfaceId);
}
@@ -0,0 +1,65 @@
/**
* OpnSecurityInfDO.java
* Copyright(C) 北京沐融信息科技有限公司
* ------------------------------------------------
* Created by xu_lw on 2019-09-02 18:41:20.
*/
package com.murong.ecp.netpay.mbu.web.opn.dal.entity;
import com.murong.ecp.bp.common.util.BaseDO;
import lombok.Data;
import net.sf.json.JSONObject;
import com.yuangou.ecp.bp.comp.pubatc.common.YGAmt;
import java.math.BigDecimal;
/**
* 安全信息表
*/
@Data
public class OpnSecurityInfDO extends BaseDO {
/**
* 请求id
*/
private Long gatewayId;
/**
* 签名算法(0-不设置,1-国际RSA,2-国密SM2)
*/
private String signAlgType;
/**
* 加密算法(0-不设置,1-3DES,2-AES,3-国密SM3)
*/
private String encAlgType;
/**
* 授权类型(0-不设置,1-Token,2-用户密码)
*/
private String authType;
/**
* APIKey
*/
private String apiKey;
/**
* 用户
*/
private String username;
/**
* 密码
*/
private String password;
/**
* IP类型(0-不设置,1-白名单,2-黑名单)
*/
private String ipType;
/**
* IP地址
*/
private String ipLst;
}
@@ -30,7 +30,7 @@ public class OpnStrategyFlowInfDO extends BaseDO {
/**
* 策略标识
*/
private Long strategyId;
private Long interfaceId;
/**
* 名称
@@ -113,12 +113,12 @@ public class OpnStrategyFlowInfDO extends BaseDO {
this.gatewayId = gatewayId == null ? Long.valueOf(0) : gatewayId;
}
public Long getStrategyId() {
return strategyId;
public Long getInterfaceId() {
return interfaceId;
}
public void setStrategyId(Long strategyId) {
this.strategyId = strategyId == null ? Long.valueOf(0) : strategyId;
public void setInterfaceId(Long interfaceId) {
this.interfaceId = interfaceId == null ? Long.valueOf(0) : interfaceId;
}
public String getName() {
@@ -230,7 +230,7 @@ public class OpnStrategyFlowInfDO extends BaseDO {
super.clean();
setId(null);
setGatewayId(null);
setStrategyId(null);
setInterfaceId(null);
setName(null);
setType(null);
setUnitTimeType(null);
@@ -1,4 +1,5 @@
package com.murong.ecp.netpay.mbu.web.opn.model;
import com.murong.ecp.bp.common.dict.ECPDict;
import com.murong.ecp.netpay.mbu.web.common.utils.PageRequest;
import lombok.Data;
@@ -6,14 +7,18 @@ import lombok.Data;
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnInterfaceInfListByGatewayAndGroupReqBO {
public class OpnInterfaceInfListByGatewayAndGroupReqBO extends PageRequest {
private String search;
/**
* 接口组id
*/
@ECPDict(required = true, message = "groupId值不合法")
private Long groupId;
/**
* 网关id
*/
@ECPDict(required = true, message = "gatewayId值不合法")
private Long gatewayId;
}
@@ -0,0 +1,74 @@
package com.murong.ecp.netpay.mbu.web.opn.model;
import java.math.BigDecimal;
import net.sf.oval.constraint.NotEmpty;
import net.sf.oval.constraint.Size;
import net.sf.oval.constraint.NotNull;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.bp.common.dict.ECPDict;
import com.murong.ecp.bp.common.dict.ECPDict;
import com.yuangou.ecp.bp.comp.pubatc.common.YGAmt;
import lombok.Data;
/**
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnSecurityInfAddReqBO {
/**
* 请求id
*/
@ECPDict(required = true, message = "gatewayId值不合法")
private Long gatewayId;
/**
* 签名算法(0-不设置,1-国际RSA,2-国密SM2)
*/
@ECPDict(required = true,length = 1, message = "signAlgType值不合法")
private String signAlgType;
/**
* 加密算法(0-不设置,1-3DES,2-AES,3-国密SM3)
*/
@ECPDict(required = true,length = 1, message = "encAlgType值不合法")
private String encAlgType;
/**
* 授权类型(0-不设置,1-Token,2-用户密码)
*/
@ECPDict(required = true,length = 1, message = "authType值不合法")
private String authType;
/**
* APIKey
*/
@ECPDict(required = true,length = 64, message = "apiKey值不合法")
private String apiKey;
/**
* 用户
*/
@ECPDict(required = true,length = 20, message = "username值不合法")
private String username;
/**
* 密码
*/
@ECPDict(required = true,length = 20, message = "password值不合法")
private String password;
/**
* IP类型(0-不设置,1-白名单,2-黑名单)
*/
@ECPDict(required = true,length = 1, message = "ipType值不合法")
private String ipType;
/**
* IP地址
*/
@ECPDict(required = true,length = 128, message = "ipLst值不合法")
private String ipLst;
}
@@ -13,7 +13,7 @@ import lombok.Data;
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnInterfaceInfDeleteReqBO {
public class OpnSecurityInfDeleteReqBO {
/**
* id
*/
@@ -13,7 +13,7 @@ import lombok.Data;
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnInterfaceInfListReqBO extends PageRequest {
public class OpnSecurityInfListReqBO extends PageRequest {
/**
* search
*/
@@ -12,12 +12,12 @@ import lombok.Data;
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnBackendServerInfQueryReqBO {
public class OpnSecurityInfQueryReqBO {
/**
* 标识
* 请求id
*/
@ECPDict(required = true, message = "id值不合法")
private Long id;
@ECPDict(required = true, message = "gatewayId值不合法")
private Long gatewayId;
}
@@ -0,0 +1,71 @@
package com.murong.ecp.netpay.mbu.web.opn.model;
import java.math.BigDecimal;
import net.sf.oval.constraint.NotNull;
import net.sf.oval.constraint.Size;
import net.sf.oval.constraint.NotEmpty;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.bp.common.dict.ECPDict;
import com.yuangou.ecp.bp.comp.pubatc.common.YGAmt;
import lombok.Data;
/**
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnSecurityInfUpdateReqBO {
/**
* 请求id
*/
@ECPDict(required = true, message = "gatewayId值不合法")
private Long gatewayId;
/**
* 签名算法(0-不设置,1-国际RSA,2-国密SM2)
*/
@ECPDict(required = true,length = 1, message = "signAlgType值不合法")
private String signAlgType;
/**
* 加密算法(0-不设置,1-3DES,2-AES,3-国密SM3)
*/
@ECPDict(required = true,length = 1, message = "encAlgType值不合法")
private String encAlgType;
/**
* 授权类型(0-不设置,1-Token,2-用户密码)
*/
@ECPDict(required = true,length = 1, message = "authType值不合法")
private String authType;
/**
* APIKey
*/
@ECPDict(required = false,length = 64, message = "apiKey值不合法")
private String apiKey;
/**
* 用户
*/
@ECPDict(required = false,length = 20, message = "username值不合法")
private String username;
/**
* 密码
*/
@ECPDict(required = false,length = 20, message = "password值不合法")
private String password;
/**
* IP类型(0-不设置,1-白名单,2-黑名单)
*/
@ECPDict(required = true,length = 1, message = "ipType值不合法")
private String ipType;
/**
* IP地址
*/
@ECPDict(required = false,length = 128, message = "ipLst值不合法")
private String ipLst;
}
@@ -26,13 +26,13 @@ public class OpnStrategyFlowInfAddReqBO {
/**
* 策略标识
*/
@ECPDict(required = true, message = "strategyId值不合法")
private Long strategyId;
@ECPDict(required = true, message = "interfaceId值不合法")
private Long interfaceId;
/**
* 名称
*/
@ECPDict(required = true, length = 60, message = "name值不合法")
@ECPDict(required = false, length = 60, message = "name值不合法")
private String name;
/**
@@ -1,14 +1,13 @@
package com.murong.ecp.netpay.mbu.web.opn.model;
import com.murong.ecp.bp.common.dict.ECPDict;
import com.murong.ecp.netpay.mbu.web.common.utils.PageRequest;
import lombok.Data;
/**
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnStrategyFlowInfListByGatewayAndStrategyReqBO {
public class OpnStrategyFlowInfListByGatewayReqBO {
/**
* search
*/
@@ -0,0 +1,18 @@
package com.murong.ecp.netpay.mbu.web.opn.model;
import com.murong.ecp.bp.common.dict.ECPDict;
import lombok.Data;
/**
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnStrategyFlowInfQueryByInterfaceReqBO {
/**
* 标识
*/
@ECPDict(required = true, message = "interfaceId值不合法")
private Long interfaceId;
}
@@ -31,8 +31,8 @@ public class OpnStrategyFlowInfUpdateReqBO {
/**
* 策略标识
*/
@ECPDict(required = true, message = "strategyId值不合法")
private Long strategyId;
@ECPDict(required = true, message = "interfaceId值不合法")
private Long interfaceId;
/**
* 名称
@@ -143,9 +143,10 @@
from T_OPN_INTERFACE_INF where gateway_id=#{gatewayId} order by id
</select>
<select id="selectByGatewayAndGroup" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnInterfaceInfDO">
<select id="selectByGatewayAndGroupPage" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnInterfaceInfDO">
select <include refid="base_column_list"/>
from T_OPN_INTERFACE_INF where gateway_id=#{gatewayId} and group_id=#{groupId} order by id
from T_OPN_INTERFACE_INF where gateway_id=#{gatewayId} and group_id=#{groupId} and name like '%%${name}%%' order by id
</select>
</mapper>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="GBK"?>
<!-- Created by xu_lw on 2019-09-02 18:35:32. -->
<mapper namespace="com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnSecurityInfMapper">
<select id="selectByPrimaryKey" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
select <include refid="base_column_list"/>
from T_OPN_SECURITY_INF where gateway_id = #{gatewayId}
</select>
<!-- 分页查询id后缀必须为Page -->
<select id="selectPage" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
select <include refid="base_column_list"/>
from T_OPN_SECURITY_INF where sign_alg_type like '%%${signAlgType}%%' or enc_alg_type like '%%${encAlgType}%%' or auth_type like '%%${authType}%%' or api_key like '%%${apiKey}%%' or username like '%%${username}%%' or password like '%%${password}%%' or ip_type like '%%${ipType}%%' or ip_lst like '%%${ipLst}%%' order by gateway_id
</select>
<!-- 游标后缀必须为Cursor -->
<select id="selectCursor" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
select <include refid="base_column_list"/>
from T_OPN_SECURITY_INF
</select>
<!-- 查询id后缀必须为ResultHandler -->
<select id="selectResultHandler" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
select <include refid="base_column_list"/>
from T_OPN_SECURITY_INF
</select>
<delete id="deleteByPrimaryKey" parameterType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
delete from T_OPN_SECURITY_INF where gateway_id = #{gatewayId}
</delete>
<delete id="deleteByIds" parameterType="java.lang.String">
delete from T_OPN_SECURITY_INF where id in (${ids})
</delete>
<update id="updateByPrimaryKey" parameterType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
update T_OPN_SECURITY_INF
<trim prefix="set" suffixOverrides = ",">
<if test="isNotNull(gatewayId)">gateway_id=#{gatewayId},</if>
<if test="isNotNull(signAlgType)">sign_alg_type=#{signAlgType},</if>
<if test="isNotNull(encAlgType)">enc_alg_type=#{encAlgType},</if>
<if test="isNotNull(authType)">auth_type=#{authType},</if>
<if test="isNotNull(apiKey)">api_key=#{apiKey},</if>
<if test="isNotNull(username)">username=#{username},</if>
<if test="isNotNull(password)">password=#{password},</if>
<if test="isNotNull(ipType)">ip_type=#{ipType},</if>
<if test="isNotNull(ipLst)">ip_lst=#{ipLst},</if>
</trim>
where gateway_id = #{gatewayId}
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
update T_OPN_SECURITY_INF
<trim prefix="set" suffixOverrides = ",">
<if test="isNotNull(gatewayId)">gateway_id=#{gatewayId},</if>
<if test="isNotNull(signAlgType)">sign_alg_type=#{signAlgType},</if>
<if test="isNotNull(encAlgType)">enc_alg_type=#{encAlgType},</if>
<if test="isNotNull(authType)">auth_type=#{authType},</if>
<if test="isNotNull(apiKey)">api_key=#{apiKey},</if>
<if test="isNotNull(username)">username=#{username},</if>
<if test="isNotNull(password)">password=#{password},</if>
<if test="isNotNull(ipType)">ip_type=#{ipType},</if>
<if test="isNotNull(ipLst)">ip_lst=#{ipLst},</if>
</trim>
where gateway_id = #{gatewayId}
</update>
<insert id="insert" parameterType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
insert into T_OPN_SECURITY_INF(gateway_id, sign_alg_type, enc_alg_type, auth_type, api_key, username, password, ip_type, ip_lst)
values( #{gatewayId}, #{signAlgType}, #{encAlgType}, #{authType}, #{apiKey}, #{username}, #{password}, #{ipType}, #{ipLst})
</insert>
<insert id="insertSelective" parameterType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnSecurityInfDO">
insert into T_OPN_SECURITY_INF
<trim prefix="(" suffix=')' suffixOverrides=",">
<if test="isNotNull(gatewayId)">gateway_id,</if>
<if test="isNotNull(signAlgType)">sign_alg_type,</if>
<if test="isNotNull(encAlgType)">enc_alg_type,</if>
<if test="isNotNull(authType)">auth_type,</if>
<if test="isNotNull(apiKey)">api_key,</if>
<if test="isNotNull(username)">username,</if>
<if test="isNotNull(password)">password,</if>
<if test="isNotNull(ipType)">ip_type,</if>
<if test="isNotNull(ipLst)">ip_lst,</if>
</trim>
<trim prefix="values(" suffix=')' suffixOverrides=",">
<if test="isNotNull(gatewayId)">#{gatewayId},</if>
<if test="isNotNull(signAlgType)">#{signAlgType},</if>
<if test="isNotNull(encAlgType)">#{encAlgType},</if>
<if test="isNotNull(authType)">#{authType},</if>
<if test="isNotNull(apiKey)">#{apiKey},</if>
<if test="isNotNull(username)">#{username},</if>
<if test="isNotNull(password)">#{password},</if>
<if test="isNotNull(ipType)">#{ipType},</if>
<if test="isNotNull(ipLst)">#{ipLst},</if>
</trim>
</insert>
<sql id="base_column_list">
gateway_id, sign_alg_type, enc_alg_type, auth_type, api_key, username, password, ip_type, ip_lst
</sql>
<sql id="where_condition">
<trim prefix="where" prefixOverrides="and">
<if test="isNotNull(gatewayId)">gateway_id=#{gatewayId},</if>
<if test="isNotNull(signAlgType)">sign_alg_type=#{signAlgType},</if>
<if test="isNotNull(encAlgType)">enc_alg_type=#{encAlgType},</if>
<if test="isNotNull(authType)">auth_type=#{authType},</if>
<if test="isNotNull(apiKey)">api_key=#{apiKey},</if>
<if test="isNotNull(username)">username=#{username},</if>
<if test="isNotNull(password)">password=#{password},</if>
<if test="isNotNull(ipType)">ip_type=#{ipType},</if>
<if test="isNotNull(ipLst)">ip_lst=#{ipLst},</if>
</trim>
</sql>
</mapper>
@@ -44,7 +44,7 @@
<trim prefix="set" suffixOverrides=",">
<if test="isNotNull(id)">id=#{id},</if>
<if test="isNotNull(gatewayId)">gateway_id=#{gatewayId},</if>
<if test="isNotNull(strategyId)">strategy_id=#{strategyId},</if>
<if test="isNotNull(interfaceId)">interface_id=#{interfaceId},</if>
<if test="isNotNull(name)">name=#{name},</if>
<if test="isNotNull(type)">type=#{type},</if>
<if test="isNotNull(unitTimeType)">unit_time_type=#{unitTimeType},</if>
@@ -68,7 +68,7 @@
<trim prefix="set" suffixOverrides=",">
<if test="isNotNull(id)">id=#{id},</if>
<if test="isNotNull(gatewayId)">gateway_id=#{gatewayId},</if>
<if test="isNotNull(strategyId)">strategy_id=#{strategyId},</if>
<if test="isNotNull(interfaceId)">interface_id=#{interfaceId},</if>
<if test="isNotNull(name)">name=#{name},</if>
<if test="isNotNull(type)">type=#{type},</if>
<if test="isNotNull(unitTimeType)">unit_time_type=#{unitTimeType},</if>
@@ -87,9 +87,9 @@
</update>
<insert id="insert" parameterType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyFlowInfDO">
insert into T_OPN_STRATEGY_FLOW_INF(id, gateway_id, strategy_id, name, type, unit_time_type, unit_time,
insert into T_OPN_STRATEGY_FLOW_INF(id, gateway_id, interface_id, name, type, unit_time_type, unit_time,
request_times, priority, begin_time, end_time, period_type, begin_period, end_period, status, remark)
values( S_PUB_ID.nextval#{gatewayId}, #{strategyId}, #{name}, #{type}, #{unitTimeType}, #{unitTime},
values( S_PUB_ID.nextval#{gatewayId}, #{interfaceId}, #{name}, #{type}, #{unitTimeType}, #{unitTime},
#{requestTimes}, #{priority}, #{beginTime}, #{endTime}, #{periodType}, #{beginPeriod}, #{endPeriod}, #{status},
#{remark})
</insert>
@@ -99,7 +99,7 @@
<trim prefix="(" suffix=')' suffixOverrides=",">
id ,
<if test="isNotNull(gatewayId)">gateway_id,</if>
<if test="isNotNull(strategyId)">strategy_id,</if>
<if test="isNotNull(interfaceId)">interface_id,</if>
<if test="isNotNull(name)">name,</if>
<if test="isNotNull(type)">type,</if>
<if test="isNotNull(unitTimeType)">unit_time_type,</if>
@@ -117,7 +117,7 @@
<trim prefix="values(" suffix=')' suffixOverrides=",">
S_PUB_ID.nextval ,
<if test="isNotNull(gatewayId)">#{gatewayId},</if>
<if test="isNotNull(strategyId)">#{strategyId},</if>
<if test="isNotNull(interfaceId)">#{interfaceId},</if>
<if test="isNotNull(name)">#{name},</if>
<if test="isNotNull(type)">#{type},</if>
<if test="isNotNull(unitTimeType)">#{unitTimeType},</if>
@@ -135,7 +135,7 @@
</insert>
<sql id="base_column_list">
id, gateway_id, strategy_id, name, type, unit_time_type, unit_time, request_times, priority, begin_time,
id, gateway_id, interface_id, name, type, unit_time_type, unit_time, request_times, priority, begin_time,
end_time, period_type, begin_period, end_period, status, remark
</sql>
@@ -143,7 +143,7 @@
<trim prefix="where" prefixOverrides="and">
<if test="isNotNull(id)">id=#{id},</if>
<if test="isNotNull(gatewayId)">gateway_id=#{gatewayId},</if>
<if test="isNotNull(strategyId)">strategy_id=#{strategyId},</if>
<if test="isNotNull(interfaceId)">interface_id=#{interfaceId},</if>
<if test="isNotNull(name)">name=#{name},</if>
<if test="isNotNull(type)">type=#{type},</if>
<if test="isNotNull(unitTimeType)">unit_time_type=#{unitTimeType},</if>
@@ -163,6 +163,19 @@
<select id="selectByGatewayAndStrategy" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyFlowInfDO">
select
<include refid="base_column_list"/>
from T_OPN_STRATEGY_FLOW_INF where gateway_id = #{gatewayId} and strategy_id = #{strategyId}
from T_OPN_STRATEGY_FLOW_INF where gateway_id = #{gatewayId} and interface_id = #{interfaceId}
</select>
<select id="selectByGateway" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyFlowInfDO">
select
<include refid="base_column_list"/>
from T_OPN_STRATEGY_FLOW_INF where gateway_id = #{gatewayId}
</select>
<select id="selectByInterface" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyFlowInfDO">
select
<include refid="base_column_list"/>
from T_OPN_STRATEGY_FLOW_INF where interface_id = #{interfaceId}
</select>
</mapper>
@@ -200,8 +200,11 @@
txn_cod="opnstrategyflowinfQuery"/>
<action path="/buiopnbpc1/opnstrategyflowinf/list" svr_nam="buiopnbpc1" check_session="true"
txn_cod="opnstrategyflowinfList"/>
<action path="/buiopnbpc1/opnstrategyflowinf/listByGatewayAndStrategy" svr_nam="buiopnbpc1" check_session="true"
txn_cod="opnstrategyflowinfListByGatewayAndStrategy"/>
<action path="/buiopnbpc1/opnstrategyflowinf/listByGateway" svr_nam="buiopnbpc1" check_session="true"
txn_cod="opnstrategyflowinfListByGateway"/>
<action path="/buiopnbpc1/opnstrategyflowinf/queryByInterface" svr_nam="buiopnbpc1" check_session="true"
txn_cod="opnstrategyflowinfQueryByInterface"/>
<action path="/buiopnbpc1/opnstrategyauthinf/add" svr_nam="buiopnbpc1" check_session="true"
@@ -243,5 +246,10 @@
<action path="/buiopnbpc1/opninterfaceinf/listByGatewayAndGroup" svr_nam="buiopnbpc1" check_session="true"
txn_cod="opninterfaceinfListByGatewayAndGroup"/>
<action path="/buiopnbpc1/opnsecurityinf/add" svr_nam="buiopnbpc1" check_session="true" txn_cod="opnsecurityinfAdd"/>
<action path="/buiopnbpc1/opnsecurityinf/delete" svr_nam="buiopnbpc1" check_session="true" txn_cod="opnsecurityinfDelete"/>
<action path="/buiopnbpc1/opnsecurityinf/update" svr_nam="buiopnbpc1" check_session="true" txn_cod="opnsecurityinfUpdate"/>
<action path="/buiopnbpc1/opnsecurityinf/query" svr_nam="buiopnbpc1" check_session="true" txn_cod="opnsecurityinfQuery"/>
<action path="/buiopnbpc1/opnsecurityinf/list" svr_nam="buiopnbpc1" check_session="true" txn_cod="opnsecurityinfList"/>
</action-mappings>
</config>
@@ -1,154 +0,0 @@
/**
* OpnStrategyAuthInfDO.java
* Copyright(C) 北京沐融信息科技有限公司
* ------------------------------------------------
* Created by xu_lw on 2019-08-30 17:27:56.
*/
package com.murong.ecp.netpay.mbu.web.opn.dal.entity;
import com.murong.ecp.bp.common.util.BaseDO;
import net.sf.json.JSONObject;
import com.yuangou.ecp.bp.comp.pubatc.common.YGAmt;
import java.math.BigDecimal;
/**
* 策略信息表-鉴权
*/
public class OpnStrategyAuthInfDO extends BaseDO {
/**
* 标识
*/
private Long id;
/**
* 网关标识
*/
private Long gatewayId;
/**
* 策略标识
*/
private Long strategyId;
/**
* 名称
*/
private String name;
/**
* 类型
*/
private String authType;
/**
* apikey
*/
private String apiKey;
/**
* 用户名
*/
private String username;
/**
* 密码
*/
private String password;
/**
* 状态(1-有效,0-无效)
*/
private String status;
/**
* 备注
*/
private String remark;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id == null ? Long.valueOf(0) : id;
}
public Long getGatewayId() {
return gatewayId;
}
public void setGatewayId(Long gatewayId) {
this.gatewayId = gatewayId == null ? Long.valueOf(0) : gatewayId;
}
public Long getStrategyId() {
return strategyId;
}
public void setStrategyId(Long strategyId) {
this.strategyId = strategyId == null ? Long.valueOf(0) : strategyId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? "" : name.trim();
}
public String getAuthType() {
return authType;
}
public void setAuthType(String authType) {
this.authType = authType == null ? "" : authType.trim();
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey == null ? "" : apiKey.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? "" : username.trim();
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password == null ? "" : password.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? "" : status.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? "" : remark.trim();
}
@Override
public void clean() {
super.clean();
setId(null);
setGatewayId(null);
setStrategyId(null);
setName(null);
setAuthType(null);
setApiKey(null);
setUsername(null);
setPassword(null);
setStatus(null);
setRemark(null);
}
}
@@ -1,23 +0,0 @@
package com.murong.ecp.netpay.mbu.web.opn.model;
import net.sf.oval.constraint.NotNull;
import net.sf.oval.constraint.Size;
import net.sf.oval.constraint.NotEmpty;
import java.math.BigDecimal;
import com.murong.ecp.netpay.mbu.web.common.utils.*;
import com.murong.ecp.bp.common.dict.ECPDict;
import com.yuangou.ecp.bp.comp.pubatc.common.YGAmt;
import lombok.Data;
/**
* Created by syxlw on 2018/4/28.
*/
@Data
public class OpnStrategyFlowInfQueryReqBO {
/**
* 标识
*/
@ECPDict(required = true, message = "id值不合法")
private Long id;
}
@@ -18,6 +18,7 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import ${modelTargetPackage}.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
<#assign domainObjectName1=domainObjectName?uncap_first/>
@@ -18,6 +18,7 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import ${modelTargetPackage}.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
<#assign domainObjectName1=domainObjectName?uncap_first/>
@@ -9,11 +9,13 @@ package ${entityTargetPackage};
import com.murong.ecp.bp.common.util.BaseDO;
import net.sf.json.JSONObject;
import com.yuangou.ecp.bp.comp.pubatc.common.YGAmt;
import lombok.Data;
import java.math.BigDecimal;
/**
* ${remark}
*/
@Data
public class ${domainObjectName}DO extends BaseDO {
<#list columns as column >
<#if !IsAuitColumn(column.name1) >
@@ -24,30 +26,4 @@ public class ${domainObjectName}DO extends BaseDO {
private ${column.javaType} ${column.name};
</#if>
</#list>
<#list columns as column >
<#if !IsAuitColumn(column.name1) >
public ${column.javaType} get${column.name?cap_first}() {
return ${column.name};
}
public void set${column.name?cap_first}(${column.javaType} ${column.name}) {
<#if column.javaType == "String">
this.${column.name} = ${column.name} == null ? "" : ${column.name}.trim();
<#else>
this.${column.name} = ${column.name} == null ? ${column.javaType}.valueOf(0) : ${column.name};
</#if>
}
</#if>
</#list>
@Override
public void clean() {
super.clean();
<#list columns as column >
<#if !IsAuitColumn(column.name1) >
set${column.name?cap_first}(null);
</#if>
</#list>
}
}
@@ -18,6 +18,7 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import ${modelTargetPackage}.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
<#assign domainObjectName1=domainObjectName?uncap_first/>
@@ -18,6 +18,7 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import ${modelTargetPackage}.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
<#assign domainObjectName1=domainObjectName?uncap_first/>
@@ -18,6 +18,7 @@ import com.yuangou.ecp.bp.core.common.message.YGEDB;
import org.springframework.stereotype.Service;
import ${modelTargetPackage}.*;
import lombok.extern.slf4j.Slf4j;
import com.murong.ecp.netpay.mbu.web.pub.model.BuiOperDTO;
import java.util.List;
<#assign domainObjectName1=domainObjectName?uncap_first/>