Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
不是太高的手
SPTools
提交
9f949579
S
SPTools
项目概览
不是太高的手
/
SPTools
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SPTools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9f949579
编写于
9月 05, 2020
作者:
小
小柒2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
蘑菇钉打卡日志
上级
3553c412
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
171 addition
and
13 deletion
+171
-13
src/main/java/com/tools/module/app/service/AppDingLogService.java
.../java/com/tools/module/app/service/AppDingLogService.java
+1
-1
src/main/java/com/tools/module/app/service/impl/AppDingLogServiceImpl.java
.../tools/module/app/service/impl/AppDingLogServiceImpl.java
+3
-4
src/main/java/com/tools/module/app/web/DingController.java
src/main/java/com/tools/module/app/web/DingController.java
+21
-0
src/main/java/com/tools/module/sys/service/impl/SysMenuServiceImpl.java
...com/tools/module/sys/service/impl/SysMenuServiceImpl.java
+1
-1
src/main/resources/templates/app/moguding/log.html
src/main/resources/templates/app/moguding/log.html
+138
-0
src/main/resources/templates/app/task/list.html
src/main/resources/templates/app/task/list.html
+7
-7
未找到文件。
src/main/java/com/tools/module/app/service/AppDingLogService.java
浏览文件 @
9f949579
...
...
@@ -15,7 +15,7 @@ public interface AppDingLogService {
*/
Result
listSignInLog
(
AppDingSignInLog
log
);
Result
delete
(
AppDingSignInLog
signInLog
);
Result
delete
(
Integer
logId
);
void
save
(
AppDingSignInLog
signInLog
);
...
...
src/main/java/com/tools/module/app/service/impl/AppDingLogServiceImpl.java
浏览文件 @
9f949579
...
...
@@ -38,8 +38,7 @@ public class AppDingLogServiceImpl implements AppDingLogService {
nativeSql
.
append
(
"WHERE username = ?"
);
params
=
new
Object
[]{
log
.
getUsername
()};
}
nativeSql
.
append
(
" order by logId desc"
);
Pageable
pageable
=
PageRequest
.
of
(
log
.
getPageNo
()
-
1
,
log
.
getPageSize
());
Pageable
pageable
=
PageRequest
.
of
(
log
.
getPageNo
(),
log
.
getPageSize
());
List
<
AppDingSignInLog
>
list
=
dynamicQuery
.
nativeQueryPagingList
(
AppDingSignInLog
.
class
,
pageable
,
nativeSql
.
toString
(),
params
);
data
=
new
PageBean
<>(
list
,
totalCount
);
}
...
...
@@ -48,9 +47,9 @@ public class AppDingLogServiceImpl implements AppDingLogService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
delete
(
AppDingSignInLog
signInLog
)
{
public
Result
delete
(
Integer
logId
)
{
String
nativeSql
=
"DELETE FROM app_ding_signIn_log WHERE id=?"
;
dynamicQuery
.
nativeExecuteUpdate
(
nativeSql
,
new
Object
[]{
signInLog
.
getLogId
()
});
dynamicQuery
.
nativeExecuteUpdate
(
nativeSql
,
new
Object
[]{
logId
});
return
Result
.
ok
();
}
...
...
src/main/java/com/tools/module/app/web/DingController.java
浏览文件 @
9f949579
...
...
@@ -4,7 +4,9 @@ import com.tools.common.config.AbstractController;
import
com.tools.common.model.Result
;
import
com.tools.common.util.BaiDuMapUtils
;
import
com.tools.common.util.CommonUtils
;
import
com.tools.module.app.entity.AppDingSignInLog
;
import
com.tools.module.app.entity.AppDingUser
;
import
com.tools.module.app.service.AppDingLogService
;
import
com.tools.module.app.service.AppDingService
;
import
com.tools.module.app.service.AppDingUserService
;
import
io.swagger.annotations.Api
;
...
...
@@ -32,6 +34,9 @@ public class DingController extends AbstractController {
@Autowired
private
AppDingUserService
dingUserService
;
@Autowired
private
AppDingLogService
dingLogService
;
/**
* 列表
*/
...
...
@@ -84,6 +89,22 @@ public class DingController extends AbstractController {
return
BaiDuMapUtils
.
getCoordinate
(
address
);
}
/**
* 签到日志
*/
@PostMapping
(
"log"
)
public
Result
log
(
AppDingSignInLog
log
){
return
dingLogService
.
listSignInLog
(
log
);
}
/**
* 删除日志
*/
@PostMapping
(
"log/delete"
)
public
Result
deleteLog
(
Integer
logId
){
return
dingLogService
.
delete
(
logId
);
}
/**
* 列表
*/
...
...
src/main/java/com/tools/module/sys/service/impl/SysMenuServiceImpl.java
浏览文件 @
9f949579
...
...
@@ -84,7 +84,7 @@ public class SysMenuServiceImpl implements SysMenuService {
subSql
+=
"LEFT JOIN sys_role_menu rm ON m.menu_id = rm.menu_id "
;
subSql
+=
"LEFT JOIN sys_role r ON r.role_id = rm.role_id "
;
subSql
+=
"WHERE r.role_id IN (SELECT role_id FROM sys_user_role WHERE user_id=?) "
;
subSql
+=
"AND m.parent_id = ?"
;
subSql
+=
"AND m.parent_id = ?
ORDER BY m.order_num
"
;
List
<
SysMenu
>
subList
=
dynamicQuery
.
query
(
SysMenu
.
class
,
subSql
,
new
Object
[]{
userId
,
menu
.
getMenuId
()});
menu
.
setList
(
subList
);
...
...
src/main/resources/templates/app/moguding/log.html
0 → 100644
浏览文件 @
9f949579
<!DOCTYPE html>
<html
lang=
"en"
xmlns:th=
"http://www.thymeleaf.org"
>
<head
th:replace=
"common/head :: head(link)"
/>
<body>
<div
id=
"app"
class=
"ok-body"
v-cloak
>
<template>
<div
style=
"margin-bottom: 8px;margin-top: 8px;"
>
<i-input
placeholder=
"输入内容"
v-model=
"log.description"
style=
"width: 300px"
></i-input>
<i-button
type=
"primary"
icon=
"ios-search"
@
click=
"load()"
>
搜索
</i-button>
<i-button
type=
"primary"
icon=
"ios-redo"
@
click=
"reload()"
>
重置
</i-button>
</div>
</template>
<template>
<i-table
size=
"small"
:columns=
"tableTitle"
:data=
"tableData"
>
</i-table>
<br>
<Page
style=
"float: right;"
:current=
"log.pageNo"
:total=
"tableSize"
:page-size=
"log.pageSize"
@
on-change=
"changePage"
@
on-page-size-change=
"changePageSize"
show-elevator
show-sizer
show-total
></Page>
</template>
</div>
<div
th:replace=
"common/foot :: foot(script)"
></div>
<script
th:inline=
"none"
>
layui
.
use
([
"
okUtils
"
,
"
okLayer
"
],
function
()
{
var
okUtils
=
layui
.
okUtils
;
var
okLayer
=
layui
.
okLayer
;
var
vm
=
new
Vue
({
el
:
'
#app
'
,
data
:
function
(){
var
that
=
this
;
return
{
tableTitle
:
[{
title
:
'
序号
'
,
width
:
70
,
render
:
function
(
h
,
params
)
{
return
h
(
'
span
'
,
params
.
index
+
(
that
.
log
.
pageNo
-
1
)
*
that
.
log
.
pageSize
+
1
);
}
},{
key
:
"
username
"
,
title
:
"
用户名
"
,
width
:
200
},{
key
:
"
address
"
,
title
:
"
地址
"
,
minWidth
:
100
},{
key
:
"
gmtCreate
"
,
title
:
"
创建时间
"
,
minWidth
:
150
},{
key
:
"
status
"
,
title
:
"
状态
"
,
width
:
100
,
render
:
function
(
h
,
params
)
{
var
type
=
params
.
row
.
status
==
1
?
"
成功
"
:
"
失败
"
;
return
h
(
'
div
'
,
type
);
}
},{
title
:
'
操作
'
,
key
:
'
action
'
,
width
:
100
,
align
:
'
center
'
,
render
:
function
(
h
,
params
)
{
var
functionList
=
[];
var
remove
=
h
(
'
Button
'
,
{
props
:
{
type
:
'
primary
'
,
size
:
'
small
'
,
icon
:
'
md-trash
'
},
style
:
{
marginRight
:
'
8px
'
},
on
:
{
click
:
function
()
{
vm
.
remove
(
params
.
row
);
}
}
},
'
删除
'
);
functionList
.
push
(
remove
);
return
h
(
'
div
'
,
functionList
);
}
}
],
tableData
:
[],
log
:
{
pageSize
:
10
,
pageNo
:
1
,
description
:
''
},
tableSize
:
50
,
}
},
methods
:
{
load
:
function
()
{
var
that
=
this
;
okUtils
.
ajaxCloud
({
url
:
"
/app/ding/log
"
,
param
:
that
.
log
,
success
:
function
(
result
)
{
that
.
tableData
=
result
.
msg
.
pageData
;
that
.
tableSize
=
result
.
msg
.
totalCount
;
}
});
},
reload
:
function
(){
vm
.
log
.
pageSize
=
10
;
vm
.
log
.
pageNo
=
1
;
vm
.
log
.
description
=
''
;
this
.
load
();
},
changePage
:
function
(
pageNo
)
{
vm
.
log
.
pageNo
=
pageNo
;
vm
.
load
();
},
changePageSize
:
function
(
pageSize
)
{
vm
.
log
.
pageSize
=
pageSize
;
vm
.
load
();
},
remove
:
function
(
log
)
{
okLayer
.
confirm
(
"
确定要删除吗?
"
,
function
()
{
okUtils
.
ajaxCloud
({
url
:
"
/app/ding/log/delete
"
,
param
:
{
logId
:
log
.
logId
},
success
:
function
(
result
)
{
okLayer
.
msg
.
greenTick
(
result
.
msg
,
function
()
{
vm
.
load
();
});
}
});
})
}
},
created
:
function
()
{
this
.
load
()
}
})
});
</script>
</body>
</html>
src/main/resources/templates/app/task/list.html
浏览文件 @
9f949579
...
...
@@ -34,25 +34,25 @@ layui.use(["okUtils", "okLayer"], function () {
render
:
function
(
h
,
params
)
{
return
h
(
'
span
'
,
params
.
index
+
(
that
.
task
.
pageNo
-
1
)
*
that
.
task
.
pageSize
+
1
);
}
},{
key
:
"
name
"
,
title
:
"
任务名称
"
,
minWidth
:
100
},{
key
:
"
group
"
,
title
:
"
任务分组
"
,
minWidth
:
100
},{
key
:
"
name
"
,
title
:
"
任务名称
"
,
minWidth
:
100
},{
key
:
"
taskClassName
"
,
title
:
"
执行
类
"
,
title
:
"
类
"
,
minWidth
:
260
},{
key
:
"
methodName
"
,
title
:
"
执行
方法
"
,
title
:
"
方法
"
,
width
:
80
},{
key
:
"
cronExpression
"
,
title
:
"
执行
时间
"
,
title
:
"
时间
"
,
width
:
150
},{
key
:
"
gmtCreate
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录