.
This commit is contained in:
22
pom.xml
22
pom.xml
@@ -7,24 +7,24 @@
|
|||||||
<groupId>net.tccn</groupId>
|
<groupId>net.tccn</groupId>
|
||||||
<artifactId>meta-kit</artifactId>
|
<artifactId>meta-kit</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<packaging>war</packaging>
|
<packaging>jar</packaging>
|
||||||
<modules>
|
<!--<modules>
|
||||||
<!--<module>qtask</module>-->
|
<!–<module>qtask</module>–>
|
||||||
</modules>
|
</modules>-->
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- redkale支持 -->
|
<!-- redkale支持 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.redkale</groupId>
|
<groupId>org.redkale</groupId>
|
||||||
<artifactId>redkale</artifactId>
|
<artifactId>redkale</artifactId>
|
||||||
<version>LATEST</version>
|
<version>2.7.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.redkalex</groupId>
|
<groupId>org.redkalex</groupId>
|
||||||
<artifactId>redkale-plugins</artifactId>
|
<artifactId>redkale-plugins</artifactId>
|
||||||
<version>LATEST</version>
|
<version>2.7.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- mysql连接 -->
|
<!-- mysql连接 -->
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.arangodb</groupId>
|
<groupId>com.arangodb</groupId>
|
||||||
<artifactId>arangodb-java-driver-async</artifactId>
|
<artifactId>arangodb-java-driver-async</artifactId>
|
||||||
<version>LATEST</version>
|
<version>6.0.0</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>junit:junit:3.8.1</groupId>
|
<groupId>junit:junit:3.8.1</groupId>
|
||||||
@@ -81,8 +81,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>14</source>
|
<source>19</source>
|
||||||
<target>14</target>
|
<target>19</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>2.1.2</version>
|
<version>3.2.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-resources</id>
|
<id>copy-resources</id>
|
||||||
|
|||||||
@@ -4,6 +4,19 @@
|
|||||||
*/
|
*/
|
||||||
const dict = {
|
const dict = {
|
||||||
list({type}) {
|
list({type}) {
|
||||||
return red.postX('/dict/list', {type})
|
return red.postX('/dict/list', {type}).then(res => {
|
||||||
|
return res//[{value:"gender",label:"性别"},{value:"status",label:"状态"}]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
dictData() {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
let data = {"body":{"gender":[{"id":"Dict/37473773","key":"37473773","label":"女","sysPlatId":"52481227","type":"gender","value":"4"},{"id":"Dict/37473772","key":"37473772","label":"男","sysPlatId":"52481227","type":"gender","value":"2"}],"dict":[{"id":"Dict/37473777","key":"37473777","label":"状态","sysPlatId":"52481227","type":"dict","value":"status"},{"id":"Dict/37473776","key":"37473776","label":"性别","sysPlatId":"52481227","type":"dict","value":"gender"}],"status":[{"id":"Dict/37473775","key":"37473775","label":"删除","sysPlatId":"52481227","type":"status","value":"80"},{"id":"Dict/37473774","key":"37473774","label":"正常","sysPlatId":"52481227","type":"status","value":"10"}]},"code":0,"timestamp":0}
|
||||||
|
data = data.body
|
||||||
|
resolve(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
//return {"body":{"gender":[{"id":"Dict/37473773","key":"37473773","label":"女","sysPlatId":"52481227","type":"gender","value":"4"},{"id":"Dict/37473772","key":"37473772","label":"男","sysPlatId":"52481227","type":"gender","value":"2"}],"dict":[{"id":"Dict/37473777","key":"37473777","label":"状态","sysPlatId":"52481227","type":"dict","value":"status"},{"id":"Dict/37473776","key":"37473776","label":"性别","sysPlatId":"52481227","type":"dict","value":"gender"}],"status":[{"id":"Dict/37473775","key":"37473775","label":"删除","sysPlatId":"52481227","type":"status","value":"80"},{"id":"Dict/37473774","key":"37473774","label":"正常","sysPlatId":"52481227","type":"status","value":"10"}]},"code":0,"timestamp":0}
|
||||||
|
//return red.postX("/dict/data");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,5 +5,11 @@ const tmp = {
|
|||||||
|
|
||||||
search({keyword}) {
|
search({keyword}) {
|
||||||
return red.postX('http://oss-v09x.woaihaoyouxi.com/game/search', {keyword})
|
return red.postX('http://oss-v09x.woaihaoyouxi.com/game/search', {keyword})
|
||||||
|
},
|
||||||
|
|
||||||
|
filetoken() {
|
||||||
|
return red.postX('https://api-oss.1216.top/qiniufile/token?fileType=Pic&blzType=Article&listsize=1&JSESSIONID=91740a7d5c9041d94e21ac7bda158429',{}).then(res => {
|
||||||
|
return res.result.token
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<nav class="menu" data-ride="menu">
|
<nav class="menu" data-ride="menu">
|
||||||
<ul class="nav nav-primary">
|
<ul class="nav nav-primary">
|
||||||
<li class="active show nav-parent" style="width: 100%;">
|
<li class="active show nav-parent" style="width: 100%;">
|
||||||
<a href="javascript:;"><i class="icon icon-tasks"></i> <span v-text="pageId"></span></a>
|
<!--<a href="javascript:;"><i class="icon icon-tasks"></i> <span v-text="pageId"></span></a>-->
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<!-- item in menus -->
|
<!-- item in menus -->
|
||||||
<li v-for="item in menus" @click="loadPage(item)" :class="{active:page.url==item.url}">
|
<li v-for="item in menus" @click="loadPage(item)" :class="{active:page.url==item.url}">
|
||||||
@@ -89,6 +89,9 @@
|
|||||||
import { logout } from './api/user.js'
|
import { logout } from './api/user.js'
|
||||||
let { refresh } = meta
|
let { refresh } = meta
|
||||||
let { platList } = plat
|
let { platList } = plat
|
||||||
|
let { dictData } = dict
|
||||||
|
|
||||||
|
let dictKv = {} //字典数据
|
||||||
let vm = new Vue({
|
let vm = new Vue({
|
||||||
el: ".container-fluid",
|
el: ".container-fluid",
|
||||||
data: {
|
data: {
|
||||||
@@ -115,11 +118,12 @@
|
|||||||
{url:"/qtask/debug.html", name:"QTask-Debug", icon:"icon-bug"},
|
{url:"/qtask/debug.html", name:"QTask-Debug", icon:"icon-bug"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
/*{
|
{
|
||||||
name: "其他服务", url: "/plat/db.html", nodes: [
|
name: "其他服务", url: "/plat/db.html", nodes: [
|
||||||
{url:"/plat/db.html", name:"文件服务", icon: "icon-database"},
|
{url:"/oth/index.html", name:"业务平台管理", icon: "icon-database"},
|
||||||
|
{url:"/oth/file.html", name:"文件服务", icon: "icon-database"},
|
||||||
]
|
]
|
||||||
},*/
|
},
|
||||||
{
|
{
|
||||||
name: "业务平台", url: "/qtask", nodes: [
|
name: "业务平台", url: "/qtask", nodes: [
|
||||||
{url:"/plat/index.html", name:"业务平台", icon:"icon-server"},
|
{url:"/plat/index.html", name:"业务平台", icon:"icon-server"},
|
||||||
@@ -138,6 +142,20 @@
|
|||||||
{url:"/single/metaFlow.html", name:"MetaKit使用", icon:"icon-server"},
|
{url:"/single/metaFlow.html", name:"MetaKit使用", icon:"icon-server"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{name: "Zhub", url: "/zhub", nodes: [
|
||||||
|
{url:"/zhub/monitor.html", name:"Monitor", icon:"icon-server"},
|
||||||
|
{url:"/zhub/topic.html", name:"Topics", icon:"icon-server"},
|
||||||
|
{url:"/zhub/delay.html", name:"Delays", icon:"icon-server"},
|
||||||
|
{url:"/zhub/timer.html", name:"Timer", icon:"icon-server"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{name: "微信公众号", url: "/weixin", nodes: [
|
||||||
|
{url:"/weixin/wxapp.html", name:"公众号管理", icon:"icon-server"},
|
||||||
|
{url:"/weixin/user.html", name:"用户管理", icon:"icon-server"},
|
||||||
|
{url:"/weixin/templateMessage.html", name:"模板消息", icon:"icon-server"},
|
||||||
|
{url:"/weixin/timer.html", name:"Timer", icon:"icon-server"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
menus: {},
|
menus: {},
|
||||||
@@ -179,17 +197,36 @@
|
|||||||
refresh().then(res => {
|
refresh().then(res => {
|
||||||
platList().then(res => { // 刷新平台列表缓存
|
platList().then(res => { // 刷新平台列表缓存
|
||||||
let rows = res.rows
|
let rows = res.rows
|
||||||
this.sysPlats = rows;
|
this.sysPlats = rows
|
||||||
red.setData("sysPlats", rows);
|
red.setData("sysPlats", rows)
|
||||||
})
|
})
|
||||||
|
this.loadDictData()
|
||||||
red.showOk()
|
red.showOk()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
logout()
|
logout()
|
||||||
|
},
|
||||||
|
|
||||||
|
loadDictData() {
|
||||||
|
|
||||||
|
|
||||||
|
dictData().then(res => {
|
||||||
|
let data = {}
|
||||||
|
for (let k in res) {
|
||||||
|
let vs = {}
|
||||||
|
for(let i in res[k]) {
|
||||||
|
vs[res[k][i]['value']] = res[k][i]['label']
|
||||||
|
}
|
||||||
|
data[k] = vs
|
||||||
|
}
|
||||||
|
red.setData("dictKv", data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
this.loadDictData()
|
||||||
|
|
||||||
this.menus = red.getData('menus', this.pages[0]['nodes'])
|
this.menus = red.getData('menus', this.pages[0]['nodes'])
|
||||||
this.page = red.getData('page', this.menus[0])
|
this.page = red.getData('page', this.menus[0])
|
||||||
this.pageId = red.getData("pageId", this.page['mame'])
|
this.pageId = red.getData("pageId", this.page['mame'])
|
||||||
|
|||||||
@@ -80,12 +80,12 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- 'sort':field.order>0 -->
|
<!-- 'sort':field.order>0 -->
|
||||||
|
<th>操作</th>
|
||||||
<th v-for="field in cfg.shows"
|
<th v-for="field in cfg.shows"
|
||||||
v-if="field.inType != 'HIDDEN'"
|
v-if="field.inType != 'HIDDEN'"
|
||||||
v-text="field.label || getFieldLabel(field.col)"
|
v-text="field.label || getFieldLabel(field.col)"
|
||||||
:class="{'sort':1, 'sort-up':field.col==order.col && order.desc==1, 'sort-down':field.col==order.col && order.desc!=1}"
|
:class="{'sort':1, 'sort-down':field.col==order.col && order.desc==1, 'sort-up':field.col==order.col && order.desc!=1}"
|
||||||
@click="sortEvent(field.col)"></th>
|
@click="sortEvent(field.col)"></th>
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -93,15 +93,15 @@
|
|||||||
<!--
|
<!--
|
||||||
<td v-for="field in cfg.shows" v-title="dealFieldFmt(row, field.col)" v-text="dealFieldFmt(row, field.col)"></td>
|
<td v-for="field in cfg.shows" v-title="dealFieldFmt(row, field.col)" v-text="dealFieldFmt(row, field.col)"></td>
|
||||||
-->
|
-->
|
||||||
<td v-for="field in cfg.shows"
|
|
||||||
v-if="field.inType != 'HIDDEN'"
|
|
||||||
v-title="dealFieldFmt(row, field)"
|
|
||||||
v-html="dealFieldFmt(row, field)"></td>
|
|
||||||
<td>
|
<td>
|
||||||
<a href="javascript:;" @click="detailData=row; detail()">详情</a>
|
<a href="javascript:;" @click="detailData=row; detail()">详情</a>
|
||||||
<a href="javascript:;" @click="detailData=row; edit()">编辑</a>
|
<a href="javascript:;" @click="detailData=row; edit()">编辑</a>
|
||||||
<a href="javascript:;" @click="detailData=row; del()">删除</a>
|
<a href="javascript:;" @click="detailData=row; del()">删除</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td v-for="field in cfg.shows"
|
||||||
|
v-if="field.inType != 'HIDDEN'"
|
||||||
|
v-title="dealFieldFmt(row, field)"
|
||||||
|
v-html="dealFieldFmt(row, field)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
154
root/oth/file.html
Normal file
154
root/oth/file.html
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
<row class="oth">
|
||||||
|
|
||||||
|
<!-- head -->
|
||||||
|
<div class="col-md-11">
|
||||||
|
<h3 v-text="cfg.title"></h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group pull-right" style="padding-top: 10px">
|
||||||
|
<a>HAO</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-xs-2 sheet-cell">
|
||||||
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 实体表(Meta-Table)</div>
|
||||||
|
<!-- 创建一个空的树,需要包含 .tree CLASS -->
|
||||||
|
<ul class="tree tree-lines tree-folders" id="myTree" data-ride="tree"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-10">
|
||||||
|
<!--<button @click="edit({})" class="btn btn-primary" type="button"> 用户金币发放 </button>-->
|
||||||
|
|
||||||
|
|
||||||
|
<textarea class="form-control layui-code" rows="10" id="content" placeholder="/* 没有提交要执行的查询 */" v-text="content">
|
||||||
|
</textarea>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<form method="post" action="https://up-z2.qiniup.com" enctype="multipart/form-data">
|
||||||
|
<input name="token" v-model="token">
|
||||||
|
<input name="file" type="file"/>
|
||||||
|
<input type="submit" value="[上传文件]"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- edit.modal -->
|
||||||
|
<div class="modal fade" id="myModal">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||||
|
<h4 class="modal-title">金币发放 - [编辑]</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="queryId" class="col-md-2 required">选择用户</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<input v-model="row.name" class="form-control" id="queryId" placeholder="请输入 平台名称">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="token" class="col-md-2 required">平台 Token</label>
|
||||||
|
<div class="col-md-8 col-sm-10">
|
||||||
|
<input v-model="row.token" class="form-control" id="token" placeholder="请输入 Token">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="remark" class="col-md-2">备注</label>
|
||||||
|
<div class="col-md-8 col-sm-10">
|
||||||
|
<input v-model="row.remark" class="form-control" id="remark" placeholder="请输入 备注">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||||||
|
<button @click="save(row)" type="button" class="btn btn-primary">确定</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var myTreeData = [{"title":"ck","path":"","children":[{"title":"ck.go","path":"D:/wk/_own/go-demo/_hello/ck","children":null},{"title":"ck_test.go","path":"D:/wk/_own/go-demo/_hello/ck","children":null}]},{"title":"cmd","path":"","children":[{"title":"cmd_demo.go","path":"D:/wk/_own/go-demo/_hello/cmd","children":null},{"title":"pack.bat","path":"D:/wk/_own/go-demo/_hello/cmd","children":null},{"title":"pack_linux.bat","path":"D:/wk/_own/go-demo/_hello/cmd","children":null},{"title":"upx.exe","path":"D:/wk/_own/go-demo/_hello/cmd","children":null}]},{"title":"dev-kit","path":"","children":[{"title":"dev_kit.go","path":"D:/wk/_own/go-demo/_hello/dev-kit","children":null}]},{"title":"file-io","path":"","children":[{"title":"file_kit.go","path":"D:/wk/_own/go-demo/_hello/file-io","children":null},{"title":"file_kit_test.go","path":"D:/wk/_own/go-demo/_hello/file-io","children":null},{"title":"file_read_test.go","path":"D:/wk/_own/go-demo/_hello/file-io","children":null},{"title":"file_write_test.go","path":"D:/wk/_own/go-demo/_hello/file-io","children":null},{"title":"pub.txt","path":"D:/wk/_own/go-demo/_hello/file-io","children":null},{"title":"test.txt","path":"D:/wk/_own/go-demo/_hello/file-io","children":null},{"title":"test1.txt","path":"D:/wk/_own/go-demo/_hello/file-io","children":null},{"title":"test2.txt","path":"D:/wk/_own/go-demo/_hello/file-io","children":null}]},{"title":"goroutine","path":"","children":[{"title":"gotoutine_test.go","path":"D:/wk/_own/go-demo/_hello/goroutine","children":null},{"title":"pool_test.go","path":"D:/wk/_own/go-demo/_hello/goroutine","children":null}]},{"title":"interface","path":"","children":[{"title":"interface_test.go","path":"D:/wk/_own/go-demo/_hello/interface","children":null}]},{"title":"net","path":"","children":[{"title":"net-x","path":"","children":[{"title":"UserController.go","path":"D:/wk/_own/go-demo/_hello/net/net-x","children":null},{"title":"a.go","path":"D:/wk/_own/go-demo/_hello/net/net-x","children":null}]},{"title":"net-demo.go","path":"D:/wk/_own/go-demo/_hello/net","children":null},{"title":"net_x.go","path":"D:/wk/_own/go-demo/_hello/net","children":null}]},{"title":"pulsar","path":"","children":[{"title":"pulsar_test.go","path":"D:/wk/_own/go-demo/_hello/pulsar","children":null}]},{"title":"struct","path":"","children":[{"title":"struct-demo.go","path":"D:/wk/_own/go-demo/_hello/struct","children":null}]},{"title":"timer","path":"","children":[{"title":"timer_test.go","path":"D:/wk/_own/go-demo/_hello/timer","children":null}]},{"title":"hello_test.go","path":"D:/wk/_own/go-demo/_hello","children":null}]
|
||||||
|
|
||||||
|
let { platList, platSave } = plat
|
||||||
|
let { filetoken } = tmp
|
||||||
|
|
||||||
|
var vm = new Vue({
|
||||||
|
el: ".oth",
|
||||||
|
data: {
|
||||||
|
cfg: {
|
||||||
|
title: "业务平台 管理",
|
||||||
|
cols: [
|
||||||
|
{col: "name", label: "业务名称"},
|
||||||
|
{col: "token", label: "Token"},
|
||||||
|
{col: "remark", label: "说明"},
|
||||||
|
{col: "status", label: "状态", fmt: function (v) {
|
||||||
|
return {"0":"未启用", "1":"启用", "-1":"删除"}[v] || "";
|
||||||
|
}},
|
||||||
|
|
||||||
|
],
|
||||||
|
filters: []
|
||||||
|
},
|
||||||
|
list: {rows:[], total: 0},
|
||||||
|
row: {},
|
||||||
|
content:"",
|
||||||
|
token: "x"
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
findList () {
|
||||||
|
platList().then(res => {
|
||||||
|
vm.list = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
update: function (kv, row) {
|
||||||
|
red.post("/meta/save", {
|
||||||
|
_id: row._id,
|
||||||
|
doc: JSON.stringify(kv)
|
||||||
|
}, function (json) {
|
||||||
|
red.showMsg();
|
||||||
|
red.putAll(row, kv);
|
||||||
|
vm.findList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
edit: function (row) {
|
||||||
|
vm.row = row;
|
||||||
|
console.log(this.row);
|
||||||
|
$('#myModal').modal({moveable: true});
|
||||||
|
},
|
||||||
|
save: function (row) {
|
||||||
|
platSave({plat: row}).then(() => {
|
||||||
|
red.showMsg({msg: "操作成功"})
|
||||||
|
$('#myModal').modal('hide')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
this.findList();
|
||||||
|
$('#myTree').tree({
|
||||||
|
data: myTreeData
|
||||||
|
,itemCreator: function($li, item) {
|
||||||
|
$li.append($('<a/>', {href: item.url, click: ()=>{
|
||||||
|
console.log(item.title)
|
||||||
|
vm.content = item.title
|
||||||
|
}}).text(item.title));
|
||||||
|
// return false; // 如果要忽略当前节点,可以通过返回 false 来实现
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
filetoken().then(res => {
|
||||||
|
this.token = res[0]
|
||||||
|
console.log(this.token)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
137
root/oth/index.html
Normal file
137
root/oth/index.html
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
<row class="oth">
|
||||||
|
|
||||||
|
<!-- head -->
|
||||||
|
<div class="col-md-11">
|
||||||
|
<h3 v-text="cfg.title"></h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group pull-right" style="padding-top: 10px">
|
||||||
|
<!--<span class="input-group-btn">
|
||||||
|
<button @click="edit({})" class="btn btn-primary" type="button"> 新增业务平台 </button>
|
||||||
|
</span>-->
|
||||||
|
<a>HAO</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<button @click="edit({})" class="btn btn-primary" type="button"> 用户金币发放 </button>
|
||||||
|
|
||||||
|
<!--<table class="table table-bordered table-hover" style="width: 100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th v-for="field in cfg.cols" v-text="field.label"></th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="item in list.rows">
|
||||||
|
<td v-for="field in cfg.cols" v-title="item[field.col]" v-text="field.fmt ? field.fmt(item[field.col]) : item[field.col]"></td>
|
||||||
|
<td>
|
||||||
|
<a @click="edit(item)" href="javascript:;">编辑</a> |
|
||||||
|
<a @click="update({status:1}, item)" v-show="item.status != 1" href="javascript:;">启用</a>
|
||||||
|
<a @click="update({status:0}, item)" v-show="item.status == 1" href="javascript:;">不启用</a> |
|
||||||
|
<a @click="update({status:-1}, item)" href="javascript:;">删除</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- edit.modal -->
|
||||||
|
<div class="modal fade" id="myModal">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||||
|
<h4 class="modal-title">金币发放 - [编辑]</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="queryId" class="col-md-2 required">选择用户</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<input v-model="row.name" class="form-control" id="queryId" placeholder="请输入 平台名称">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="token" class="col-md-2 required">平台 Token</label>
|
||||||
|
<div class="col-md-8 col-sm-10">
|
||||||
|
<input v-model="row.token" class="form-control" id="token" placeholder="请输入 Token">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="remark" class="col-md-2">备注</label>
|
||||||
|
<div class="col-md-8 col-sm-10">
|
||||||
|
<input v-model="row.remark" class="form-control" id="remark" placeholder="请输入 备注">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||||||
|
<button @click="save(row)" type="button" class="btn btn-primary">确定</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let { platList, platSave } = plat;
|
||||||
|
var vm = new Vue({
|
||||||
|
el: ".oth",
|
||||||
|
data: {
|
||||||
|
cfg: {
|
||||||
|
title: "业务平台 管理",
|
||||||
|
cols: [
|
||||||
|
{col: "name", label: "业务名称"},
|
||||||
|
{col: "token", label: "Token"},
|
||||||
|
{col: "remark", label: "说明"},
|
||||||
|
{col: "status", label: "状态", fmt: function (v) {
|
||||||
|
return {"0":"未启用", "1":"启用", "-1":"删除"}[v] || "";
|
||||||
|
}},
|
||||||
|
|
||||||
|
],
|
||||||
|
filters: []
|
||||||
|
},
|
||||||
|
list: {rows:[], total: 0},
|
||||||
|
row: {}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
findList () {
|
||||||
|
platList().then(res => {
|
||||||
|
vm.list = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
update: function (kv, row) {
|
||||||
|
red.post("/meta/save", {
|
||||||
|
_id: row._id,
|
||||||
|
doc: JSON.stringify(kv)
|
||||||
|
}, function (json) {
|
||||||
|
red.showMsg();
|
||||||
|
red.putAll(row, kv);
|
||||||
|
vm.findList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
edit: function (row) {
|
||||||
|
vm.row = row;
|
||||||
|
console.log(this.row);
|
||||||
|
$('#myModal').modal({moveable: true});
|
||||||
|
},
|
||||||
|
save: function (row) {
|
||||||
|
platSave({plat: row}).then(() => {
|
||||||
|
red.showMsg({msg: "操作成功"})
|
||||||
|
$('#myModal').modal('hide')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
this.findList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
loadCatalogs: function () {
|
loadCatalogs: function () {
|
||||||
vm.catalogs = [];
|
vm.catalogs = [];
|
||||||
//let [cate, url, user, pwd] = this.row
|
//let [cate, url, user, pwd] = this.row
|
||||||
let dbAccount = {cate:'', url:'', user:'', pwd:''}
|
let dbAccount = {key: '',cate:'', url:'', user:'', pwd:''}
|
||||||
for (let key in dbAccount) {
|
for (let key in dbAccount) {
|
||||||
dbAccount[key] = this.row[key]
|
dbAccount[key] = this.row[key]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>登录 - MetaKit</title>
|
<title>登录 - MetaKit</title>
|
||||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/zui/1.8.1/css/zui.min.css">
|
<link rel="stylesheet" href="/res/zui/css/zui.min.css">
|
||||||
<link rel="stylesheet" href="../res/css/zui-theme.css">
|
<link rel="stylesheet" href="/res/css/zui-theme.css">
|
||||||
<link rel="stylesheet" href="../res/css/red-kit.css">
|
<link rel="stylesheet" href="/res/css/red-kit.css">
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('http://img.1216.top/static/material/6060f.webp') no-repeat fixed;
|
background: url('https://img.1216.top/static/material/6060f.webp') no-repeat fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
|||||||
245
root/ws.html
Normal file
245
root/ws.html
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>MetaKit</title>
|
||||||
|
<link rel="stylesheet" href="/res/zui/css/zui.min.css">
|
||||||
|
<link rel="stylesheet" href="/res/css/zui-theme.css">
|
||||||
|
<link rel="stylesheet" href="/res/css/red-kit.css">
|
||||||
|
</head>
|
||||||
|
<body id="home">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<row>
|
||||||
|
<div class="col-md-12" id="top">
|
||||||
|
<div class="logo">
|
||||||
|
<h1>Meta-Kit</h1>
|
||||||
|
</div>
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<!--item in pages-->
|
||||||
|
<li v-for="item in pages" @click="loadMain(item)" :class="{active:item.name==pageId}">
|
||||||
|
<a data-tab href="#" v-text="item.name"></a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="pull-right" title="刷新服务端缓存数据">
|
||||||
|
<a @click="refresh()" href="javascript:;" style="padding: 6px 15px;border: 0;background-color: #404a53;color: #fff;">
|
||||||
|
<i class="icon icon-repeat"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="pull-right">
|
||||||
|
<a @click="logout()" href="javascript:;" style="padding: 6px 15px;border: 0;background-color: #404a53;color: #fff;">
|
||||||
|
<i class="icon icon-user"></i> 退出
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="pull-right">
|
||||||
|
<select v-model="sysPlat" class="form-control" style="border: 0;background-color: #404a53;color: #fff;">
|
||||||
|
<option v-for="item in sysPlats" :value="item" v-text="item.name"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="mainDiv">
|
||||||
|
<div class="col-md-1" id="left">
|
||||||
|
<nav class="menu" data-ride="menu">
|
||||||
|
<ul class="nav nav-primary">
|
||||||
|
<li class="active show nav-parent" style="width: 100%;">
|
||||||
|
<a href="javascript:;"><i class="icon icon-tasks"></i> <span v-text="pageId"></span></a>
|
||||||
|
<ul class="nav">
|
||||||
|
<!-- item in menus -->
|
||||||
|
<li v-for="item in menus" @click="loadPage(item)" :class="{active:page.url==item.url}">
|
||||||
|
<a href="javascript:;"><i :class="['icon', item.icon ? item.icon : 'icon-circle-blank']"></i> <span v-text="item.name"></span></a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-11">
|
||||||
|
<!--<div style="height: 40px;background-color: #fff;"></div>-->
|
||||||
|
<!-- load main body to here -->
|
||||||
|
<div id="main"></div>
|
||||||
|
<div class="footer">
|
||||||
|
Meta-Kit Developer v0.2
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--<script src="https://cdn.jsdelivr.net/npm/vue"></script>-->
|
||||||
|
<script src="/res/libs/vue.min.js"></script>
|
||||||
|
<script src="/res/zui/lib/jquery/jquery.js"></script>
|
||||||
|
<script src="/res/libs/axios.min.js"></script>
|
||||||
|
<script src="/res/zui/js/zui.js"></script>
|
||||||
|
<script src="/res/js/red.js"></script>
|
||||||
|
<script src="/api/meta.js"></script>
|
||||||
|
<script src="/api/plat.js"></script>
|
||||||
|
<script src="/api/qtask.js"></script>
|
||||||
|
<script src="/api/db.js"></script>
|
||||||
|
<script src="/api/table.js"></script>
|
||||||
|
<script src="/api/dict.js"></script>
|
||||||
|
<script src="/api/tmp.js"></script>
|
||||||
|
<script src="/res/zui/lib/sortable/zui.sortable.js"></script>
|
||||||
|
<script src="/res/zui/lib/uploader/zui.uploader.min.js"></script>
|
||||||
|
<script type="module">
|
||||||
|
import { logout } from './api/user.js'
|
||||||
|
let { refresh } = meta
|
||||||
|
let { platList } = plat
|
||||||
|
let { dictData } = dict
|
||||||
|
|
||||||
|
let dictKv = {} //字典数据
|
||||||
|
let vm = new Vue({
|
||||||
|
el: ".container-fluid",
|
||||||
|
data: {
|
||||||
|
sysPlat: red.getData('sysPlat'),
|
||||||
|
sysPlats: red.getData('sysPlats'),
|
||||||
|
pages: [
|
||||||
|
/*{name: "DDL", url: "/qtask/ddl.html"},*/
|
||||||
|
{name: "元服务", url: "/meta", nodes: [
|
||||||
|
/*{url:"/metadata/metatable/list.html", name:"TableList"},*/
|
||||||
|
{url:"/metadata/metatable/metaTable.html", name:"实体管理", icon: "icon-cubes"},
|
||||||
|
/*{url:"/metadata/metatable/import.html", name:"导入实体"},*/
|
||||||
|
{url:"/metadata/metaLink.html", name:"实体关系", icon:"icon-branch"},
|
||||||
|
{url:"/metadata/metaService.html", name:"业务管理", icon: "icon-sliders"},
|
||||||
|
{url:"/metadata/dataList.html", name:"业务预览", icon:"icon-window-alt"},
|
||||||
|
/*{url:"/metadata/dict.html", name:"字典管理", icon:"icon-usecase"},*/
|
||||||
|
{url:"/content/create.html", name:"内容管理", icon:"icon-edit-sign"},
|
||||||
|
/*{url:"/content/list.html", name:"游戏查询", icon:"icon-usecase"},
|
||||||
|
{url:"/content/funs.html", name:"平台功能", icon:"icon-usecase"},*/
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "QTask", url: "/qtask", nodes: [
|
||||||
|
{url:"/qtask/list.html", name:"QTask", icon:"icon-cube-alt"},
|
||||||
|
{url:"/qtask/debug.html", name:"QTask-Debug", icon:"icon-bug"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "其他服务", url: "/plat/db.html", nodes: [
|
||||||
|
{url:"/oth/index.html", name:"业务平台管理", icon: "icon-database"},
|
||||||
|
{url:"/oth/file.html", name:"文件服务", icon: "icon-database"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "业务平台", url: "/qtask", nodes: [
|
||||||
|
{url:"/plat/index.html", name:"业务平台", icon:"icon-server"},
|
||||||
|
{url:"/plat/dev.html", name:"dev", icon:"icon-beaker"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "数据平台", url: "/plat/db.html", nodes: [
|
||||||
|
{url:"/plat/db.html", name:"数据中心", icon: "icon-database"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{name: "关于", url: "/single", nodes: [
|
||||||
|
{url:"/single/about.html", name:"关于MetaKit", icon:"icon-server"},
|
||||||
|
{url:"/single/code.html", name:"整体实现", icon:"icon-server"},
|
||||||
|
{url:"/single/core.html", name:"组件关系", icon:"icon-server"},
|
||||||
|
{url:"/single/metaFlow.html", name:"MetaKit使用", icon:"icon-server"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
menus: {},
|
||||||
|
page: {},
|
||||||
|
pageId: ''
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
page: function () {
|
||||||
|
//page main chenged,up all cache for munus/pageId/page data
|
||||||
|
red.setData("page", this.page);
|
||||||
|
red.setData("menus", this.menus);
|
||||||
|
red.setData("pageId", this.pageId);
|
||||||
|
},
|
||||||
|
sysPlat: function (v) {
|
||||||
|
red.setData("sysPlat", v);
|
||||||
|
this.loadPage();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadPage(page) {
|
||||||
|
if (page && this.page.url == page.url) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
page = page || this.page;
|
||||||
|
this.page = page;
|
||||||
|
$("#main").load(page.url, () => this.showInfo());
|
||||||
|
|
||||||
|
},
|
||||||
|
showInfo() {
|
||||||
|
if (red.getData('userName') === 'root' || red.getData('userName') === 'admin') {
|
||||||
|
$('#main .info').show()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
loadMain(item) {
|
||||||
|
this.menus = item.nodes || [item];
|
||||||
|
this.pageId = item.name;
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
refresh().then(res => {
|
||||||
|
platList().then(res => { // 刷新平台列表缓存
|
||||||
|
let rows = res.rows
|
||||||
|
this.sysPlats = rows
|
||||||
|
red.setData("sysPlats", rows)
|
||||||
|
})
|
||||||
|
this.loadDictData()
|
||||||
|
red.showOk()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
logout() {
|
||||||
|
logout()
|
||||||
|
},
|
||||||
|
|
||||||
|
loadDictData() {
|
||||||
|
|
||||||
|
|
||||||
|
dictData().then(res => {
|
||||||
|
let data = {}
|
||||||
|
for (let k in res) {
|
||||||
|
let vs = {}
|
||||||
|
for(let i in res[k]) {
|
||||||
|
vs[res[k][i]['value']] = res[k][i]['label']
|
||||||
|
}
|
||||||
|
data[k] = vs
|
||||||
|
}
|
||||||
|
red.setData("dictKv", data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
this.loadDictData()
|
||||||
|
|
||||||
|
this.menus = red.getData('menus', this.pages[0]['nodes'])
|
||||||
|
this.page = red.getData('page', this.menus[0])
|
||||||
|
this.pageId = red.getData("pageId", this.page['mame'])
|
||||||
|
//绑定事件
|
||||||
|
$('.menu .nav').on('click', 'li:not(.nav-parent) > a', function() {
|
||||||
|
let $this = $(this);
|
||||||
|
$('.menu .nav .active').removeClass('active');
|
||||||
|
$this.closest('li').addClass('active');
|
||||||
|
$this.closest('.nav-parent').addClass('active');
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#main").load(this.page.url,() => this.showInfo());
|
||||||
|
//this.loadPage(this.page);
|
||||||
|
|
||||||
|
//监听浏览器窗口大小变化
|
||||||
|
function autoLeftHeight() {
|
||||||
|
let h = document.documentElement.clientHeight || document.body.clientHeight;
|
||||||
|
$("#left").attr("style", "height:" + (h - 50) + "px");
|
||||||
|
$("#main").attr("style", "height:" + (h - 90) + "px; overflow: auto;");
|
||||||
|
$(".sheet-cell").attr("style", "height:" + (h - 265) + "px;margin-bottom:20px;");
|
||||||
|
}
|
||||||
|
autoLeftHeight();
|
||||||
|
$(window).resize(function () {
|
||||||
|
autoLeftHeight();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
208
root/zhub/delay.html
Normal file
208
root/zhub/delay.html
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
<div class="alert alert-info with-icon">
|
||||||
|
<i class="icon-flag-checkered"></i>
|
||||||
|
<div class="content">
|
||||||
|
<h4>Delay Message <a class="pull-right" href="javascript:;"><i class="icon-info"/> </a></h4>
|
||||||
|
<hr>
|
||||||
|
<p> 10/3122</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="table table-bordered table-hover" style="width: 100%;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="sort">消息ID</th>
|
||||||
|
<th class="sort">主题</th>
|
||||||
|
<th class="sort">消息</th>
|
||||||
|
<th class="sort">发送时间</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>ktabupfj-12kx</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; WLZ-AL10
|
||||||
|
Build/HUAWEIWLZ-AL10)","androidid":"c91088eb67f2bcad","appos":"android","appversion":"1.1.0","channel":"xxbztoutiao_36","clientid":"kmvy8z8m","guserid":32610,"ip":"111.78.160.154","manufacturer":"HUAWEI","model":"WLZ-AL10","oaid":"db9a776f-ff67-9c9c-fee3-e7fbffefb1f0","offlinetime":0,"onlineseconds":0,"onlinetime":1631034539839,"recordid":"32610-1631034539839","updatetime":1631034539839}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:08:59</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabupoj-12ky</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 8 Pro
|
||||||
|
MIUI/V11.0.3.0.PGGCNXM)","androidid":"10eda96ca0c244a8","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":41045,"imei":"869898044685797","ip":"106.45.158.8","manufacturer":"Xiaomi","model":"Redmi
|
||||||
|
Note 8
|
||||||
|
Pro","oaid":"3e8632ed3341a36d","offlinetime":0,"onlineseconds":0,"onlinetime":1631034540163,"recordid":"41045-1631034540163","updatetime":1631034540163}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:00</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabv2ri-12kz</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034557118,"guserid":17386,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"87aeedaec430490daaadf584a65df6e0","systemversion":"29","type":"DOWN_HAO_APP","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:17</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabv2rp-12l0</td>
|
||||||
|
<td>sdk_down_hao_app</td>
|
||||||
|
<td>{"targetid":"22679","targetuserid":0,"userid":64358}</td>
|
||||||
|
<td>2021-09-08 01:09:17</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabv6h9-12l1</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034561933,"guserid":15265,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"05f7d6d7b3f14d10ba5dc25acd6f89d3","systemversion":"29","type":"LOGIN","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:21</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabve2m-12l2</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034571773,"guserid":15265,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"688d78fc77c94790986493442fc56ea5","systemversion":"29","type":"DOWN_HAO_APP","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:31</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabve2t-12l3</td>
|
||||||
|
<td>sdk_down_hao_app</td>
|
||||||
|
<td>{"targetid":"22679","targetuserid":0,"userid":63264}</td>
|
||||||
|
<td>2021-09-08 01:09:31</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabvihl-12l4</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034577497,"guserid":15265,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"c79a9bd32d704788b7b15bcdd47ac886","systemversion":"29","type":"LOGIN","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:37</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabvtlr-12l5</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; V1945A
|
||||||
|
Build/PKQ1.190626.001)","androidid":"a51440a64f826188","appos":"android","appversion":"1.1.1","channel":"xxbzgdt_15","clientid":"kmvy8z8m","guserid":25264,"imei":"868007046590234","ip":"221.217.178.42","manufacturer":"vivo","model":"V1945A","oaid":"ace2f5773dea8d67a154f9b44bd02d931939378b6a4736b20280b88bcf219c8b","offlinetime":0,"onlineseconds":0,"onlinetime":1631034591902,"recordid":"25264-1631034591902","updatetime":1631034591902}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:51</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabw6yk-12l6</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; EML-AL00
|
||||||
|
Build/HUAWEIEML-AL00)","androidid":"066ec6fc508e2877","appos":"android","appversion":"1.1.1","channel":"xxbzqqq_0","clientid":"kmvy8z8m","guserid":38426,"ip":"223.104.250.170","manufacturer":"HUAWEI","model":"EML-AL00","oaid":"ba377ec8-fff6-9f34-fb1f-bdf56dff7d20","offlinetime":0,"onlineseconds":0,"onlinetime":1631034609212,"recordid":"38426-1631034609212","updatetime":1631034609212}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:09</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwar4-12l7</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 8.0.0; KNT-AL20
|
||||||
|
Build/HUAWEIKNT-AL20)","androidid":"b0e13f2050e3e29a","appos":"android","appversion":"1.1.1","channel":"xxbzbd_0","clientid":"kmvy8z8m","guserid":32665,"imei":"863603037112999","ip":"223.104.63.235","manufacturer":"HUAWEI","model":"KNT-AL20","oaid":"ff5ffffe-76f7-5444-f7dd-9fa5deb76a75","offlinetime":0,"onlineseconds":0,"onlinetime":1631034614128,"recordid":"32665-1631034614128","updatetime":1631034614128}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:14</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwn4e-12l8</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; OXF-AN00
|
||||||
|
Build/HUAWEIOXF-AN00)","androidid":"6640361dcae0c18a","appos":"android","appversion":"1.1.0","channel":"xxbzkuaishou0422_9","clientid":"kmvy8z8m","guserid":20005,"ip":"121.239.208.209","manufacturer":"HUAWEI","model":"OXF-AN00","oaid":"9dbbfddf-fbb5-a48a-dd63-fffdbaf3df62","offlinetime":0,"onlineseconds":0,"onlinetime":1631034630158,"recordid":"20005-1631034630158","updatetime":1631034630158}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:30</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwp37-12l9</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; vivo NEX A
|
||||||
|
Build/QP1A.190711.020)","androidid":"9d17cca826513090","appos":"android","appversion":"1.1.1","channel":"xxbzqqq_0","clientid":"kmvy8z8m","guserid":38992,"ip":"36.128.86.158","manufacturer":"vivo","model":"vivo
|
||||||
|
NEX
|
||||||
|
A","oaid":"dc7e96b4cd8a9e4718565b24dc02181a8e1d3f551eb71c73ad6560e9b6853161","offlinetime":0,"onlineseconds":0,"onlinetime":1631034632707,"recordid":"38992-1631034632707","updatetime":1631034632707}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:32</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwr1x-12la</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; SNE-AL00
|
||||||
|
Build/HUAWEISNE-AL00)","androidid":"c1e5bf34133549f3","appos":"android","appversion":"1.1.1","channel":"xxbzqqq_0","clientid":"kmvy8z8m","guserid":15265,"ip":"183.94.28.13","manufacturer":"HUAWEI","model":"SNE-AL00","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","offlinetime":0,"onlineseconds":0,"onlinetime":1631034635253,"recordid":"15265-1631034635253","updatetime":1631034635253}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:35</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabx6o9-12lb</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>{"appmodel":"Redmi Note 8
|
||||||
|
Pro","appos":"android","apptoken":"3e8632ed3341a36d","channelmark":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","createtime":1631034655496,"guserid":41045,"ip":"106.45.158.8","oaid":"3e8632ed3341a36d","recordid":"d52d6bc6cdf44528986ce9dc716ea20a","systemversion":"28","type":"ANIMATE","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:55</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabxe8e-12lc</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 8 Pro
|
||||||
|
MIUI/V11.0.3.0.PGGCNXM)","androidid":"10eda96ca0c244a8","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":41045,"imei":"869898044685797","ip":"106.45.158.8","manufacturer":"Xiaomi","model":"Redmi
|
||||||
|
Note 8
|
||||||
|
Pro","oaid":"3e8632ed3341a36d","offlinetime":0,"onlineseconds":0,"onlinetime":1631034665293,"recordid":"41045-1631034665293","updatetime":1631034665293}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:11:05</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabxpm4-12ld</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 8.1.0; ONEPLUS A5000
|
||||||
|
Build/OPM1.171019.011)","androidid":"0842a50fa1f1fca2","appos":"android","appversion":"1.1.0","channel":"xxbzhaoyouxi_0","clientid":"kmvy8z8m","guserid":22950,"imei":"866265036244053","ip":"120.42.180.122","manufacturer":"OnePlus","model":"ONEPLUS
|
||||||
|
A5000","offlinetime":0,"onlineseconds":0,"onlinetime":1631034680044,"recordid":"22950-1631034680044","updatetime":1631034680044}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:11:20</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktaby4mn-12le</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 11; M2002J9E
|
||||||
|
Build/RKQ1.200826.002)","androidid":"0d54c9c9cf83e30b","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":40812,"ip":"60.25.158.105","manufacturer":"Xiaomi","model":"M2002J9E","oaid":"f54443e5f13ad788","offlinetime":0,"onlineseconds":0,"onlinetime":1631034699503,"recordid":"40812-1631034699503","updatetime":1631034699503}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:11:39</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabzo3n-12lf</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>{"appmodel":"Redmi Note 8
|
||||||
|
Pro","appos":"android","apptoken":"3e8632ed3341a36d","channelmark":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","createtime":1631034771393,"guserid":41045,"ip":"106.45.158.8","oaid":"3e8632ed3341a36d","recordid":"56b1a079459f46a497131866a3944b14","systemversion":"28","type":"ANIMATE","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:12:51</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabzvnx-12lg</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 8 Pro
|
||||||
|
MIUI/V11.0.3.0.PGGCNXM)","androidid":"10eda96ca0c244a8","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":41045,"imei":"869898044685797","ip":"106.45.158.8","manufacturer":"Xiaomi","model":"Redmi
|
||||||
|
Note 8
|
||||||
|
Pro","oaid":"3e8632ed3341a36d","offlinetime":0,"onlineseconds":0,"onlinetime":1631034781197,"recordid":"41045-1631034781197","updatetime":1631034781197}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:13:01</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
41
root/zhub/monitor.html
Normal file
41
root/zhub/monitor.html
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<div id="monitor">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="alert alert-info with-icon">
|
||||||
|
<i class="icon-rss"></i>
|
||||||
|
<div class="content">
|
||||||
|
<h4>Topics</h4>
|
||||||
|
<hr>
|
||||||
|
<p>1021/1120</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="alert alert-info with-icon">
|
||||||
|
<i class="icon-flag-checkered"></i>
|
||||||
|
<div class="content">
|
||||||
|
<h4>Delay Message <a class="pull-right" href="javascript:;"><i class="icon-info"/> </a></h4>
|
||||||
|
<hr>
|
||||||
|
<p> 10/3122</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="alert alert-info with-icon">
|
||||||
|
<i class="icon-time"></i>
|
||||||
|
<div class="content">
|
||||||
|
<h4>Timers</h4>
|
||||||
|
<hr>
|
||||||
|
<p>126</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var vm = new Vue({
|
||||||
|
el: "#monitor",
|
||||||
|
data: {
|
||||||
|
about: "AbOUT",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
8
root/zhub/timer.html
Normal file
8
root/zhub/timer.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<div class="alert alert-info with-icon">
|
||||||
|
<i class="icon-time"></i>
|
||||||
|
<div class="content">
|
||||||
|
<h4>Timers</h4>
|
||||||
|
<hr>
|
||||||
|
<p>126</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
207
root/zhub/topic.html
Normal file
207
root/zhub/topic.html
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
<div class="alert alert-info with-icon">
|
||||||
|
<i class="icon-rss"></i>
|
||||||
|
<div class="content">
|
||||||
|
<h4>Topics</h4>
|
||||||
|
<hr>
|
||||||
|
<p>1021/1120</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="table table-bordered table-hover" style="width: 100%;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="sort">[消息ID]阿斯顿</th>
|
||||||
|
<th class="sort">[主题]b</th>
|
||||||
|
<th class="sort">[消息]</th>
|
||||||
|
<th class="sort">创建时间</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>ktabupfj-12kx</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; WLZ-AL10
|
||||||
|
Build/HUAWEIWLZ-AL10)","androidid":"c91088eb67f2bcad","appos":"android","appversion":"1.1.0","channel":"xxbztoutiao_36","clientid":"kmvy8z8m","guserid":32610,"ip":"111.78.160.154","manufacturer":"HUAWEI","model":"WLZ-AL10","oaid":"db9a776f-ff67-9c9c-fee3-e7fbffefb1f0","offlinetime":0,"onlineseconds":0,"onlinetime":1631034539839,"recordid":"32610-1631034539839","updatetime":1631034539839}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:08:59</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabupoj-12ky</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 8 Pro
|
||||||
|
MIUI/V11.0.3.0.PGGCNXM)","androidid":"10eda96ca0c244a8","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":41045,"imei":"869898044685797","ip":"106.45.158.8","manufacturer":"Xiaomi","model":"Redmi
|
||||||
|
Note 8
|
||||||
|
Pro","oaid":"3e8632ed3341a36d","offlinetime":0,"onlineseconds":0,"onlinetime":1631034540163,"recordid":"41045-1631034540163","updatetime":1631034540163}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:00</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabv2ri-12kz</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034557118,"guserid":17386,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"87aeedaec430490daaadf584a65df6e0","systemversion":"29","type":"DOWN_HAO_APP","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:17</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabv2rp-12l0</td>
|
||||||
|
<td>sdk_down_hao_app</td>
|
||||||
|
<td>{"targetid":"22679","targetuserid":0,"userid":64358}</td>
|
||||||
|
<td>2021-09-08 01:09:17</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabv6h9-12l1</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034561933,"guserid":15265,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"05f7d6d7b3f14d10ba5dc25acd6f89d3","systemversion":"29","type":"LOGIN","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:21</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabve2m-12l2</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034571773,"guserid":15265,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"688d78fc77c94790986493442fc56ea5","systemversion":"29","type":"DOWN_HAO_APP","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:31</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabve2t-12l3</td>
|
||||||
|
<td>sdk_down_hao_app</td>
|
||||||
|
<td>{"targetid":"22679","targetuserid":0,"userid":63264}</td>
|
||||||
|
<td>2021-09-08 01:09:31</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabvihl-12l4</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>
|
||||||
|
{"appmodel":"SNE-AL00","appos":"android","apptoken":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","channelmark":"xxbzqqq_0","clientid":"kmvy8z8m","createtime":1631034577497,"guserid":15265,"ip":"183.94.28.13","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","recordid":"c79a9bd32d704788b7b15bcdd47ac886","systemversion":"29","type":"LOGIN","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:37</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabvtlr-12l5</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; V1945A
|
||||||
|
Build/PKQ1.190626.001)","androidid":"a51440a64f826188","appos":"android","appversion":"1.1.1","channel":"xxbzgdt_15","clientid":"kmvy8z8m","guserid":25264,"imei":"868007046590234","ip":"221.217.178.42","manufacturer":"vivo","model":"V1945A","oaid":"ace2f5773dea8d67a154f9b44bd02d931939378b6a4736b20280b88bcf219c8b","offlinetime":0,"onlineseconds":0,"onlinetime":1631034591902,"recordid":"25264-1631034591902","updatetime":1631034591902}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:09:51</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabw6yk-12l6</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; EML-AL00
|
||||||
|
Build/HUAWEIEML-AL00)","androidid":"066ec6fc508e2877","appos":"android","appversion":"1.1.1","channel":"xxbzqqq_0","clientid":"kmvy8z8m","guserid":38426,"ip":"223.104.250.170","manufacturer":"HUAWEI","model":"EML-AL00","oaid":"ba377ec8-fff6-9f34-fb1f-bdf56dff7d20","offlinetime":0,"onlineseconds":0,"onlinetime":1631034609212,"recordid":"38426-1631034609212","updatetime":1631034609212}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:09</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwar4-12l7</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 8.0.0; KNT-AL20
|
||||||
|
Build/HUAWEIKNT-AL20)","androidid":"b0e13f2050e3e29a","appos":"android","appversion":"1.1.1","channel":"xxbzbd_0","clientid":"kmvy8z8m","guserid":32665,"imei":"863603037112999","ip":"223.104.63.235","manufacturer":"HUAWEI","model":"KNT-AL20","oaid":"ff5ffffe-76f7-5444-f7dd-9fa5deb76a75","offlinetime":0,"onlineseconds":0,"onlinetime":1631034614128,"recordid":"32665-1631034614128","updatetime":1631034614128}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:14</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwn4e-12l8</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; OXF-AN00
|
||||||
|
Build/HUAWEIOXF-AN00)","androidid":"6640361dcae0c18a","appos":"android","appversion":"1.1.0","channel":"xxbzkuaishou0422_9","clientid":"kmvy8z8m","guserid":20005,"ip":"121.239.208.209","manufacturer":"HUAWEI","model":"OXF-AN00","oaid":"9dbbfddf-fbb5-a48a-dd63-fffdbaf3df62","offlinetime":0,"onlineseconds":0,"onlinetime":1631034630158,"recordid":"20005-1631034630158","updatetime":1631034630158}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:30</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwp37-12l9</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; vivo NEX A
|
||||||
|
Build/QP1A.190711.020)","androidid":"9d17cca826513090","appos":"android","appversion":"1.1.1","channel":"xxbzqqq_0","clientid":"kmvy8z8m","guserid":38992,"ip":"36.128.86.158","manufacturer":"vivo","model":"vivo
|
||||||
|
NEX
|
||||||
|
A","oaid":"dc7e96b4cd8a9e4718565b24dc02181a8e1d3f551eb71c73ad6560e9b6853161","offlinetime":0,"onlineseconds":0,"onlinetime":1631034632707,"recordid":"38992-1631034632707","updatetime":1631034632707}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:32</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabwr1x-12la</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 10; SNE-AL00
|
||||||
|
Build/HUAWEISNE-AL00)","androidid":"c1e5bf34133549f3","appos":"android","appversion":"1.1.1","channel":"xxbzqqq_0","clientid":"kmvy8z8m","guserid":15265,"ip":"183.94.28.13","manufacturer":"HUAWEI","model":"SNE-AL00","oaid":"febed6de-7eff-bcdc-b978-f6f6ebe7bbd0","offlinetime":0,"onlineseconds":0,"onlinetime":1631034635253,"recordid":"15265-1631034635253","updatetime":1631034635253}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:35</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabx6o9-12lb</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>{"appmodel":"Redmi Note 8
|
||||||
|
Pro","appos":"android","apptoken":"3e8632ed3341a36d","channelmark":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","createtime":1631034655496,"guserid":41045,"ip":"106.45.158.8","oaid":"3e8632ed3341a36d","recordid":"d52d6bc6cdf44528986ce9dc716ea20a","systemversion":"28","type":"ANIMATE","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:10:55</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabxe8e-12lc</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 8 Pro
|
||||||
|
MIUI/V11.0.3.0.PGGCNXM)","androidid":"10eda96ca0c244a8","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":41045,"imei":"869898044685797","ip":"106.45.158.8","manufacturer":"Xiaomi","model":"Redmi
|
||||||
|
Note 8
|
||||||
|
Pro","oaid":"3e8632ed3341a36d","offlinetime":0,"onlineseconds":0,"onlinetime":1631034665293,"recordid":"41045-1631034665293","updatetime":1631034665293}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:11:05</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabxpm4-12ld</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 8.1.0; ONEPLUS A5000
|
||||||
|
Build/OPM1.171019.011)","androidid":"0842a50fa1f1fca2","appos":"android","appversion":"1.1.0","channel":"xxbzhaoyouxi_0","clientid":"kmvy8z8m","guserid":22950,"imei":"866265036244053","ip":"120.42.180.122","manufacturer":"OnePlus","model":"ONEPLUS
|
||||||
|
A5000","offlinetime":0,"onlineseconds":0,"onlinetime":1631034680044,"recordid":"22950-1631034680044","updatetime":1631034680044}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:11:20</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktaby4mn-12le</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 11; M2002J9E
|
||||||
|
Build/RKQ1.200826.002)","androidid":"0d54c9c9cf83e30b","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":40812,"ip":"60.25.158.105","manufacturer":"Xiaomi","model":"M2002J9E","oaid":"f54443e5f13ad788","offlinetime":0,"onlineseconds":0,"onlinetime":1631034699503,"recordid":"40812-1631034699503","updatetime":1631034699503}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:11:39</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabzo3n-12lf</td>
|
||||||
|
<td>sdk-record</td>
|
||||||
|
<td>{"appmodel":"Redmi Note 8
|
||||||
|
Pro","appos":"android","apptoken":"3e8632ed3341a36d","channelmark":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","createtime":1631034771393,"guserid":41045,"ip":"106.45.158.8","oaid":"3e8632ed3341a36d","recordid":"56b1a079459f46a497131866a3944b14","systemversion":"28","type":"ANIMATE","version":"1.1.1"}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:12:51</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ktabzvnx-12lg</td>
|
||||||
|
<td>sdk-guser-active</td>
|
||||||
|
<td>{"agent":"Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 8 Pro
|
||||||
|
MIUI/V11.0.3.0.PGGCNXM)","androidid":"10eda96ca0c244a8","appos":"android","appversion":"1.1.1","channel":"xxbz-tt-lcy_4","clientid":"kmvy8z8m","guserid":41045,"imei":"869898044685797","ip":"106.45.158.8","manufacturer":"Xiaomi","model":"Redmi
|
||||||
|
Note 8
|
||||||
|
Pro","oaid":"3e8632ed3341a36d","offlinetime":0,"onlineseconds":0,"onlinetime":1631034781197,"recordid":"41045-1631034781197","updatetime":1631034781197}
|
||||||
|
</td>
|
||||||
|
<td>2021-09-08 01:13:01</td>
|
||||||
|
<td><a href="javascript:;">详情</a> <a href="javascript:;">编辑</a> <a href="javascript:;">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -3,7 +3,7 @@ package net.tccn.base;
|
|||||||
import org.redkale.convert.json.JsonConvert;
|
import org.redkale.convert.json.JsonConvert;
|
||||||
import org.redkale.net.http.RestMapping;
|
import org.redkale.net.http.RestMapping;
|
||||||
import org.redkale.service.Service;
|
import org.redkale.service.Service;
|
||||||
import org.redkale.source.CacheSource;
|
import org.redkale.source.CacheMemorySource;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -25,8 +25,8 @@ public class BaseService implements Service {
|
|||||||
|
|
||||||
public static boolean isWinos = System.getProperty("os.name").contains("Window");
|
public static boolean isWinos = System.getProperty("os.name").contains("Window");
|
||||||
|
|
||||||
@Resource(name = "cacheSource")
|
@Resource(name = "cache")
|
||||||
protected CacheSource cacheSource;
|
protected static CacheMemorySource cacheSource = new CacheMemorySource("cache");
|
||||||
|
|
||||||
@Resource(name = "APP_HOME")
|
@Resource(name = "APP_HOME")
|
||||||
protected File APP_HOME;
|
protected File APP_HOME;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import net.tccn.user.UserService;
|
|||||||
import org.redkale.net.http.HttpRequest;
|
import org.redkale.net.http.HttpRequest;
|
||||||
import org.redkale.net.http.HttpResponse;
|
import org.redkale.net.http.HttpResponse;
|
||||||
import org.redkale.net.http.HttpServlet;
|
import org.redkale.net.http.HttpServlet;
|
||||||
import org.redkale.net.http.HttpUserType;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -15,7 +14,6 @@ import java.util.logging.Logger;
|
|||||||
/**
|
/**
|
||||||
* @author: liangxianyou at 2018/11/8 17:05.
|
* @author: liangxianyou at 2018/11/8 17:05.
|
||||||
*/
|
*/
|
||||||
@HttpUserType(User.class)
|
|
||||||
public class BaseServlet extends HttpServlet {
|
public class BaseServlet extends HttpServlet {
|
||||||
|
|
||||||
@Resource(name = "SERVER_ROOT")
|
@Resource(name = "SERVER_ROOT")
|
||||||
@@ -38,10 +36,15 @@ public class BaseServlet extends HttpServlet {
|
|||||||
|
|
||||||
if (sessionid != null) {
|
if (sessionid != null) {
|
||||||
User user = userService.current(sessionid);
|
User user = userService.current(sessionid);
|
||||||
request.setCurrentUser(user);
|
/*request.setCurrentUserSupplier(() -> {
|
||||||
|
return user;
|
||||||
|
});*/
|
||||||
|
if (user != null) {
|
||||||
|
request.setCurrentUserid(user.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String uri = request.getRequestURI();
|
String uri = request.getRequestURI();
|
||||||
if (uri.endsWith(".html")){
|
if (uri.endsWith(".html")) {
|
||||||
response.finish(new File(webroot + uri));
|
response.finish(new File(webroot + uri));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -51,8 +54,8 @@ public class BaseServlet extends HttpServlet {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void authenticate(HttpRequest request, HttpResponse response) throws IOException {
|
protected void authenticate(HttpRequest request, HttpResponse response) throws IOException {
|
||||||
//fixme: 权限拦截
|
//fixme: 权限拦截
|
||||||
if (request.currentUser() == null) {
|
if (request.currentUserid(String.class) == null) {
|
||||||
String accept = request.getHeader("Accept");
|
String accept = request.getHeader("Accept");
|
||||||
if ("XMLHttpRequest".equals(request.getHeader("X-Requested-With")) || (accept != null && accept.contains("application/json"))) {
|
if ("XMLHttpRequest".equals(request.getHeader("X-Requested-With")) || (accept != null && accept.contains("application/json"))) {
|
||||||
response.finish(JBean.by(-2, "未登陆"));
|
response.finish(JBean.by(-2, "未登陆"));
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package net.tccn.base;
|
|||||||
|
|
||||||
import com.jfinal.kit.Kv;
|
import com.jfinal.kit.Kv;
|
||||||
import com.jfinal.template.Engine;
|
import com.jfinal.template.Engine;
|
||||||
|
import org.redkale.convert.json.JsonConvert;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -17,6 +19,8 @@ import static java.util.Arrays.asList;
|
|||||||
*/
|
*/
|
||||||
public final class FileKit {
|
public final class FileKit {
|
||||||
|
|
||||||
|
protected static final JsonConvert convert = JsonConvert.root();
|
||||||
|
|
||||||
private FileKit() {
|
private FileKit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,15 +40,30 @@ public final class FileKit {
|
|||||||
if (!file.getParentFile().exists()) {
|
if (!file.getParentFile().exists()) {
|
||||||
file.getParentFile().mkdirs();
|
file.getParentFile().mkdirs();
|
||||||
}
|
}
|
||||||
try (
|
try (FileOutputStream out = new FileOutputStream(file)) {
|
||||||
FileOutputStream out = new FileOutputStream(file);
|
|
||||||
) {
|
|
||||||
out.write(entityBody.getBytes("UTF-8"));
|
out.write(entityBody.getBytes("UTF-8"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void append(String str, File file) {
|
||||||
|
if (!file.getParentFile().exists()) {
|
||||||
|
file.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
try (FileOutputStream out = new FileOutputStream(file, true)) {
|
||||||
|
out.write(str.getBytes("UTF-8"));
|
||||||
|
if (!str.endsWith("\n")) {
|
||||||
|
out.write("\n".getBytes("UTF-8"));
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拷贝文件/文件目录
|
* 拷贝文件/文件目录
|
||||||
*
|
*
|
||||||
@@ -134,6 +153,27 @@ public final class FileKit {
|
|||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String readAll(File file) {
|
||||||
|
StringBuffer buf = new StringBuffer();
|
||||||
|
String str;
|
||||||
|
try (
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)))
|
||||||
|
) {
|
||||||
|
while ((str = reader.readLine()) != null) {
|
||||||
|
buf.append(str + "\n");
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static <T> T readAs(File file, Type typeToken) throws IOException {
|
||||||
|
String str = readAll(file);
|
||||||
|
return convert.convertFrom(typeToken, str);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 渲染模板到文件
|
* 渲染模板到文件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.redkale.util.Comment;
|
|||||||
import org.redkale.util.TypeToken;
|
import org.redkale.util.TypeToken;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
@@ -73,47 +73,54 @@ public final class MetaKit {
|
|||||||
reload(t.getClass(), t.getKey());
|
reload(t.getClass(), t.getKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends Doc> void reload(Class<T> clazz, String key) {
|
public static void main(String[] args) throws IOException {
|
||||||
|
Type type = new TypeToken<List<DbAccount>>() {
|
||||||
|
}.getType();
|
||||||
|
dbPlats = FileKit.readAs(new File("D:\\Java\\meta-kit\\conf\\data\\DbAccount.json"), type);
|
||||||
|
//convert.convertFrom(type,"[{\"catalogs\":[\"test\"],\"cate\":\"mysql\",\"id\":\"db_plat/67275393\",\"key\":\"67275393\",\"name\":\"ylz测试\",\"url\":\"jdbc:mysql://119.3.106.117:3306\",\"user\":\"root\"},{\"catalogs\":[\"v09x_platf_core\"],\"cate\":\"mysql\",\"id\":\"db_plat/67275392\",\"key\":\"67275392\",\"name\":\"platf_qc\",\"url\":\"jdbc:mysql://121.196.17.55:6063\",\"user\":\"root\"},{\"catalogs\":[\"official_core\",\"official_ipci\",\"v09x_platf_core\",\"platf_quest\",\"platf_pay\",\"platf_mall\",\"platf_oth\",\"platf_im\",\"z_core\"],\"cate\":\"mysql\",\"id\":\"db_plat/67275391\",\"key\":\"67275391\",\"name\":\"platf_pro\",\"url\":\"jdbc:mysql://122.112.180.156:6033\",\"user\":\"guest\"},{\"catalogs\":[\"db_diamond\"],\"id\":\"db_plat/53533152\",\"key\":\"53533152\",\"name\":\"钻石项目\",\"url\":\"jdbc:mysql://192.168.201.51:3306/db_diamond?characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false\",\"user\":\"root\"},{\"catalogs\":[\"db_diamond\"],\"id\":\"db_plat/53532996\",\"key\":\"53532996\",\"name\":\"钻石项目\",\"url\":\"jdbc:mysql://192.168.201.51:3306/db_diamond?characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false\",\"user\":\"root\"},{\"catalogs\":[\"platf_im\",\"v09x_platf_core\",\"platf_oss\",\"platf_quest\",\"platf_oth\",\"sport_oss\",\"zhub\",\"cpg_core\",\"z_core\",\"z_config\",\"z_im\",\"z_mall\",\"z_quest\",\"z_oss\",\"z_oth\",\"cmt_oss\",\"cmt_depot_core\",\"cmt_core\",\"sport_core\"],\"cate\":\"mysql\",\"id\":\"db_plat/52481174\",\"key\":\"52481174\",\"name\":\"platf_dev\",\"url\":\"jdbc:mysql://47.111.150.118:6063\",\"user\":\"root\"},{\"catalogs\":[],\"cate\":\"mysql\",\"id\":\"db_plat/4375768\",\"key\":\"4375768\",\"name\":\"mysql数据库\",\"url\":\"jdbc:mysql://192.168.50.124:3306/mytest?characterEncoding=utf-8&autoReconnect=true&useSSL=false&connectTimeout=3000\",\"user\":\"root\"},{\"catalogs\":[],\"cate\":\"mysql\",\"id\":\"db_plat/4267761\",\"key\":\"4267761\",\"name\":\"测试\",\"remark\":\"sadfdsaf\",\"url\":\"123&connectTimeout=5000\",\"user\":\"root\"},{\"catalogs\":[\"db_art\",\"db_jsons_bbs\",\"db_mater\",\"db_redbbs\",\"jfly\",\"redbbs_dev\",\"meta_kit_test\"],\"cate\":\"mysql\",\"id\":\"db_plat/3321254\",\"key\":\"3321254\",\"name\":\"测试-DB【可用】\",\"url\":\"jdbc:mysql://120.24.230.60:3306/redbbs?characterEncoding=utf-8&autoReconnect=true&useSSL=false&connectTimeout=3000\",\"user\":\"guest\"},{\"catalogs\":[\"blockchain\",\"gxbii_dev\",\"gxbii_all\",\"gxbii_cmd\",\"fzexp\",\"db_fz\",\"a_test\",\"meta_xx\",\"ipsm_v4\"],\"cate\":\"mysql\",\"id\":\"db_plat/3305916\",\"key\":\"3305916\",\"name\":\"测试库-11测试库【可用】\",\"remark\":\"描述\",\"url\":\"jdbc:mysql://192.168.202.11:3306/gxbii_dev?characterEncoding=utf-8&autoReconnect=true&connectTimeout=3000\",\"user\":\"root\"},{\"catalogs\":[\"ipsm_v4\"],\"cate\":\"mysql\",\"id\":\"db_plat/32822760\",\"key\":\"32822760\",\"name\":\"ceshi1111\",\"url\":\"jdbc:mysql://192.168.202.11:3306/ipsm_v4?characterEncoding=utf-8&autoReconnect=true\",\"user\":\"root\"},{\"catalogs\":[\"zbd_v1\"],\"cate\":\"mysql\",\"id\":\"db_plat/27166384\",\"key\":\"27166384\",\"name\":\"测试1\",\"url\":\"jdbc:mysql://192.168.50.124:3306/mytest?characterEncoding=utf-8&autoReconnect=true&useSSL=false&connectTimeout=3000\",\"user\":\"root\"},{\"catalogs\":[],\"cate\":\"mysql\",\"id\":\"db_plat/25668979\",\"key\":\"25668979\",\"name\":\"测试Mysql数据库\",\"url\":\"jdbc:mysql://558cfc37a10ef.sh.cdb.myqcloud.com:3817/demo?autoReconnect=true\",\"user\":\"cdb_outerroot\"},{\"catalogs\":[],\"cate\":\"localApi\",\"id\":\"db_plat/23090860\",\"key\":\"23090860\",\"name\":\"平台本地API\"},{\"catalogs\":[],\"cate\":\"http\",\"id\":\"db_plat/21561306\",\"key\":\"21561306\",\"name\":\"http地址调用\",\"url\":\"http://127.0.0.1/plat/db_list\"},{\"catalogs\":[\"tc\",\"tc_bbs\",\"redbbs\",\"redoss\",\"material\",\"keeper_dev\",\"art123\",\"keeper\",\"db_party\"],\"cate\":\"mysql\",\"id\":\"db_plat/21558770\",\"key\":\"21558770\",\"name\":\"TX-cloud\",\"url\":\"jdbc:mysql://558cfc37a10ef.sh.cdb.myqcloud.com:3817/demo?autoReconnect=true\",\"user\":\"cdb_outerroot\"},{\"catalogs\":[\"feature_test\",\"intelligence\",\"ma\",\"mysql\",\"ma1\",\"ma2\",\"maintenance\",\"zhaobiao\",\"zhaobiao2\"],\"cate\":\"mysql\",\"id\":\"db_plat/21449811\",\"key\":\"21449811\",\"name\":\"物联网-jj【可用】\",\"url\":\"jdbc:mysql://192.168.50.21:3306/wlw?characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai\",\"user\":\"root\"},{\"catalogs\":[],\"id\":\"db_plat/20982257\",\"key\":\"20982257\",\"name\":\"数据平台abc\",\"remark\":\"sadfdsaf\",\"url\":\"123&connectTimeout=5000\",\"user\":\"root\"}]");
|
||||||
|
System.out.println(dbPlats.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T extends Doc> void reload(Class<T> clazz, String key) {
|
||||||
try {
|
try {
|
||||||
File file = new File(String.format("%s%s.json", dataPath, clazz.getSimpleName()));
|
File file = new File(String.format("%s%s.json", dataPath, clazz.getSimpleName()));
|
||||||
if ("file".equals(dcate)) {
|
if ("file".equals(dcate)) {
|
||||||
if (MetaTable.class == clazz) {
|
if (MetaTable.class == clazz) {
|
||||||
Type type = new TypeToken<List<MetaTable>>() {
|
Type type = new TypeToken<List<MetaTable>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
metaTables = convert.convertFrom(type, new FileInputStream(file));
|
metaTables = FileKit.readAs(file, type);
|
||||||
} else if (MetaLink.class == clazz) {
|
} else if (MetaLink.class == clazz) {
|
||||||
Type type = new TypeToken<List<MetaLink>>() {
|
Type type = new TypeToken<List<MetaLink>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
metaLinks = convert.convertFrom(type, new FileInputStream(file));
|
metaLinks = FileKit.readAs(file, type);;
|
||||||
} else if (MetaService.class == clazz) {
|
} else if (MetaService.class == clazz) {
|
||||||
Type type = new TypeToken<List<MetaService>>() {
|
Type type = new TypeToken<List<MetaService>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
metaServices = convert.convertFrom(type, new FileInputStream(file));
|
metaServices = FileKit.readAs(file, type);;
|
||||||
} else if (DbAccount.class == clazz) {
|
} else if (DbAccount.class == clazz) {
|
||||||
Type type = new TypeToken<List<DbAccount>>() {
|
Type type = new TypeToken<List<DbAccount>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
dbPlats = convert.convertFrom(type, new FileInputStream(file));
|
dbPlats = FileKit.readAs(file, type);
|
||||||
} else if (DbPlat.class == clazz) {
|
} else if (DbPlat.class == clazz) {
|
||||||
Type type = new TypeToken<List<DbAccount>>() {
|
Type type = new TypeToken<List<DbAccount>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
dbPlats = convert.convertFrom(type, new FileInputStream(file));
|
dbPlats = FileKit.readAs(file, type);;
|
||||||
} else if (SysPlat.class == clazz) {
|
} else if (SysPlat.class == clazz) {
|
||||||
Type type = new TypeToken<List<SysPlat>>() {
|
Type type = new TypeToken<List<SysPlat>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
sysPlats = convert.convertFrom(type, new FileInputStream(file));
|
sysPlats = FileKit.readAs(file, type);;
|
||||||
} else if (User.class == clazz) {
|
} else if (User.class == clazz) {
|
||||||
Type type = new TypeToken<List<User>>() {
|
Type type = new TypeToken<List<User>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
users = convert.convertFrom(type, new FileInputStream(file));
|
users = FileKit.readAs(file, type);;
|
||||||
} else if (TaskEntity.class == clazz) {
|
} else if (TaskEntity.class == clazz) {
|
||||||
Type type = new TypeToken<List<TaskEntity>>() {
|
Type type = new TypeToken<List<TaskEntity>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
taskEntities = convert.convertFrom(type, new FileInputStream(file));
|
taskEntities = FileKit.readAs(file, type);;
|
||||||
} else if (Dict.class == clazz) {
|
} else if (Dict.class == clazz) {
|
||||||
Type type = new TypeToken<List<Dict>>() {
|
Type type = new TypeToken<List<Dict>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
dicts = convert.convertFrom(type, new FileInputStream(file));
|
dicts = FileKit.readAs(file, type);;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (MetaTable.class == clazz) metaTables = MetaTable.dao.find();
|
if (MetaTable.class == clazz) metaTables = MetaTable.dao.find();
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* @author: liangxianyou
|
* @author: liangxianyou
|
||||||
*/
|
*/
|
||||||
public class MetaRender implements HttpRender<HttpScope> {
|
public class MetaRender implements HttpRender {
|
||||||
@Override
|
@Override
|
||||||
public void init(HttpContext context, AnyValue config) {
|
public void init(HttpContext context, AnyValue config) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <V extends HttpScope> void renderTo(HttpRequest request, HttpResponse response, Convert convert, V scope) {
|
public void renderTo(HttpRequest request, HttpResponse response, Convert convert, HttpScope scope) {
|
||||||
String referid = scope.getReferid();
|
String referid = scope.getReferid();
|
||||||
Map<String, Object> attr = scope.getAttributes();
|
Map<String, Object> attr = scope.getAttributes();
|
||||||
if ("excel".equals(referid)) {
|
if ("excel".equals(referid)) {
|
||||||
@@ -53,9 +53,4 @@ public class MetaRender implements HttpRender<HttpScope> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Class<HttpScope> getType() {
|
|
||||||
return HttpScope.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,18 @@ public class DbExecutors {
|
|||||||
List<Map> rows = listFuture.get();
|
List<Map> rows = listFuture.get();
|
||||||
Integer total = countFuture.get();
|
Integer total = countFuture.get();
|
||||||
|
|
||||||
|
/*rows.forEach(x -> {
|
||||||
|
x.forEach((k,v) -> {
|
||||||
|
if ("[B".equals(v.getClass().getName())) {
|
||||||
|
try {
|
||||||
|
//System.out.println(k + " : " + new String((byte[]) v, "UTF-8"));
|
||||||
|
x.put(k, new String((byte[]) v, "UTF-8"));
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});*/
|
||||||
return PageBean.by(rows, total);
|
return PageBean.by(rows, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ package net.tccn.base.dbq.jdbc.api;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.tccn.base.arango.Doc;
|
import net.tccn.base.arango.Doc;
|
||||||
|
import org.redkale.convert.ConvertColumn;
|
||||||
|
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据库平台
|
* 数据库平台
|
||||||
|
*
|
||||||
* @author: liangxianyou at 2018/11/14 12:58.
|
* @author: liangxianyou at 2018/11/14 12:58.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@@ -23,6 +25,7 @@ public class DbAccount extends Doc<DbAccount> {
|
|||||||
private String[] catalogs; //库
|
private String[] catalogs; //库
|
||||||
|
|
||||||
//----------------------------
|
//----------------------------
|
||||||
|
private boolean tmp; // TODO: 处理临时连接对象
|
||||||
|
|
||||||
public String accountKey() {
|
public String accountKey() {
|
||||||
int start = url.indexOf("//") + 2;
|
int start = url.indexOf("//") + 2;
|
||||||
@@ -32,6 +35,11 @@ public class DbAccount extends Doc<DbAccount> {
|
|||||||
endDef = url.length();
|
endDef = url.length();
|
||||||
}
|
}
|
||||||
String host = url.substring(start, end == -1 ? url.length() : end);
|
String host = url.substring(start, end == -1 ? url.length() : end);
|
||||||
return user + "@" + host;
|
return user + ":" + pwd + "@" + host;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConvertColumn(ignore = true)
|
||||||
|
public String getPwd() {
|
||||||
|
return pwd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.tccn.base.dbq.jdbc.api;
|
package net.tccn.base.dbq.jdbc.api;
|
||||||
|
|
||||||
|
import net.tccn.base.MetaKit;
|
||||||
import net.tccn.base.Utils;
|
import net.tccn.base.Utils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -9,7 +10,7 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
* Db 最终执行层
|
* Db 最终执行层
|
||||||
* Created by liangxianyou at 2019/3/12 14:11.
|
* Created by liangxianyou at 2019/3/12 14:11.
|
||||||
*/
|
*/
|
||||||
public class DbKit implements DbSource{
|
public class DbKit implements DbSource {
|
||||||
|
|
||||||
private DbAccount dbAccount;
|
private DbAccount dbAccount;
|
||||||
private DbSource dbSource;
|
private DbSource dbSource;
|
||||||
@@ -31,6 +32,11 @@ public class DbKit implements DbSource{
|
|||||||
this.catalog = catalog;
|
this.catalog = catalog;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (Utils.isEmpty(dbAccount.getPwd())) {
|
||||||
|
DbAccount account = MetaKit.getDbPlat(dbAccount.getKey());
|
||||||
|
dbAccount.setPwd(account.getPwd());
|
||||||
|
}
|
||||||
|
|
||||||
DbSource dbSource = Utils.getDbSource(DbSource.class, dbAccount.getCate());
|
DbSource dbSource = Utils.getDbSource(DbSource.class, dbAccount.getCate());
|
||||||
dbSource.setDbAccount(dbAccount);
|
dbSource.setDbAccount(dbAccount);
|
||||||
dbSource.setCatalog(catalog);
|
dbSource.setCatalog(catalog);
|
||||||
@@ -87,12 +93,15 @@ public class DbKit implements DbSource{
|
|||||||
public <T> CompletableFuture<T> findfirstAsync(String sql, Class<T> type) {
|
public <T> CompletableFuture<T> findfirstAsync(String sql, Class<T> type) {
|
||||||
return CompletableFuture.supplyAsync(() -> findFirst(sql, type));
|
return CompletableFuture.supplyAsync(() -> findFirst(sql, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> CompletableFuture<List<T>> findListAsync(String sql, Class<T> type) {
|
public <T> CompletableFuture<List<T>> findListAsync(String sql, Class<T> type) {
|
||||||
return CompletableFuture.supplyAsync(() -> findList(sql, type));
|
return CompletableFuture.supplyAsync(() -> findList(sql, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> CompletableFuture<T> queryColumnAsync(String sql, Class<T> type) {
|
public <T> CompletableFuture<T> queryColumnAsync(String sql, Class<T> type) {
|
||||||
return CompletableFuture.supplyAsync(() -> findColumn(sql, type));
|
return CompletableFuture.supplyAsync(() -> findColumn(sql, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompletableFuture<Void> exetuteAsync(String sql) {
|
public CompletableFuture<Void> exetuteAsync(String sql) {
|
||||||
return CompletableFuture.runAsync(() -> exetute(sql));
|
return CompletableFuture.runAsync(() -> exetute(sql));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ public class RunTest<T> {
|
|||||||
|
|
||||||
//@Test
|
//@Test
|
||||||
public void cacheMemorySourceTest() {
|
public void cacheMemorySourceTest() {
|
||||||
CacheMemorySource source = new CacheMemorySource();
|
CacheMemorySource source = new CacheMemorySource("");
|
||||||
//MetaKit.dcate = "db";
|
//MetaKit.dcate = "db";
|
||||||
//MetaKit.init();
|
//MetaKit.init();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user