Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
b3ddb372
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1195
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
b3ddb372
编写于
10月 23, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
组件添加完成
上级
d702da98
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
326 addition
and
100 deletion
+326
-100
skyeye-common/pom.xml
skyeye-common/pom.xml
+5
-0
skyeye-common/src/main/java/com/skyeye/common/constans/Constants.java
...n/src/main/java/com/skyeye/common/constans/Constants.java
+6
-0
skyeye-common/src/main/java/com/skyeye/common/util/ToolUtil.java
...common/src/main/java/com/skyeye/common/util/ToolUtil.java
+25
-0
skyeye-dao/src/main/java/com/skyeye/smprogram/dao/RmGroupMemberDao.java
.../main/java/com/skyeye/smprogram/dao/RmGroupMemberDao.java
+4
-0
skyeye-service/pom.xml
skyeye-service/pom.xml
+4
-0
skyeye-service/src/main/java/com/skyeye/common/service/CommonService.java
...rc/main/java/com/skyeye/common/service/CommonService.java
+2
-0
skyeye-service/src/main/java/com/skyeye/common/service/impl/CommonServiceImpl.java
...ava/com/skyeye/common/service/impl/CommonServiceImpl.java
+122
-20
skyeye-service/src/main/java/com/skyeye/smprogram/service/RmGroupMemberService.java
...va/com/skyeye/smprogram/service/RmGroupMemberService.java
+2
-0
skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmGroupMemberServiceImpl.java
...yeye/smprogram/service/impl/RmGroupMemberServiceImpl.java
+29
-0
skyeye-web/pom.xml
skyeye-web/pom.xml
+1
-21
skyeye-web/src/main/java/com/skyeye/common/controller/CommonController.java
...n/java/com/skyeye/common/controller/CommonController.java
+16
-0
skyeye-web/src/main/java/com/skyeye/smprogram/controller/RmGroupMemberController.java
.../skyeye/smprogram/controller/RmGroupMemberController.java
+16
-0
skyeye-web/src/main/resources/dbmapper/RmGroupMemberMapper.xml
...e-web/src/main/resources/dbmapper/RmGroupMemberMapper.xml
+17
-1
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+31
-18
skyeye-web/src/main/resources/properties/log4j.properties
skyeye-web/src/main/resources/properties/log4j.properties
+3
-3
skyeye-web/src/main/resources/spring/springmvc.xml
skyeye-web/src/main/resources/spring/springmvc.xml
+2
-2
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
+2
-0
skyeye-web/src/main/webapp/assets/lib/layui/layui.js
skyeye-web/src/main/webapp/assets/lib/layui/layui.js
+1
-1
skyeye-web/src/main/webapp/assets/smpropic/1540288098008.png
skyeye-web/src/main/webapp/assets/smpropic/1540288098008.png
+0
-0
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberadd.js
...-web/src/main/webapp/js/rmgroupmember/rmgroupmemberadd.js
+33
-32
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberlist.js
...web/src/main/webapp/js/rmgroupmember/rmgroupmemberlist.js
+3
-1
skyeye-web/src/main/webapp/toolUtil.txt
skyeye-web/src/main/webapp/toolUtil.txt
+2
-1
未找到文件。
skyeye-common/pom.xml
浏览文件 @
b3ddb372
...
...
@@ -99,5 +99,10 @@
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
</dependency>
<!-- 上传 -->
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
skyeye-common/src/main/java/com/skyeye/common/constans/Constants.java
浏览文件 @
b3ddb372
...
...
@@ -78,5 +78,11 @@ public class Constants {
*/
public
static
final
String
SYS_MENU_OPEN_TYPE_IS_IFRAME
=
"1"
;
public
static
final
String
SYS_MENU_OPEN_TYPE_IS_HTML
=
"2"
;
/**
* 项目web层名称
*/
public
static
final
String
PROJECT_WEB
=
"\\skyeye\\skyeye-web"
;
}
skyeye-common/src/main/java/com/skyeye/common/util/ToolUtil.java
浏览文件 @
b3ddb372
package
com.skyeye.common.util
;
import
java.io.File
;
import
java.security.MessageDigest
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
...
...
@@ -406,6 +407,30 @@ public class ToolUtil {
String
path
=
contextPath
+
"/properties/ip.properties"
;
return
path
;
}
/**
* 删除单个文件
*
* @param fileName
* 要删除的文件的文件名
* @return 单个文件删除成功返回true,否则返回false
*/
public
static
boolean
deleteFile
(
String
fileName
)
{
File
file
=
new
File
(
fileName
);
// 如果文件路径所对应的文件存在,并且是一个文件,则直接删除
if
(
file
.
exists
()
&&
file
.
isFile
())
{
if
(
file
.
delete
())
{
System
.
out
.
println
(
"删除单个文件"
+
fileName
+
"成功!"
);
return
true
;
}
else
{
System
.
out
.
println
(
"删除单个文件"
+
fileName
+
"失败!"
);
return
false
;
}
}
else
{
System
.
out
.
println
(
"删除单个文件失败:"
+
fileName
+
"不存在!"
);
return
false
;
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
str
=
"123456"
;
...
...
skyeye-dao/src/main/java/com/skyeye/smprogram/dao/RmGroupMemberDao.java
浏览文件 @
b3ddb372
...
...
@@ -9,4 +9,8 @@ public interface RmGroupMemberDao {
public
List
<
Map
<
String
,
Object
>>
queryRmGroupMemberList
(
Map
<
String
,
Object
>
map
,
PageBounds
pageBounds
)
throws
Exception
;
public
Map
<
String
,
Object
>
queryRmGroupMemberISTop
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
insertRmGroupMemberMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-service/pom.xml
浏览文件 @
b3ddb372
...
...
@@ -8,11 +8,13 @@
</parent>
<artifactId>
skyeye-service
</artifactId>
<dependencies>
<dependency>
<groupId>
com.eve
</groupId>
<artifactId>
skyeye-dao
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>
org.springframework
</groupId>
...
...
@@ -51,6 +53,7 @@
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
</dependency>
<!-- servlet -->
<dependency>
<groupId>
javax.servlet
</groupId>
...
...
@@ -66,5 +69,6 @@
<artifactId>
skyeye-common
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
skyeye-service/src/main/java/com/skyeye/common/service/CommonService.java
浏览文件 @
b3ddb372
...
...
@@ -7,4 +7,6 @@ public interface CommonService {
public
void
uploadFile
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
uploadFileBase64
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/common/service/impl/CommonServiceImpl.java
浏览文件 @
b3ddb372
package
com.skyeye.common.service.impl
;
import
java.io.B
ufferedOut
putStream
;
import
java.io.B
yteArrayIn
putStream
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Map
;
import
org.apache.commons.codec.binary.Base64
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.multipart.commons.CommonsMultipartResolver
;
import
com.skyeye.common.constans.Constants
;
import
com.skyeye.common.dao.CommonDao
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
...
...
@@ -32,26 +35,125 @@ public class CommonServiceImpl implements CommonService{
* @return void 返回类型
* @throws
*/
@SuppressWarnings
(
"static-access"
)
@SuppressWarnings
(
{
"static-access"
,
"rawtypes"
}
)
@Override
public
void
uploadFile
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
// 将当前上下文初始化给 CommonsMutipartResolver (多部分解析器)
CommonsMultipartResolver
multipartResolver
=
new
CommonsMultipartResolver
(
inputObject
.
getRequest
().
getSession
().
getServletContext
());
// 检查form中是否有enctype="multipart/form-data"
System
.
out
.
println
(
inputObject
.
getRequest
().
getContentType
());
if
(
multipartResolver
.
isMultipart
(
inputObject
.
getRequest
()))
{
// 将request变成多部分request
MultipartHttpServletRequest
multiRequest
=
(
MultipartHttpServletRequest
)
inputObject
.
getRequest
();
// 获取multiRequest 中所有的文件名
Iterator
iter
=
multiRequest
.
getFileNames
();
while
(
iter
.
hasNext
())
{
// 一次遍历所有文件
MultipartFile
file
=
multiRequest
.
getFile
(
iter
.
next
().
toString
());
if
(
file
!=
null
)
{
String
tPath
=
inputObject
.
getRequest
().
getSession
().
getServletContext
().
getRealPath
(
"/"
);
String
basePath
=
tPath
.
substring
(
0
,
inputObject
.
getRequest
().
getSession
().
getServletContext
().
getRealPath
(
"/"
).
indexOf
(
Constants
.
PROJECT_WEB
));
File
pack
=
new
File
(
basePath
);
if
(!
pack
.
isDirectory
()){
//目录不存在
pack
.
mkdir
();
//创建目录
}
String
path
=
basePath
+
file
.
getOriginalFilename
();
// 上传
file
.
transferTo
(
new
File
(
path
));
}
List
<
MultipartFile
>
files
=((
MultipartHttpServletRequest
)
inputObject
.
getRequest
()).
getFiles
(
"file"
);
MultipartFile
file
=
null
;
BufferedOutputStream
stream
=
null
;
String
names
=
""
;
for
(
int
i
=
0
;
i
<
files
.
size
();
++
i
)
{
file
=
files
.
get
(
i
);
if
(!
file
.
isEmpty
())
{
String
fileName
=
file
.
getOriginalFilename
();
String
suffix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
String
filePath
=
System
.
currentTimeMillis
()+
suffix
;
File
f
=
new
File
(
""
);
if
(!
f
.
exists
()){
f
.
mkdirs
();
}
}
}
}
/**
*
* @Title: uploadFileBase64
* @Description: 上传文件Base64
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@SuppressWarnings
(
"static-access"
)
@Override
public
void
uploadFileBase64
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
int
type
=
Integer
.
parseInt
(
map
.
get
(
"type"
).
toString
());
String
tPath
=
inputObject
.
getRequest
().
getSession
().
getServletContext
().
getRealPath
(
"/"
);
String
basePath
=
""
;
String
dataPrix
=
""
;
String
data
=
""
;
//数据
String
imgStr
=
map
.
get
(
"images"
).
toString
();
imgStr
=
imgStr
.
replaceAll
(
"\\+"
,
"%2B"
).
replaceAll
(
" "
,
"+"
);
boolean
a
=
false
;
//判断后缀是否为图片
String
fileType
=
null
;
//文件后缀
String
[]
d
=
imgStr
.
split
(
"base64,"
);
//决定存储路径
switch
(
type
)
{
case
1
:
//小程序上传
basePath
=
tPath
+
"\\assets\\smpropic"
;
break
;
default
:
basePath
=
tPath
.
substring
(
0
,
inputObject
.
getRequest
().
getSession
().
getServletContext
().
getRealPath
(
"/"
).
indexOf
(
Constants
.
PROJECT_WEB
));
break
;
}
//上传数据是否合法
if
(
d
!=
null
&&
d
.
length
==
2
){
dataPrix
=
d
[
0
];
data
=
d
[
1
];
//获取上传图片后缀并判断数据是否合法
if
(
"data:image/jpeg;"
.
equalsIgnoreCase
(
dataPrix
)){
//data:image/jpeg;base64,base64编码的jpeg图片数据
fileType
=
"jpg"
;
a
=
true
;
}
else
if
(
"data:image/x-icon;"
.
equalsIgnoreCase
(
dataPrix
)){
//data:image/x-icon;base64,base64编码的icon图片数据
fileType
=
"ico"
;
a
=
true
;
}
else
if
(
"data:image/gif;"
.
equalsIgnoreCase
(
dataPrix
)){
//data:image/gif;base64,base64编码的gif图片数据
fileType
=
"gif"
;
a
=
true
;
}
else
if
(
"data:image/png;"
.
equalsIgnoreCase
(
dataPrix
)){
//data:image/png;base64,base64编码的png图片数据
fileType
=
"png"
;
a
=
true
;
}
else
{
outputObject
.
setreturnMessage
(
"文件类型不正确,只允许上传jpg,png,jpeg格式的图片"
);
}
if
(
a
){
try
{
Base64
base64
=
new
Base64
();
byte
[]
bytes
=
base64
.
decodeBase64
(
new
String
(
data
).
getBytes
());
File
dirname
=
new
File
(
basePath
);
if
(!
dirname
.
isDirectory
())
// 目录不存在
dirname
.
mkdirs
();
// 创建目录
// 自定义的文件名称
String
trueFileName
=
String
.
valueOf
(
System
.
currentTimeMillis
())
+
"."
+
fileType
;
// 设置存放图片文件的路径
String
path
=
basePath
+
"\\"
+
trueFileName
;
ByteArrayInputStream
in
=
new
ByteArrayInputStream
(
bytes
);
byte
[]
buffer
=
new
byte
[
1024
];
FileOutputStream
out
=
new
FileOutputStream
(
path
);
int
byteread
;
while
((
byteread
=
in
.
read
(
buffer
))
>
0
)
{
out
.
write
(
buffer
,
0
,
byteread
);
// 文件写操作
}
out
.
flush
();
out
.
close
();
Map
<
String
,
Object
>
bean
=
new
HashMap
<>();
bean
.
put
(
"picUrl"
,
trueFileName
);
bean
.
put
(
"type"
,
type
);
outputObject
.
setBean
(
bean
);
}
catch
(
Exception
e
)
{
}
}
else
{
outputObject
.
setreturnMessage
(
"文件类型不正确,只允许上传jpg,png,jpeg格式的图片"
);
}
}
else
{
outputObject
.
setreturnMessage
(
"上传失败,数据不合法"
);
}
}
...
...
skyeye-service/src/main/java/com/skyeye/smprogram/service/RmGroupMemberService.java
浏览文件 @
b3ddb372
...
...
@@ -7,4 +7,6 @@ public interface RmGroupMemberService {
public
void
queryRmGroupMemberList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
insertRmGroupMemberMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmGroupMemberServiceImpl.java
浏览文件 @
b3ddb372
...
...
@@ -10,6 +10,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import
com.github.miemiedev.mybatis.paginator.domain.PageList
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.common.util.ToolUtil
;
import
com.skyeye.smprogram.dao.RmGroupMemberDao
;
import
com.skyeye.smprogram.service.RmGroupMemberService
;
...
...
@@ -32,6 +33,8 @@ public class RmGroupMemberServiceImpl implements RmGroupMemberService{
@Override
public
void
queryRmGroupMemberList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
String
tPath
=
"assets/smpropic/"
;
map
.
put
(
"basePath"
,
tPath
);
List
<
Map
<
String
,
Object
>>
beans
=
rmGroupMemberDao
.
queryRmGroupMemberList
(
map
,
new
PageBounds
(
Integer
.
parseInt
(
map
.
get
(
"page"
).
toString
()),
Integer
.
parseInt
(
map
.
get
(
"limit"
).
toString
())));
PageList
<
Map
<
String
,
Object
>>
beansPageList
=
(
PageList
<
Map
<
String
,
Object
>>)
beans
;
...
...
@@ -40,4 +43,30 @@ public class RmGroupMemberServiceImpl implements RmGroupMemberService{
outputObject
.
settotal
(
total
);
}
/**
*
* @Title: insertRmGroupMemberMation
* @Description: 添加小程序组件
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
insertRmGroupMemberMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"id"
,
ToolUtil
.
getSurFaceId
());
map
.
put
(
"createId"
,
user
.
get
(
"id"
));
map
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
Map
<
String
,
Object
>
item
=
rmGroupMemberDao
.
queryRmGroupMemberISTop
(
map
);
//获取最靠前的小程序组件
if
(
item
==
null
){
map
.
put
(
"sort"
,
1
);
}
else
{
map
.
put
(
"sort"
,
Integer
.
parseInt
(
item
.
get
(
"sort"
).
toString
())
+
1
);
}
rmGroupMemberDao
.
insertRmGroupMemberMation
(
map
);
}
}
skyeye-web/pom.xml
浏览文件 @
b3ddb372
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.eve
</groupId>
...
...
@@ -19,31 +18,12 @@
<artifactId>
skyeye-service
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
</dependency>
<!-- fastdfs-client 参考https://blog.csdn.net/doc_wei/article/details/79776472 -->
<dependency>
<groupId>
org.csource
</groupId>
<artifactId>
fastdfs-client-java
</artifactId>
<version>
1.27-SNAPSHOT
</version>
</dependency>
<!-- <dependency>
<groupId>com.eve</groupId>
<artifactId>eve-manager-interface</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.eve</groupId>
<artifactId>eve-content-interface</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.eve</groupId>
<artifactId>eve-search-interface</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency> -->
<!-- Spring -->
<dependency>
<groupId>
org.springframework
</groupId>
...
...
skyeye-web/src/main/java/com/skyeye/common/controller/CommonController.java
浏览文件 @
b3ddb372
...
...
@@ -30,4 +30,20 @@ public class CommonController {
commonService
.
uploadFile
(
inputObject
,
outputObject
);
}
/**
*
* @Title: uploadFileBase64
* @Description: 上传文件Base64
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/CommonController/uploadFileBase64"
)
@ResponseBody
public
void
uploadFileBase64
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
commonService
.
uploadFileBase64
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/java/com/skyeye/smprogram/controller/RmGroupMemberController.java
浏览文件 @
b3ddb372
...
...
@@ -31,4 +31,20 @@ public class RmGroupMemberController {
rmGroupMemberService
.
queryRmGroupMemberList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: insertRmGroupMemberMation
* @Description: 添加小程序组件
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/RmGroupMemberController/insertRmGroupMemberMation"
)
@ResponseBody
public
void
insertRmGroupMemberMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
rmGroupMemberService
.
insertRmGroupMemberMation
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/RmGroupMemberMapper.xml
浏览文件 @
b3ddb372
...
...
@@ -5,7 +5,7 @@
<select
id=
"queryRmGroupMemberList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.prints_pic_url
printsPicUrl,
CONCAT(#{basePath}, a.prints_pic_url)
printsPicUrl,
(SELECT COUNT(*) FROM sm_project_page_mode b WHERE b.rm_group_member_id = a.id) memberUseNum,
CONVERT(a.create_time, char) createTime,
(SELECT c.name FROM rm_type c WHERE c.id = a.sm_type_id) typeName,
...
...
@@ -26,4 +26,20 @@
ORDER BY a.sort DESC, a.create_time DESC
</select>
<select
id=
"queryRmGroupMemberISTop"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.prints_pic_url printsPicUrl
FROM
rm_group_member a
ORDER BY a.sort DESC LIMIT 1
</select>
<insert
id=
"insertRmGroupMemberMation"
parameterType=
"java.util.Map"
>
INSERT into rm_group_member
(id, sm_type_id, sm_group_id, prints_pic_url, html_content, html_js_content, wxml_content, wxml_js_content, sort, create_id, create_time)
VALUES
(#{id}, #{rmTypeId}, #{rmGroupId}, #{img}, #{htmlContent}, #{htmlJsContent}, #{wxmlContent}, #{wxmlJsContent}, #{sort}, #{createId}, #{createTime})
</insert>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
b3ddb372
...
...
@@ -24,8 +24,12 @@
<url
id=
"common002"
path=
"/post/RmGroupController/queryRmGroupAllList"
val=
"获取所有小程序分组根据小程序分类ID"
allUse=
"1"
>
<property
id=
"parentId"
name=
"id"
ref=
"required"
var=
"小程序分类ID"
/>
</url>
<url
id=
"common003"
path=
"/post/CommonController/uploadFile"
val=
"上传文件"
allUse=
"1"
>
<property
id=
"type"
name=
"type"
ref=
""
var=
"图片类型"
/>
<url
id=
"common003"
path=
"/post/CommonController/uploadFile"
val=
"上传文件"
allUse=
"0"
>
<property
id=
"type"
name=
"type"
ref=
"required,num"
var=
"图片类型"
/>
</url>
<url
id=
"common004"
path=
"/post/CommonController/uploadFileBase64"
val=
"上传文件Base64"
allUse=
"1"
>
<property
id=
"type"
name=
"type"
ref=
"required,num"
var=
"图片类型"
/>
<property
id=
"images"
name=
"images"
ref=
"required"
var=
"图片Base64"
/>
</url>
<!-- 公共请求结束 -->
...
...
@@ -53,8 +57,8 @@
<property
id=
"userPhoto"
name=
"userPhoto"
ref=
"required"
var=
"头像"
/>
</url>
<url
id=
"sys006"
path=
"/post/SysEveMenuController/querySysMenuList"
val=
"获取菜单列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
<property
id=
"menuName"
name=
"menuName"
ref=
""
var=
"菜单名称"
/>
<property
id=
"menuUrl"
name=
"menuUrl"
ref=
""
var=
"菜单链接"
/>
<property
id=
"parentId"
name=
"parentId"
ref=
""
var=
"菜单父ID"
/>
...
...
@@ -91,8 +95,8 @@
<property
id=
"parentId"
name=
"parentId"
ref=
"required"
var=
"父菜单ID"
/>
</url>
<url
id=
"sys013"
path=
"/post/SysEveRoleController/querySysRoleList"
val=
"获取角色列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
<property
id=
"roleName"
name=
"roleName"
ref=
""
var=
"角色名称"
/>
</url>
<url
id=
"sys014"
path=
"/post/SysEveRoleController/querySysRoleBandMenuList"
val=
"获取角色需要绑定的菜单列表"
allUse=
"1"
>
...
...
@@ -123,8 +127,8 @@
</url>
<url
id=
"icon001"
path=
"/post/SysEveIconController/querySysIconList"
val=
"获取ICON列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
<property
id=
"iconClass"
name=
"iconClass"
ref=
""
var=
"icon属性"
/>
</url>
<url
id=
"icon002"
path=
"/post/SysEveIconController/insertSysIconMation"
val=
"添加ICON信息"
allUse=
"1"
>
...
...
@@ -141,15 +145,15 @@
<property
id=
"iconClass"
name=
"iconClass"
ref=
"required"
var=
"icon属性"
/>
</url>
<url
id=
"icon006"
path=
"/post/SysEveIconController/querySysIconListToMenu"
val=
"获取ICON列表供menu菜单使用"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
</url>
<!-- 系统角色用户管理结束 -->
<!-- 系统数据库管理开始 -->
<url
id=
"database001"
path=
"/post/SysDataBaseController/querySysDataBaseList"
val=
"获取数据库信息"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
<property
id=
"tableName"
name=
"tableName"
ref=
""
var=
"表名"
/>
<property
id=
"tableDesc"
name=
"tableDesc"
ref=
""
var=
"表备注"
/>
</url>
...
...
@@ -161,8 +165,8 @@
<!-- 小程序系列开始 -->
<url
id=
"rmxcx001"
path=
"/post/RmTypeController/queryRmTypeList"
val=
"获取小程序分类列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
<property
id=
"rmTypeName"
name=
"rmTypeName"
ref=
""
var=
"小程序分类名称"
/>
</url>
<url
id=
"rmxcx002"
path=
"/post/RmTypeController/insertRmTypeMation"
val=
"新增小程序分类列表"
allUse=
"1"
>
...
...
@@ -185,8 +189,8 @@
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"小程序分类id"
/>
</url>
<url
id=
"rmxcx008"
path=
"/post/RmGroupController/queryRmGroupList"
val=
"获取小程序分组列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
<property
id=
"rmGroupName"
name=
"rmGroupName"
ref=
""
var=
"小程序分组名称"
/>
<property
id=
"rmTypeId"
name=
"rmTypeId"
ref=
""
var=
"小程序分类id"
/>
</url>
...
...
@@ -214,11 +218,20 @@
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"小程序分组id"
/>
</url>
<url
id=
"rmxcx015"
path=
"/post/RmGroupMemberController/queryRmGroupMemberList"
val=
"获取小程序组件列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"limit"
name=
"limit"
ref=
"required
,num
"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required
,num
"
var=
"分页参数,第几页"
/>
<property
id=
"rmGroupId"
name=
"rmGroupId"
ref=
""
var=
"小程序分组id"
/>
<property
id=
"rmTypeId"
name=
"rmTypeId"
ref=
""
var=
"小程序分类id"
/>
</url>
<url
id=
"rmxcx016"
path=
"/post/RmGroupMemberController/insertRmGroupMemberMation"
val=
"添加小程序组件"
allUse=
"1"
>
<property
id=
"rmTypeId"
name=
"rmTypeId"
ref=
"required"
var=
"小程序分类id"
/>
<property
id=
"rmGroupId"
name=
"rmGroupId"
ref=
"required"
var=
"小程序分组id"
/>
<property
id=
"htmlContent"
name=
"htmlContent"
ref=
"required"
var=
"html内容"
/>
<property
id=
"htmlJsContent"
name=
"htmlJsContent"
ref=
"required"
var=
"html对应的js内容"
/>
<property
id=
"wxmlContent"
name=
"wxmlContent"
ref=
"required"
var=
"wxml内容"
/>
<property
id=
"wxmlJsContent"
name=
"wxmlJsContent"
ref=
"required"
var=
"wxml对应的js内容"
/>
<property
id=
"img"
name=
"img"
ref=
"required"
var=
"小程序分组id"
/>
</url>
<!-- 小程序系列结束 -->
...
...
skyeye-web/src/main/resources/properties/log4j.properties
浏览文件 @
b3ddb372
...
...
@@ -5,7 +5,7 @@ log4j.rootLogger = INFO , C , D , E
log4j.appender.C
=
org.apache.log4j.ConsoleAppender
log4j.appender.C.Target
=
System.out
log4j.appender.C.layout
=
org.apache.log4j.PatternLayout
log4j.appender.C.layout.ConversionPattern
=
[
wechatPet
][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
log4j.appender.C.layout.ConversionPattern
=
[
skyeye
][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
### log file ###
log4j.appender.D
=
org.apache.log4j.DailyRollingFileAppender
...
...
@@ -13,7 +13,7 @@ log4j.appender.D.File = ../logs/skyeye.log
log4j.appender.D.Append
=
true
log4j.appender.D.Threshold
=
INFO
log4j.appender.D.layout
=
org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern
=
[
wechatPet
][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
log4j.appender.D.layout.ConversionPattern
=
[
skyeye
][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
### exception ###
log4j.appender.E
=
org.apache.log4j.DailyRollingFileAppender
...
...
@@ -21,4 +21,4 @@ log4j.appender.E.File = ../logs/skyeye_error.log
log4j.appender.E.Append
=
true
log4j.appender.E.Threshold
=
ERROR
log4j.appender.E.layout
=
org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern
=
[wechatPet][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
\ No newline at end of file
log4j.appender.E.layout.ConversionPattern
=
[skyeye][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
\ No newline at end of file
skyeye-web/src/main/resources/spring/springmvc.xml
浏览文件 @
b3ddb372
...
...
@@ -20,8 +20,8 @@
<bean
id=
"multipartResolver"
class=
"org.springframework.web.multipart.commons.CommonsMultipartResolver"
>
<!-- 设定默认编码 -->
<property
name=
"defaultEncoding"
value=
"UTF-8"
></property>
<!-- 设定文件上传的最大值
5MB,5
*1024*1024 -->
<property
name=
"maxUploadSize"
value=
"
524288
0"
></property>
<!-- 设定文件上传的最大值
100MB,100
*1024*1024 -->
<property
name=
"maxUploadSize"
value=
"
10485760
0"
></property>
</bean>
<!-- 配置包扫描器,以便注册带有@Controller、@Service、@repository、@Component等注解的类成为spring的bean -->
...
...
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
浏览文件 @
b3ddb372
...
...
@@ -1845,6 +1845,8 @@ function js_beautify(js_source_text, indent_size, indent_character, indent_level
}
skyeye-web/src/main/webapp/assets/lib/layui/layui.js
浏览文件 @
b3ddb372
...
...
@@ -609,7 +609,7 @@ var AjaxPostUtil = {
params
:
{},
// 请求的参数
async
:
false
,
//同步
type
:
'
text
'
,
// 返回的内容的类型,text,xml,json
callback
:
function
()
{}
// 回调函数 required
callback
:
function
()
{}
,
// 回调函数 required
},
// 创建XMLHttpRequest对象
...
...
skyeye-web/src/main/webapp/assets/smpropic/1540288098008.png
0 → 100644
浏览文件 @
b3ddb372
1.9 KB
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberadd.js
浏览文件 @
b3ddb372
var
childIcon
=
""
;
//分组ICON
var
isPic
=
false
;
//是否执行生成图片
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
...
...
@@ -41,40 +43,38 @@ layui.config({
});
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
var
oCanvas
=
document
.
getElementById
(
"
thecanvas
"
);
var
blob
=
getBlob
(
oCanvas
);
var
oMyForm
=
new
FormData
();
var
fileName
=
mobile
+
'
.jpg
'
oMyForm
.
append
(
"
uploadFile
"
,
blob
);
oMyForm
.
append
(
"
fileName
"
,
fileName
);
oMyForm
.
append
(
"
fileType
"
,
'
image
'
);
$
.
ajax
({
type
:
"
POST
"
,
url
:
reqBasePath
+
"
common003
"
,
//后台接口路径
data
:
oMyForm
,
contentType
:
false
,
processData
:
false
,
cache
:
false
,
success
:
function
(
res
){
}
});
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
rmTypeId
:
$
(
"
#rmTypeId
"
).
val
(),
rmGroupName
:
$
(
"
#rmGroupName
"
).
val
(),
icon
:
$
(
"
#rmGroupIcon
"
).
val
(),
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx009
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
if
(
isPic
){
var
oCanvas
=
document
.
getElementById
(
"
thecanvas
"
);
var
imgData
=
oCanvas
.
toDataURL
();
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
common004
"
,
params
:{
images
:
imgData
,
type
:
1
},
type
:
'
json
'
,
callback
:
function
(
json1
){
if
(
json1
.
returnCode
==
0
){
var
params
=
{
rmTypeId
:
$
(
"
#rmTypeId
"
).
val
(),
rmGroupId
:
$
(
"
#rmGroupId
"
).
val
(),
htmlContent
:
$
(
"
#htmlContent
"
).
val
(),
htmlJsContent
:
$
(
"
#htmlJsContent
"
).
val
(),
wxmlContent
:
$
(
"
#wxmlContent
"
).
val
(),
wxmlJsContent
:
$
(
"
#wxmlJsContent
"
).
val
(),
img
:
json1
.
bean
.
picUrl
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx016
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
else
{
top
.
winui
.
window
.
msg
(
"
请先生成预览图
"
,
{
icon
:
2
,
time
:
2000
});
}
}
return
false
;
});
...
...
@@ -113,6 +113,7 @@ layui.config({
$
(
"
#download
"
).
show
();
}
});
isPic
=
true
;
}
});
...
...
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberlist.js
浏览文件 @
b3ddb372
...
...
@@ -59,7 +59,9 @@ layui.config({
limit
:
8
,
cols
:
[[
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
printsPicUrl
'
,
title
:
'
效果图
'
,
width
:
120
},
{
field
:
'
printsPicUrl
'
,
title
:
'
效果图
'
,
width
:
200
,
templet
:
function
(
d
){
return
'
<img src="
'
+
fileBasePath
+
d
.
printsPicUrl
+
'
" style="width:100%;height:auto">
'
;
}},
{
field
:
'
htmlContent
'
,
title
:
'
HTML内容
'
,
width
:
150
,
templet
:
function
(
d
){
return
'
<i class="fa fa-fw 1"></i>
'
;
}},
...
...
skyeye-web/src/main/webapp/toolUtil.txt
浏览文件 @
b3ddb372
...
...
@@ -18,4 +18,5 @@ getSurFaceId(); 获取ID
MD5(); 加密
allMenuToTree(); 使用递归方法建树
findChildren(); 递归查找子节点
getIPPropertiesPath(); 获取ip.properties路径
\ No newline at end of file
getIPPropertiesPath(); 获取ip.properties路径
deleteFile(); 删除单个文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录