Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
卜远杰
Aidea
Commits
25cf8c8d
Commit
25cf8c8d
authored
Sep 22, 2020
by
谢希宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default Changelist
parent
5be7f588
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
33 additions
and
2917 deletions
+33
-2917
MobileStaticLogController.java
.../com/cftech/sys/controller/MobileStaticLogController.java
+0
-79
MobileViewLogController.java
...va/com/cftech/sys/controller/MobileViewLogController.java
+0
-144
applicationContext.xml
cftech-common-web/src/main/resources/applicationContext.xml
+14
-15
spring-mvc.xml
cftech-common-web/src/main/resources/spring-mvc.xml
+1
-15
header.html
...mmon-web/src/main/webapp/WEB-INF/views/common/header.html
+1
-1
spring-mvc.xml
...les/pay-core-module-web/src/main/resources/spring-mvc.xml
+0
-10
applicationContext.xml
...e-web-1.0-SNAPSHOT/WEB-INF/classes/applicationContext.xml
+14
-14
spring-mvc.xml
...ow-module-web-1.0-SNAPSHOT/WEB-INF/classes/spring-mvc.xml
+1
-15
header.html
...-module-web-1.0-SNAPSHOT/WEB-INF/views/common/header.html
+1
-1
mobileloglist.html
...c/main/webapp/WEB-INF/views/managerlog/mobileloglist.html
+0
-347
mobileviewloglist.html
...in/webapp/WEB-INF/views/managerlog/mobileviewloglist.html
+0
-326
sysloglist.html
.../src/main/webapp/WEB-INF/views/managerlog/sysloglist.html
+0
-320
MobileLogController.java
...n/java/com/cftech/sys/controller/MobileLogController.java
+0
-47
SysLogController.java
...main/java/com/cftech/sys/controller/SysLogController.java
+0
-81
ExportLogMapper.java
...ule/src/main/java/com/cftech/sys/dao/ExportLogMapper.java
+0
-17
ExportLogMapper.xml
...dule/src/main/java/com/cftech/sys/dao/ExportLogMapper.xml
+0
-123
LogMapper.java
sys-module/src/main/java/com/cftech/sys/dao/LogMapper.java
+0
-31
LogMapper.xml
sys-module/src/main/java/com/cftech/sys/dao/LogMapper.xml
+0
-135
MobileLogMapper.java
...ule/src/main/java/com/cftech/sys/dao/MobileLogMapper.java
+0
-79
MobileLogMapper.xml
...dule/src/main/java/com/cftech/sys/dao/MobileLogMapper.xml
+0
-120
MobileViewlogMapper.java
...src/main/java/com/cftech/sys/dao/MobileViewlogMapper.java
+0
-15
MobileViewlogMapper.xml
.../src/main/java/com/cftech/sys/dao/MobileViewlogMapper.xml
+0
-123
MobileFilter.java
...ule/src/main/java/com/cftech/sys/filter/MobileFilter.java
+0
-62
JWTInterceptor.java
.../main/java/com/cftech/sys/interceptor/JWTInterceptor.java
+0
-6
LogInterceptor.java
.../main/java/com/cftech/sys/interceptor/LogInterceptor.java
+0
-88
ExportLog.java
sys-module/src/main/java/com/cftech/sys/model/ExportLog.java
+0
-86
Log.java
sys-module/src/main/java/com/cftech/sys/model/Log.java
+0
-77
MobileLog.java
sys-module/src/main/java/com/cftech/sys/model/MobileLog.java
+0
-60
MobileViewlog.java
...ule/src/main/java/com/cftech/sys/model/MobileViewlog.java
+0
-71
SysLogListParam.java
...e/src/main/java/com/cftech/sys/param/SysLogListParam.java
+0
-37
ExportLogService.java
...rc/main/java/com/cftech/sys/service/ExportLogService.java
+0
-21
LogService.java
...dule/src/main/java/com/cftech/sys/service/LogService.java
+0
-28
MobileLogService.java
...rc/main/java/com/cftech/sys/service/MobileLogService.java
+0
-17
MobileViewlogService.java
...ain/java/com/cftech/sys/service/MobileViewlogService.java
+0
-14
ExportLogServiceImpl.java
...ava/com/cftech/sys/service/impl/ExportLogServiceImpl.java
+0
-87
LogServiceImpl.java
...main/java/com/cftech/sys/service/impl/LogServiceImpl.java
+0
-53
MobileLogServiceImpl.java
...ava/com/cftech/sys/service/impl/MobileLogServiceImpl.java
+0
-26
MobileViewlogServiceImpl.java
...com/cftech/sys/service/impl/MobileViewlogServiceImpl.java
+0
-36
ExportUtils.java
...module/src/main/java/com/cftech/sys/util/ExportUtils.java
+0
-69
WorkshopController.java
.../com/cftech/workshop/workshop/web/WorkshopController.java
+1
-21
No files found.
accounts-module/src/main/java/com/cftech/sys/controller/MobileStaticLogController.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
controller
;
import
com.cftech.accounts.model.MpAccountsEntity
;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.sys.model.MobileViewlog
;
import
com.cftech.sys.service.MobileViewlogService
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
java.sql.Timestamp
;
import
java.util.Date
;
/**
* @author 作者 lisw:
* @version 创建时间:2016年10月24日 下午1:34:10
* 后台日志操作Controller
*/
@Controller
@RequestMapping
(
"/mobile/auth/mobilestaticlog"
)
public
class
MobileStaticLogController
{
@Autowired
private
MobileViewlogService
mobileViewlogService
;
@Autowired
private
MpAccountsService
mpAccountService
;
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
JSONObject
save
(
String
params
,
String
appid
,
HttpServletRequest
request
){
//判断请求参数
System
.
out
.
println
(
params
);
System
.
out
.
println
(
appid
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"errorNo"
,
1
);
if
(
StringUtils
.
isBlank
(
appid
)){
return
rtnJson
;
}
Long
accountsid
=
checkappid
(
appid
);
MobileViewlog
mobileViewlog
=
new
MobileViewlog
();
mobileViewlog
.
setRemoteAddr
(
com
.
cftech
.
core
.
util
.
StringUtils
.
getRemoteAddr
(
request
));
mobileViewlog
.
setUserAgent
(
request
.
getHeader
(
"user-agent"
));
mobileViewlog
.
setRequestUri
(
request
.
getRequestURI
());
mobileViewlog
.
setAppid
(
request
.
getParameter
(
"appid"
));
mobileViewlog
.
setCreateDate
(
new
Timestamp
(
new
Date
().
getTime
()));
mobileViewlog
.
setParenturl
(
request
.
getHeader
(
"REFERER"
));
mobileViewlog
.
setParams
(
params
);
mobileViewlog
.
setAccountsid
(
accountsid
);
try
{
mobileViewlogService
.
save
(
mobileViewlog
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
/**
* 根据appid获取accountsid
* */
private
Long
checkappid
(
String
appid
)
{
MpAccountsEntity
accountEntity
=
mpAccountService
.
getMpAccountsAppid
(
appid
);
if
(
accountEntity
!=
null
)
{
return
accountEntity
.
getId
();
}
else
{
return
null
;
}
}
}
\ No newline at end of file
accounts-module/src/main/java/com/cftech/sys/controller/MobileViewLogController.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.accounts.model.MpAccountsEntity
;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.core.mongo.Pager
;
import
com.cftech.core.util.DateUtils
;
import
com.cftech.core.util.ExcelUtils
;
import
com.cftech.core.util.JsonDateValueProcessor
;
import
com.cftech.sys.model.MobileLog
;
import
com.cftech.sys.param.SysLogListParam
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.service.MobileLogService
;
import
com.cftech.sys.service.MobileViewlogService
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author 作者 lisw:
* @version 创建时间:2016年10月24日 下午1:34:10
* 后台日志操作Controller
*/
@Controller
@RequestMapping
(
"/a/mobileviewlog"
)
public
class
MobileViewLogController
{
@Autowired
private
MobileViewlogService
mobileViewlogService
;
@Autowired
private
MobileLogService
mobileLogService
;
@Autowired
private
MpAccountsService
mpAccountsService
;
//访问日志
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
value
=
PermissionSign
.
SYSLOG_VIEWS
)
public
String
sysLogList
(
HttpServletRequest
request
,
SysLogListParam
sysLogListParam
,
Model
model
){
model
.
addAttribute
(
"sysLogListParam"
,
sysLogListParam
);
return
"managerlog/mobileviewloglist"
;
}
//操作日志
@RequestMapping
(
value
=
"/listStatic"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
value
=
PermissionSign
.
SYSLOG_VIEWS
)
public
String
sysLogListStatic
(
HttpServletRequest
request
,
SysLogListParam
sysLogListParam
,
Model
model
){
model
.
addAttribute
(
"sysLogListParam"
,
sysLogListParam
);
return
"managerlog/mobileloglist"
;
}
@RequestMapping
(
value
=
"/fetchData"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
value
=
PermissionSign
.
SYSLOG_VIEWS
)
@ResponseBody
public
JSONObject
fetchData
(
int
iDisplayStart
,
int
iDisplayLength
,
MobileLog
log
,
SysLogListParam
sysLogListParam
,
HttpServletRequest
request
){
// Sort sort = new Sort("t.create_date", OrderType.DESC);
// Conds conds = new Conds();
// //请求参数
// if(sysLogListParam != null){
// if(StringUtils.isNoneBlank(sysLogListParam.getBrithdayStarttime()) && StringUtils.isNoneBlank(sysLogListParam.getBrithdayEndtime())){
// conds.between("t.create_date", sysLogListParam.getBrithdayStarttime(),sysLogListParam.getBrithdayEndtime());
// }else if(StringUtils.isNoneBlank(sysLogListParam.getBrithdayStarttime())){
// conds.greatEqual("t.create_date",sysLogListParam.getBrithdayStarttime());
// }else if(StringUtils.isNoneBlank(sysLogListParam.getBrithdayEndtime())){
// conds.lessEqual("t.create_date",sysLogListParam.getBrithdayEndtime());
// }
// }
// // 获取列表数据
// List<MobileViewlog> activityList = mobileViewlogService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
// // 获得总数
// Integer userCounts = mobileViewlogService.count(conds);
MpAccountsEntity
account
=
mpAccountsService
.
getDetail
(
UserUtils
.
getmpaccounts
(
request
));
log
.
setAppid
(
account
.
getAppid
());
Pager
pager
=
new
Pager
();
pager
.
setPageNum
(
iDisplayStart
/
iDisplayLength
);
pager
.
setPageSize
(
iDisplayLength
);
Pager
page
=
mobileLogService
.
selectPage
(
log
,
pager
);
// if(page!=null && page.getResult()!=null && page.getResult().size()>0){
// List<MobileLog> logs = page.getResult();
// for(MobileLog mobile : logs){
// System.out.println(mobile.getOpenid());
// }
// }else{
// System.out.println("未查询到数据");
// }
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
page
.
getTotal
());
rtnJson
.
put
(
"iTotalDisplayRecords"
,
page
.
getTotal
());
rtnJson
.
put
(
"aaData"
,
page
.
getResult
());
return
rtnJson
;
}
@RequestMapping
(
"/export"
)
public
void
export
(
MobileLog
log
,
SysLogListParam
sysLogListParam
,
HttpServletRequest
request
,
HttpServletResponse
response
){
MpAccountsEntity
account
=
mpAccountsService
.
getDetail
(
UserUtils
.
getmpaccounts
(
request
));
log
.
setAppid
(
account
.
getAppid
());
Pager
pager
=
new
Pager
();
pager
.
setPageNum
(
0
);
pager
.
setPageSize
(
50000
);
Pager
page
=
mobileLogService
.
selectPage
(
log
,
pager
);
List
list
=
page
.
getResult
();
// if(page.getTotal()>50000){//仅截取50000条
// list=list.subList(0, 49999);
// }
// 参数
try
{
ExcelUtils
.
export
(
request
,
response
,
"访问日志报表-"
+
DateUtils
.
formatDate
(
new
Date
(),
"yyyy-MM-dd"
),
list
,
"logview"
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
//清空前端访问日志
@RequestMapping
(
value
=
"/deleteAllMobileViewLog"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
JSONObject
deleteAllMobileLog
(){
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"errorNo"
,
0
);
try
{
mobileViewlogService
.
deleteAllMobileViewLog
();
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
}
\ No newline at end of file
cftech-common-web/src/main/resources/applicationContext.xml
View file @
25cf8c8d
...
...
@@ -29,7 +29,6 @@
<property
name=
"locations"
>
<list>
<value>
classpath*:application-test.properties
</value>
<value>
classpath*:mongodb.properties
</value>
</list>
</property>
</bean>
...
...
@@ -125,20 +124,20 @@
<!--有密码配置 定义mongo对象,对应的是mongodb官方jar包中的Mongo,replica-set设置集群副本的ip地址和端口 -->
<
mongo:mongo-client
id=
"mongo"
replica-set=
"${mongo.hostport}"
credentials=
"${mongo.username}:${mongo.password}@admin"
>
<
mongo:client-options
write-concern=
"NORMAL"
connections-per-host=
"${mongo.connectionsPerHost}"
threads-allowed-to-block-for-connection-multiplier=
"${mongo.threadsAllowedToBlockForConnectionMultiplier}"
connect-timeout=
"${mongo.connectTimeout}"
max-wait-time=
"${mongo.maxWaitTime}"
socket-keep-alive=
"${mongo.socketKeepAlive}"
socket-timeout=
"${mongo.socketTimeout}"
/
>
<
/mongo:mongo-client
>
<
mongo:db-factory
dbname=
"${mongo.database}"
mongo-ref=
"mongo"
/
>
<
bean
id=
"mongoTemplate"
class=
"org.springframework.data.mongodb.core.MongoTemplate"
>
<
constructor-arg
name=
"mongo"
ref=
"mongo"
/
>
<
constructor-arg
name=
"databaseName"
value=
"${mongo.database}"
/
>
<
/bean
>
<
!--<mongo:mongo-client id="mongo" replica-set="${mongo.hostport}" credentials="${mongo.username}:${mongo.password}@admin">--
>
<
!--<mongo:client-options write-concern="NORMAL"-->
<!--connections-per-host="${mongo.connectionsPerHost}"-->
<!--threads-allowed-to-block-for-connection-multiplier="${mongo.threadsAllowedToBlockForConnectionMultiplier}"-->
<!--connect-timeout="${mongo.connectTimeout}"-->
<!--max-wait-time="${mongo.maxWaitTime}"-->
<!--socket-keep-alive="${mongo.socketKeepAlive}"-->
<!--socket-timeout="${mongo.socketTimeout}" />--
>
<
!--</mongo:mongo-client>--
>
<
!--<mongo:db-factory dbname="${mongo.database}" mongo-ref="mongo" />--
>
<
!--<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">--
>
<
!--<constructor-arg name="mongo" ref="mongo" />--
>
<
!--<constructor-arg name="databaseName" value="${mongo.database}"/>--
>
<
!--</bean>--
>
<!--无用户名密码配置
...
...
cftech-common-web/src/main/resources/spring-mvc.xml
View file @
25cf8c8d
...
...
@@ -47,21 +47,7 @@
<property
name=
"cacheSeconds"
value=
"60"
/>
</bean>
<mvc:interceptors>
<bean
class=
"org.springframework.web.servlet.i18n.LocaleChangeInterceptor"
/>
<mvc:interceptor>
<mvc:mapping
path=
"/a/**"
/>
<ref
bean=
"logInterceptor"
/>
</mvc:interceptor>
<!--<mvc:interceptor>-->
<!--<mvc:mapping path="/mobile/**" />-->
<!--<ref bean="jwtInterceptor" />-->
<!--</mvc:interceptor>-->
</mvc:interceptors>
<bean
id=
"logInterceptor"
class=
"com.cftech.sys.interceptor.LogInterceptor"
></bean>
<!--<bean id="jwtInterceptor" class="com.cftech.sys.interceptor.JWTInterceptor"></bean>-->
<mvc:default-servlet-handler
/>
...
...
cftech-common-web/src/main/webapp/WEB-INF/views/common/header.html
View file @
25cf8c8d
...
...
@@ -7,7 +7,7 @@
<span
class=
"logo-mini"
><b>
schaeffler
</b></span>
<!-- logo for regular state and mobile devices -->
<!--#if($session.getAttribute("isshow") == '2') -->
<span
class=
"logo-lg"
><b></b>
艾迪
数字
平台
</span>
<span
class=
"logo-lg"
><b></b>
艾迪
健康
平台
</span>
<!--#else if($session.getAttribute("isshow") == '1') -->
<!--<span class="logo-lg"><b>CF</b>汤沟微信后台</span>-->
<!--#end -->
...
...
pay-modules/pay-core-module-web/src/main/resources/spring-mvc.xml
View file @
25cf8c8d
...
...
@@ -44,16 +44,6 @@
<property
name=
"cacheSeconds"
value=
"60"
/>
</bean>
<mvc:interceptors>
<bean
class=
"org.springframework.web.servlet.i18n.LocaleChangeInterceptor"
/>
<mvc:interceptor>
<mvc:mapping
path=
"/a/**"
/>
<ref
bean=
"logInterceptor"
/>
</mvc:interceptor>
</mvc:interceptors>
<bean
id=
"logInterceptor"
class=
"com.cftech.sys.interceptor.LogInterceptor"
></bean>
<mvc:default-servlet-handler
/>
<bean
id=
"localeResolver"
...
...
portal-web/overlays/com.cftech.workflow-module-web-1.0-SNAPSHOT/WEB-INF/classes/applicationContext.xml
View file @
25cf8c8d
...
...
@@ -125,20 +125,20 @@
<!--有密码配置 定义mongo对象,对应的是mongodb官方jar包中的Mongo,replica-set设置集群副本的ip地址和端口 -->
<
mongo:mongo-client
id=
"mongo"
replica-set=
"${mongo.hostport}"
credentials=
"${mongo.username}:${mongo.password}@admin"
>
<
mongo:client-options
write-concern=
"NORMAL"
connections-per-host=
"${mongo.connectionsPerHost}"
threads-allowed-to-block-for-connection-multiplier=
"${mongo.threadsAllowedToBlockForConnectionMultiplier}"
connect-timeout=
"${mongo.connectTimeout}"
max-wait-time=
"${mongo.maxWaitTime}"
socket-keep-alive=
"${mongo.socketKeepAlive}"
socket-timeout=
"${mongo.socketTimeout}"
/
>
<
/mongo:mongo-client
>
<
mongo:db-factory
dbname=
"${mongo.database}"
mongo-ref=
"mongo"
/
>
<
bean
id=
"mongoTemplate"
class=
"org.springframework.data.mongodb.core.MongoTemplate"
>
<
constructor-arg
name=
"mongo"
ref=
"mongo"
/
>
<
constructor-arg
name=
"databaseName"
value=
"${mongo.database}"
/
>
<
/bean
>
<
!--<mongo:mongo-client id="mongo" replica-set="${mongo.hostport}" credentials="${mongo.username}:${mongo.password}@admin">--
>
<
!--<mongo:client-options write-concern="NORMAL"-->
<!--connections-per-host="${mongo.connectionsPerHost}"-->
<!--threads-allowed-to-block-for-connection-multiplier="${mongo.threadsAllowedToBlockForConnectionMultiplier}"-->
<!--connect-timeout="${mongo.connectTimeout}"-->
<!--max-wait-time="${mongo.maxWaitTime}"-->
<!--socket-keep-alive="${mongo.socketKeepAlive}"-->
<!--socket-timeout="${mongo.socketTimeout}" />--
>
<
!--</mongo:mongo-client>--
>
<
!--<mongo:db-factory dbname="${mongo.database}" mongo-ref="mongo" />--
>
<
!--<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">--
>
<
!--<constructor-arg name="mongo" ref="mongo" />--
>
<
!--<constructor-arg name="databaseName" value="${mongo.database}"/>--
>
<
!--</bean>--
>
<!--无用户名密码配置
...
...
portal-web/overlays/com.cftech.workflow-module-web-1.0-SNAPSHOT/WEB-INF/classes/spring-mvc.xml
View file @
25cf8c8d
...
...
@@ -47,21 +47,7 @@
<property
name=
"cacheSeconds"
value=
"60"
/>
</bean>
<mvc:interceptors>
<bean
class=
"org.springframework.web.servlet.i18n.LocaleChangeInterceptor"
/>
<mvc:interceptor>
<mvc:mapping
path=
"/a/**"
/>
<ref
bean=
"logInterceptor"
/>
</mvc:interceptor>
<!--<mvc:interceptor>-->
<!--<mvc:mapping path="/mobile/**" />-->
<!--<ref bean="jwtInterceptor" />-->
<!--</mvc:interceptor>-->
</mvc:interceptors>
<bean
id=
"logInterceptor"
class=
"com.cftech.sys.interceptor.LogInterceptor"
></bean>
<!--<bean id="jwtInterceptor" class="com.cftech.sys.interceptor.JWTInterceptor"></bean>-->
<mvc:default-servlet-handler
/>
...
...
portal-web/overlays/com.cftech.workflow-module-web-1.0-SNAPSHOT/WEB-INF/views/common/header.html
View file @
25cf8c8d
...
...
@@ -7,7 +7,7 @@
<span
class=
"logo-mini"
><b>
schaeffler
</b></span>
<!-- logo for regular state and mobile devices -->
<!--#if($session.getAttribute("isshow") == '2') -->
<span
class=
"logo-lg"
><b></b>
艾迪
数字
平台
</span>
<span
class=
"logo-lg"
><b></b>
艾迪
健康
平台
</span>
<!--#else if($session.getAttribute("isshow") == '1') -->
<!--<span class="logo-lg"><b>CF</b>汤沟微信后台</span>-->
<!--#end -->
...
...
sys-module-web/src/main/webapp/WEB-INF/views/managerlog/mobileloglist.html
deleted
100644 → 0
View file @
5be7f588
<!DOCTYPE html>
<html>
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
table
.table-bordered
th
:last-child
,
table
.table-bordered
td
:last-child
{
word-break
:
break-all
}
table
th
,
td
{
word-break
:
break-all
;
}
</style>
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
id=
"treeSelect"
></div>
<div
class=
"content-wrapper"
style=
"margin-left: 0;"
>
<section
class=
"content-header"
>
<h1>
日志管理
<small>
客户端访问日志信息
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#springUrl('/page/user/showstatics')"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
日志管理
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
>
<!-- <div class="col-xs-2"> -->
<!-- <div class="input-group date"> -->
<!-- <div class="input-group-addon"> -->
<!-- <i class="fa fa-calendar"></i> -->
<!-- </div> -->
<!-- <input type="text" class="form-control pull-right datepicker" -->
<!-- value="$!{sysLogListParam.brithdayStarttime}" -->
<!-- name="brithdayStarttime" placeholder="创建开始时间" -->
<!-- readonly="readonly"> -->
<!-- </div> -->
<!-- </div> -->
<!-- <div class="col-xs-2"> -->
<!-- <div class="input-group date"> -->
<!-- <div class="input-group-addon"> -->
<!-- <i class="fa fa-calendar"></i> -->
<!-- </div> -->
<!-- <input type="text" -->
<!-- class="form-control pull-right datepicker" -->
<!-- value="$!{sysLogListParam.brithdayEndtime}" -->
<!-- name="brithdayEndtime" placeholder="创建结束时间" -->
<!-- readonly="readonly"> -->
<!-- </div> -->
<!-- </div> -->
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"openId"
name=
"openid"
>
</div>
<!--<div class="col-xs-2">-->
<!--<input type="text" hidden="true" class="form-control required"-->
<!--placeholder="昵称" name="field4">-->
<!--</div> -->
<!--<div class="col-xs-2">-->
<!--<input type="text" hidden="true" class="form-control required"-->
<!--placeholder="省份" name="field2">-->
<!--</div>-->
<!--<div class="col-xs-2">-->
<!--<input type="text" hidden="true" class="form-control required"-->
<!--placeholder="城市" name="field3">-->
<!--</div>-->
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"所属模块"
name=
"module"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"访问页面"
name=
"modulename"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"关键字"
name=
"keyword"
>
</div>
<!--<div class="col-xs-2">-->
<!--<input type="text" hidden="true" class="form-control required"-->
<!--placeholder="关键字ID" name="keywordid">-->
<!--</div>-->
<div
class=
"col-xs-1"
>
<button
type=
"button"
id=
"search"
class=
"btn btn-primary"
>
搜索
</button>
</div>
<div
class=
"col-xs-1"
>
<button
type=
"button"
id=
"export"
class=
"btn btn-primary"
>
导出
</button>
</div>
<!-- <div class="col-xs-2">
<button type="button" onclick="clearLog()" class="btn btn-primary">清空</button>
</div> -->
</form>
</div>
<div
class=
"box-body"
>
<table
id=
"example2"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
id
</td>
<th
style=
"width: 10%"
>
openId
</th>
<!--<th>昵称</th> -->
<th>
所属模块
</th>
<th>
访问页面
</th>
<th
>
关键字
</th>
<!--<th style="word-wrap: break-word;">关键字ID</th>-->
<!--<th>省份</th>-->
<!--<th>城市</th>-->
<th>
访问IP
</th>
<th>
访问时间
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<!-- END FOOTER -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/input-mask/jquery.inputmask.js"
></script>
<script
src=
"plugins/input-mask/jquery.inputmask.date.extensions.js"
></script>
<script
src=
"plugins/input-mask/jquery.inputmask.extensions.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"
></script>
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"dist/js/demo.js"
></script>
<script
src=
"plugins/bootbox/bootbox.min.js"
></script>
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script>
var
selectedActivity
=
""
;
var
recordingAllByPage
=
""
;
Cfapp
.
init
();
function
formatDates
(
now
)
{
var
now
=
new
Date
(
parseInt
(
now
))
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/mobileviewlog/fetchData')"
;
var
aoData
=
{
iDisplayStart
:
0
,
iDisplayLength
:
10
};
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#example2'
).
DataTable
({
/* "lengthChange" : false, */
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bAutoWidth"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"openid"
},
// {
// "mData" : "field4"
// },
{
"mData"
:
"module"
},
{
"mData"
:
"modulename"
},
{
"mData"
:
"keyword"
},
// {
// "mData" : "keywordid"
// },
// {
// "mData" : "field2"
// },{
// "mData" : "field3"
// },
{
"mData"
:
"ip"
},{
"mData"
:
"vt"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"targets"
:
[
6
],
"mData"
:
"vt"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示id对应的值,c表示当前记录行对象
console
.
log
(
c
.
vt
);
return
formatDates
(
c
.
vt
,
"yyyy-MM-dd HH:mm:ss"
)
}
}]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
"#search"
).
click
(
function
(){
$
(
"#example2"
).
dataTable
().
fnClearTable
();
})
$
(
"#export"
).
click
(
function
(){
var
url
=
'/a/mobileviewlog/export?code='
+
new
Date
().
getTime
();
var
params
;
$
(
"#seachTableForm input,.select2"
).
each
(
function
()
{
if
(
$
(
this
).
val
()){
url
=
url
+
'&'
+
$
(
this
).
attr
(
"name"
)
+
'='
+
$
(
this
).
val
()
}
});
url
=
"#springUrl('"
+
url
+
"')"
;
window
.
open
(
url
);
})
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
});
</script>
</body>
</html>
sys-module-web/src/main/webapp/WEB-INF/views/managerlog/mobileviewloglist.html
deleted
100644 → 0
View file @
5be7f588
<!DOCTYPE html>
<html>
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
table
.table-bordered
th
:last-child
,
table
.table-bordered
td
:last-child
{
word-break
:
break-all
}
table
th
,
td
{
word-break
:
break-all
;
}
</style>
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
id=
"treeSelect"
></div>
<div
class=
"content-wrapper"
style=
"margin-left: 0;"
>
<section
class=
"content-header"
>
<h1>
日志管理
<small>
客户端访问日志信息
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#springUrl('/page/user/showstatics')"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
日志管理
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
>
<!-- <div class="col-xs-2"> -->
<!-- <div class="input-group date"> -->
<!-- <div class="input-group-addon"> -->
<!-- <i class="fa fa-calendar"></i> -->
<!-- </div> -->
<!-- <input type="text" class="form-control pull-right datepicker" -->
<!-- value="$!{sysLogListParam.brithdayStarttime}" -->
<!-- name="brithdayStarttime" placeholder="创建开始时间" -->
<!-- readonly="readonly"> -->
<!-- </div> -->
<!-- </div> -->
<!-- <div class="col-xs-2"> -->
<!-- <div class="input-group date"> -->
<!-- <div class="input-group-addon"> -->
<!-- <i class="fa fa-calendar"></i> -->
<!-- </div> -->
<!-- <input type="text" -->
<!-- class="form-control pull-right datepicker" -->
<!-- value="$!{sysLogListParam.brithdayEndtime}" -->
<!-- name="brithdayEndtime" placeholder="创建结束时间" -->
<!-- readonly="readonly"> -->
<!-- </div> -->
<!-- </div> -->
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"openId"
name=
"openid"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"昵称"
name=
"field4"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"省份"
name=
"field2"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"城市"
name=
"field3"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"所属模块"
name=
"module"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"页面名称"
name=
"modulename"
>
</div>
<div
class=
"col-xs-1"
>
<button
type=
"button"
id=
"search"
class=
"btn btn-primary"
>
搜索
</button>
</div>
<div
class=
"col-xs-1"
>
<button
type=
"button"
id=
"export"
class=
"btn btn-primary"
>
导出
</button>
</div>
<!-- <div class="col-xs-1">
<button type="button" onclick="clearLog()" class="btn btn-primary">清空</button>
</div> -->
</form>
</div>
<div
class=
"box-body"
>
<table
id=
"example2"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
id
</td>
<th
style=
"width: 10%"
>
openId
</th>
<th>
昵称
</th>
<th>
所属模块
</th>
<th>
访问页面
</th>
<th>
省份
</th>
<th>
城市
</th>
<th>
访问IP
</th>
<th>
访问时间
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<!-- END FOOTER -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/input-mask/jquery.inputmask.js"
></script>
<script
src=
"plugins/input-mask/jquery.inputmask.date.extensions.js"
></script>
<script
src=
"plugins/input-mask/jquery.inputmask.extensions.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"
></script>
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"dist/js/demo.js"
></script>
<script
src=
"plugins/bootbox/bootbox.min.js"
></script>
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script>
var
selectedActivity
=
""
;
var
recordingAllByPage
=
""
;
Cfapp
.
init
();
function
formatDates
(
now
)
{
var
now
=
new
Date
(
parseInt
(
now
))
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/mobileviewlog/fetchData')"
;
var
aoData
=
{
iDisplayStart
:
0
,
iDisplayLength
:
10
};
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"POST"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#example2'
).
DataTable
({
/* "lengthChange" : false, */
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bAutoWidth"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"openid"
},
{
"mData"
:
"field4"
},
{
"mData"
:
"module"
},
{
"mData"
:
"modulename"
},{
"mData"
:
"field2"
},{
"mData"
:
"field3"
},{
"mData"
:
"ip"
},{
"mData"
:
"vt"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"targets"
:
[
7
],
"mData"
:
"vt"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示id对应的值,c表示当前记录行对象
console
.
log
(
c
.
vt
);
return
formatDates
(
c
.
vt
,
"yyyy-MM-dd HH:mm:ss"
)
}
}]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
"#export"
).
click
(
function
(){
var
url
=
'/a/mobileviewlog/export?code='
+
new
Date
().
getTime
();
var
params
;
$
(
"#seachTableForm input,.select2"
).
each
(
function
()
{
if
(
$
(
this
).
val
()){
url
=
url
+
'&'
+
$
(
this
).
attr
(
"name"
)
+
'='
+
$
(
this
).
val
()
}
});
url
=
"#springUrl('"
+
url
+
"')"
;
window
.
open
(
url
);
})
$
(
"#search"
).
click
(
function
(){
$
(
"#example2"
).
dataTable
().
fnClearTable
();
})
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
});
</script>
</body>
</html>
sys-module-web/src/main/webapp/WEB-INF/views/managerlog/sysloglist.html
deleted
100644 → 0
View file @
5be7f588
<!DOCTYPE html>
<html>
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
table
.table-bordered
th
:last-child
,
table
.table-bordered
td
:last-child
{
word-break
:
break-all
}
table
th
,
td
{
word-break
:
break-all
;
}
</style>
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
id=
"treeSelect"
></div>
<div
class=
"content-wrapper"
style=
"margin-left: 0;"
>
<section
class=
"content-header"
>
<h1>
日志管理
<small>
后台日志信息
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#springUrl('/page/user/showstatics')"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
日志管理
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/syslog/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control required"
placeholder=
"会员昵称"
name=
"name"
value=
"$!{sysLogListParam.name}"
>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group date"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
<input
type=
"text"
class=
"form-control pull-right datepicker"
value=
"$!{sysLogListParam.brithdayStarttime}"
name=
"brithdayStarttime"
placeholder=
"创建开始时间"
readonly=
"readonly"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group date"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
<input
type=
"text"
class=
"form-control pull-right datepicker"
value=
"$!{sysLogListParam.brithdayEndtime}"
name=
"brithdayEndtime"
placeholder=
"创建结束时间"
readonly=
"readonly"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
搜索
</button>
</div>
</form>
</div>
<div
class=
"box-body"
>
<table
id=
"example2"
class=
"table table-bordered table-striped"
style=
"white-space:"
>
<thead>
<tr>
<td
hidden=
"true"
>
id
</td>
<th>
操作用户
</th>
<th>
URL
</th>
<th>
提交方式
</th>
<th>
操作者IP
</th>
<th>
操作时间
</th>
<th
style=
"width: 300px;"
>
用户代理
</th>
<th
style=
"width: 300px; word-wrap: break-word;"
>
请求参数
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<!-- END FOOTER -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/input-mask/jquery.inputmask.js"
></script>
<script
src=
"plugins/input-mask/jquery.inputmask.date.extensions.js"
></script>
<script
src=
"plugins/input-mask/jquery.inputmask.extensions.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"
></script>
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"dist/js/demo.js"
></script>
<script
src=
"plugins/bootbox/bootbox.min.js"
></script>
<script
src=
"dist/js/app.min.js"
></script>
<script>
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
</script>
<script
src=
"common/js/cfapp.js"
></script>
<script>
var
selectedActivity
=
""
;
var
recordingAllByPage
=
""
;
Cfapp
.
init
();
var
sSource
=
"#springUrl('/a/area/fetchData')"
;
$
(
'#areaselect'
).
on
(
'click'
,
function
()
{
Cfapp
.
modal
({
title
:
'地区选择'
,
url
:
"#springUrl('/a/imagetext/fetchData')"
,
displayFields
:
'areaNames'
,
storeFields
:
'areaIds'
,
success
:
function
()
{
var
temp
=
selectedActivity
.
length
;
for
(
i
=
0
;
i
<
temp
;
i
++
){
if
(
selectedActivity
.
indexOf
(
"."
)
>=
0
){
selectedActivity
=
selectedActivity
.
replace
(
"."
,
""
)
}
else
{
break
;
}
}
selectedActivity
=
selectedActivity
.
substring
(
0
,
selectedActivity
.
lastIndexOf
(
','
));
alert
(
selectedActivity
);
selectedActivity
=
""
;
recordingAllByPage
=
""
;
console
.
log
(
'success'
);
},
cancel
:
function
()
{
console
.
log
(
'cancel'
);
}
})
});
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/syslog/fetchData')"
;
var
aoData
=
{
iDisplayStart
:
0
,
iDisplayLength
:
10
};
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"POST"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#example2'
).
DataTable
({
/* "lengthChange" : false, */
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bAutoWidth"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"createBy"
},
{
"mData"
:
"requestUri"
},
{
"mData"
:
"method"
},
{
"mData"
:
"remoteAddr"
},
{
"mData"
:
"createDate"
},
{
"mData"
:
"userAgent"
},
{
"mData"
:
"params"
}
],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"targets"
:
[
5
],
"mData"
:
"createDate"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示id对应的值,c表示当前记录行对象
return
formatDates
(
a
.
time
,
"yyyy-MM-dd HH:mm:ss"
)
}
}
]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
});
</script>
</body>
</html>
sys-module/src/main/java/com/cftech/sys/controller/MobileLogController.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
controller
;
import
com.cftech.sys.service.MobileLogService
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
/**
* @author 作者 lisw:
* @version 创建时间:2016年10月24日 下午1:34:10
* 后台日志操作Controller
*/
@Controller
@RequestMapping
(
"/a/mobilelog"
)
public
class
MobileLogController
{
@Autowired
private
MobileLogService
mobileLogService
;
@RequestMapping
(
"/list"
)
@ResponseBody
public
JSONObject
rtnJson
(){
// try {
// Pager pager = new Pager();
// pager.setPageNum(1);
// pager.setPageSize(10);
// MobileLog log = new MobileLog();
// Pager page =mobileLogService.selectPage(log, pager);
// if(page!=null && page.getResult()!=null && page.getResult().size()>0){
// List<MobileLog> logs = page.getResult();
// for(MobileLog mobile : logs){
// System.out.println(mobile.getOpenid());
// }
// }else{
// System.out.println("未查询到数据");
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
return
new
JSONObject
();
}
}
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/controller/SysLogController.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
controller
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.JsonDateValueProcessor
;
import
com.cftech.sys.model.Log
;
import
com.cftech.sys.param.SysLogListParam
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.service.LogService
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JsonConfig
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
* @author 作者 lisw:
* @version 创建时间:2016年10月24日 下午1:34:10
* 后台日志操作Controller
*/
@Controller
@RequestMapping
(
"/a/syslog"
)
public
class
SysLogController
{
@Autowired
private
LogService
logService
;
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
value
=
PermissionSign
.
SYSLOG_VIEWS
)
public
String
sysLogList
(
HttpServletRequest
request
,
SysLogListParam
sysLogListParam
,
Model
model
){
model
.
addAttribute
(
"sysLogListParam"
,
sysLogListParam
);
return
"managerlog/sysloglist"
;
}
@RequestMapping
(
value
=
"/fetchData"
,
method
=
RequestMethod
.
POST
)
@RequiresPermissions
(
value
=
PermissionSign
.
SYSLOG_VIEWS
)
@ResponseBody
public
JSONObject
fetchData
(
int
iDisplayStart
,
int
iDisplayLength
,
Log
log
,
SysLogListParam
sysLogListParam
,
HttpServletRequest
request
){
Sort
sort
=
new
Sort
(
"t.create_date"
,
OrderType
.
DESC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"appid"
,
UserUtils
.
getmpaccounts
(
request
).
toString
());
//请求参数
if
(
sysLogListParam
!=
null
){
if
(
StringUtils
.
isNoneBlank
(
sysLogListParam
.
getBrithdayStarttime
())
&&
StringUtils
.
isNoneBlank
(
sysLogListParam
.
getBrithdayEndtime
())){
conds
.
between
(
"t.create_date"
,
sysLogListParam
.
getBrithdayStarttime
(),
sysLogListParam
.
getBrithdayEndtime
());
}
else
if
(
StringUtils
.
isNoneBlank
(
sysLogListParam
.
getBrithdayStarttime
())){
conds
.
greatEqual
(
"t.create_date"
,
sysLogListParam
.
getBrithdayStarttime
());
}
else
if
(
StringUtils
.
isNoneBlank
(
sysLogListParam
.
getBrithdayEndtime
())){
conds
.
lessEqual
(
"t.create_date"
,
sysLogListParam
.
getBrithdayEndtime
());
}
if
(
StringUtils
.
isNoneBlank
(
sysLogListParam
.
getName
())){
conds
.
like
(
"u.username"
,
sysLogListParam
.
getName
());
}
}
// 获取列表数据
List
<
Log
>
activityList
=
logService
.
fetchSearchByPageSysUser
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
// 获得总数
Integer
userCounts
=
logService
.
countSysUser
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
userCounts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
userCounts
);
JsonConfig
jsonConfig
=
new
JsonConfig
();
jsonConfig
.
registerJsonValueProcessor
(
java
.
sql
.
Date
.
class
,
new
JsonDateValueProcessor
(
"yyyy-MM-dd HH:mm:ss"
));
rtnJson
.
put
(
"aaData"
,
JSONArray
.
fromObject
(
activityList
,
jsonConfig
));
return
rtnJson
;
}
}
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/dao/ExportLogMapper.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
dao
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.sys.model.ExportLog
;
import
com.cftech.sys.model.Log
;
import
java.util.List
;
import
java.util.Map
;
/**
* logMapper
* Created by lisw 02/09/2016.
*/
public
interface
ExportLogMapper
extends
GenericDao
<
ExportLog
>
{
}
sys-module/src/main/java/com/cftech/sys/dao/ExportLogMapper.xml
deleted
100644 → 0
View file @
5be7f588
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cftech.sys.dao.ExportLogMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.sys.model.ExportLog"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"remote_addr"
property=
"remoteAddr"
/>
<result
column=
"user_agent"
property=
"userAgent"
/>
<result
column=
"request_uri"
property=
"requestUri"
/>
<result
column=
"method"
property=
"method"
/>
<result
column=
"params"
property=
"params"
/>
<result
column=
"compileparams"
property=
"compileparams"
/>
<result
column=
"appid"
property=
"appid"
/>
<result
column=
"orisql"
property=
"orisql"
/>
<result
column=
"outsql"
property=
"outsql"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND #{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id, type, create_by, create_date, remote_addr, user_agent, request_uri, method, params, compileparams, appid,orisql,outsql
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.sys.model.ExportLog"
keyProperty=
"id"
>
insert into exportlog
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT}, #{type, jdbcType=CHAR}, #{createBy, jdbcType=VARCHAR}, now(),
#{remoteAddr, jdbcType=VARCHAR}, #{userAgent, jdbcType=VARCHAR}, #{requestUri, jdbcType=VARCHAR}, #{method, jdbcType=VARCHAR},
#{params, jdbcType=VARCHAR}, #{compileparams, jdbcType=VARCHAR},#{appid, jdbcType=BIGINT},#{orisql, jdbcType=VARCHAR},#{outsql, jdbcType=VARCHAR}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM exportlog t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM exportlog
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM exportlog t
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.sys.model.ExportLog"
>
update exportlog
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
type = #{type, jdbcType=CHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=VARCHAR},
</if>
<if
test=
"createDate != null"
>
create_date = #{createDate, jdbcType=TIMESTAMP},
</if>
<if
test=
"remoteAddr != null"
>
remote_addr = #{remoteAddr, jdbcType=VARCHAR},
</if>
<if
test=
"userAgent != null"
>
user_agent = #{userAgent, jdbcType=VARCHAR},
</if>
<if
test=
"requestUri != null"
>
request_uri = #{requestUri, jdbcType=VARCHAR},
</if>
<if
test=
"method != null"
>
method = #{method, jdbcType=VARCHAR},
</if>
<if
test=
"params != null"
>
params = #{params, jdbcType=VARCHAR},
</if>
<if
test=
"compileparams != null"
>
compileparams = #{compileparams, jdbcType=VARCHAR},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<delete
id=
"delete"
parameterType=
"java.lang.Long"
>
delete from exportlog where id=#{id,jdbcType=BIGINT}
</delete>
</mapper>
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/dao/LogMapper.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
dao
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.sys.model.Log
;
import
java.util.List
;
import
java.util.Map
;
/**
* logMapper
* Created by lisw 02/09/2016.
*/
public
interface
LogMapper
extends
GenericDao
<
Log
>
{
/**
* 分页查询,关联后台用户
*
* @param params
* @return
*/
List
<
Log
>
fetchSearchByPageSysUser
(
Map
<
String
,
Object
>
params
);
/**
* 查询总数
*
* @return
*/
int
countSysUser
(
Map
<
String
,
Object
>
params
);
}
sys-module/src/main/java/com/cftech/sys/dao/LogMapper.xml
deleted
100644 → 0
View file @
5be7f588
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cftech.sys.dao.LogMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.sys.model.Log"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"remote_addr"
property=
"remoteAddr"
/>
<result
column=
"user_agent"
property=
"userAgent"
/>
<result
column=
"request_uri"
property=
"requestUri"
/>
<result
column=
"method"
property=
"method"
/>
<result
column=
"params"
property=
"params"
/>
<result
column=
"exception"
property=
"exception"
/>
<result
column=
"appid"
property=
"appid"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND #{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id, type, create_by, create_date, remote_addr, user_agent, request_uri, method, params, exception, appid
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.sys.model.Log"
keyProperty=
"id"
>
insert into log
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT}, #{type, jdbcType=CHAR}, #{createBy, jdbcType=VARCHAR}, now(),
#{remoteAddr, jdbcType=VARCHAR}, #{userAgent, jdbcType=VARCHAR}, #{requestUri, jdbcType=VARCHAR}, #{method, jdbcType=VARCHAR},
#{params, jdbcType=VARCHAR}, #{exception, jdbcType=VARCHAR},#{appid, jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM log t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM log
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM log t
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<select
id=
"fetchSearchByPageSysUser"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT t.id,t.type,t.create_date,t.remote_addr,t.user_agent,t.request_uri,t.method,t.params,t.exception,u.username createBy
FROM log t
inner join user u on t.create_by = u.id
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<select
id=
"countSysUser"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM log t
inner join user u on t.create_by = u.id
<include
refid=
"sqlWhere"
/>
</select>
<update
id=
"update"
parameterType=
"com.cftech.sys.model.Log"
>
update log
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
type = #{type, jdbcType=CHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=VARCHAR},
</if>
<if
test=
"createDate != null"
>
create_date = #{createDate, jdbcType=TIMESTAMP},
</if>
<if
test=
"remoteAddr != null"
>
remote_addr = #{remoteAddr, jdbcType=VARCHAR},
</if>
<if
test=
"userAgent != null"
>
user_agent = #{userAgent, jdbcType=VARCHAR},
</if>
<if
test=
"requestUri != null"
>
request_uri = #{requestUri, jdbcType=VARCHAR},
</if>
<if
test=
"method != null"
>
method = #{method, jdbcType=VARCHAR},
</if>
<if
test=
"params != null"
>
params = #{params, jdbcType=VARCHAR},
</if>
<if
test=
"exception != null"
>
exception = #{exception, jdbcType=VARCHAR},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<delete
id=
"delete"
parameterType=
"java.lang.Long"
>
delete from log where id=#{id,jdbcType=BIGINT}
</delete>
</mapper>
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/dao/MobileLogMapper.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
dao
;
import
com.cftech.core.mongo.Pager
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.sys.model.MobileLog
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Example
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* mobileLogMapper
* Created by mb 02/12/2016.
*/
@Repository
public
class
MobileLogMapper
{
@Autowired
private
MongoTemplate
mongoTemplate
;
/**
* 分页查询数据
* @param userBo
* @param pager
* @return
*/
public
Pager
selectPage
(
MobileLog
mobileLog
,
Pager
pager
){
Query
query
=
new
Query
();
Criteria
criteria
=
new
Criteria
();
criteria
.
where
(
"1"
).
is
(
"1"
);
if
(
mobileLog
!=
null
){
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getField1
())){
//日志类型 1:访问日志 2:操作日志
criteria
.
and
(
"field1"
).
is
(
mobileLog
.
getField1
());
}
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getField2
())){
//省市查询
criteria
.
and
(
"field2"
).
regex
(
mobileLog
.
getField2
());
}
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getField3
())){
//省市查询
criteria
.
and
(
"field3"
).
regex
(
mobileLog
.
getField3
());
}
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getField4
())){
//昵称
criteria
.
and
(
"field4"
).
regex
(
mobileLog
.
getField4
());
}
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getOpenid
())){
//openId
criteria
.
and
(
"openid"
).
regex
(
mobileLog
.
getOpenid
());
}
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getAppid
())){
criteria
.
and
(
"appid"
).
regex
(
mobileLog
.
getAppid
());
}
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getModule
())){
criteria
.
and
(
"module"
).
regex
(
mobileLog
.
getModule
());
}
if
(
StringUtils
.
isNotBlank
(
mobileLog
.
getModulename
())){
criteria
.
and
(
"modulename"
).
regex
(
mobileLog
.
getModulename
());
}
}
query
.
addCriteria
(
criteria
);
if
(
pager
.
getPageSize
()>
0
){
query
.
skip
(
pager
.
getPageNum
()*
pager
.
getPageSize
());
query
.
limit
(
pager
.
getPageSize
());
}
Direction
direction
=
false
?
Direction
.
ASC
:
Direction
.
DESC
;
query
.
with
(
new
Sort
(
direction
,
"vt"
));
/*Criteria criteria = new Criteria();
query.addCriteria(criteria);*/
long
total
=
mongoTemplate
.
count
(
query
,
MobileLog
.
class
);
List
<
MobileLog
>
users
=
mongoTemplate
.
find
(
query
,
MobileLog
.
class
);
pager
.
setResult
(
users
);
pager
.
setTotal
(
total
);
return
pager
;
}
}
sys-module/src/main/java/com/cftech/sys/dao/MobileLogMapper.xml
deleted
100644 → 0
View file @
5be7f588
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cftech.sys.dao.MobileLogMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.sys.model.MobileLog"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"remote_addr"
property=
"remoteAddr"
/>
<result
column=
"user_agent"
property=
"userAgent"
/>
<result
column=
"request_uri"
property=
"requestUri"
/>
<result
column=
"method"
property=
"method"
/>
<result
column=
"params"
property=
"params"
/>
<result
column=
"exception"
property=
"exception"
/>
<result
column=
"appid"
property=
"appid"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND #{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id, type, create_date, remote_addr, user_agent, request_uri, method, params, exception, appid
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.sys.model.MobileLog"
keyProperty=
"id"
>
insert into mobile_log
(
id, type, create_date, remote_addr, user_agent, request_uri, method, params, exception, appid
)
values
(
#{id, jdbcType=BIGINT}, #{type, jdbcType=CHAR}, now(), #{remoteAddr, jdbcType=VARCHAR},
#{userAgent, jdbcType=VARCHAR}, #{requestUri, jdbcType=VARCHAR}, #{method, jdbcType=VARCHAR}, #{params, jdbcType=VARCHAR},
#{exception, jdbcType=VARCHAR},#{appid, jdbcType=VARCHAR}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM mobile_log t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM mobile_log t
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM mobile_log t
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.sys.model.MobileLog"
>
update mobile_log
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"type != null"
>
type = #{type, jdbcType=CHAR},
</if>
<if
test=
"createDate != null"
>
create_date = #{createDate, jdbcType=TIMESTAMP},
</if>
<if
test=
"remoteAddr != null"
>
remote_addr = #{remoteAddr, jdbcType=VARCHAR},
</if>
<if
test=
"userAgent != null"
>
user_agent = #{userAgent, jdbcType=VARCHAR},
</if>
<if
test=
"requestUri != null"
>
request_uri = #{requestUri, jdbcType=VARCHAR},
</if>
<if
test=
"method != null"
>
method = #{method, jdbcType=VARCHAR},
</if>
<if
test=
"params != null"
>
params = #{params, jdbcType=VARCHAR},
</if>
<if
test=
"exception != null"
>
exception = #{exception, jdbcType=VARCHAR},
</if>
<if
test=
"appid != null"
>
appid = #{appid, jdbcType=VARCHAR},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update mobile_log set delflag=1 where id=#{id,jdbcType=BIGINT}
</update>
<delete
id=
"deleteAllMobileLog"
>
delete from mobile_log
</delete>
</mapper>
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/dao/MobileViewlogMapper.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
dao
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.sys.model.MobileViewlog
;
/**
* mobileViewlogMapper
* Created by mb 02/12/2016.
*/
public
interface
MobileViewlogMapper
extends
GenericDao
<
MobileViewlog
>
{
int
deleteAllMobileViewLog
();
}
sys-module/src/main/java/com/cftech/sys/dao/MobileViewlogMapper.xml
deleted
100644 → 0
View file @
5be7f588
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cftech.sys.dao.MobileViewlogMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.sys.model.MobileViewlog"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"remote_addr"
property=
"remoteAddr"
/>
<result
column=
"user_agent"
property=
"userAgent"
/>
<result
column=
"request_uri"
property=
"requestUri"
/>
<result
column=
"method"
property=
"method"
/>
<result
column=
"appid"
property=
"appid"
/>
<result
column=
"parenturl"
property=
"parenturl"
/>
<result
column=
"params"
property=
"params"
/>
<result
column=
"accountsid"
property=
"accountsid"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND #{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id, type, create_date, remote_addr, user_agent, request_uri, method, appid, parenturl, params,accountsid
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.sys.model.MobileViewlog"
keyProperty=
"id"
>
insert into mobile_viewlog
(
id, type, create_date, remote_addr, user_agent, request_uri, method, appid, parenturl, params,accountsid
)
values
(
#{id, jdbcType=BIGINT}, #{type, jdbcType=CHAR}, now(), #{remoteAddr, jdbcType=VARCHAR},
#{userAgent, jdbcType=VARCHAR}, #{requestUri, jdbcType=VARCHAR}, #{method, jdbcType=VARCHAR}, #{appid, jdbcType=VARCHAR},
#{parenturl, jdbcType=VARCHAR}, #{params, jdbcType=VARCHAR},#{accountsid, jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM mobile_viewlog t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM mobile_viewlog t
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM mobile_viewlog t
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.sys.model.MobileViewlog"
>
update mobile_viewlog
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"type != null"
>
type = #{type, jdbcType=CHAR},
</if>
<if
test=
"createDate != null"
>
create_date = #{createDate, jdbcType=TIMESTAMP},
</if>
<if
test=
"remoteAddr != null"
>
remote_addr = #{remoteAddr, jdbcType=VARCHAR},
</if>
<if
test=
"userAgent != null"
>
user_agent = #{userAgent, jdbcType=VARCHAR},
</if>
<if
test=
"requestUri != null"
>
request_uri = #{requestUri, jdbcType=VARCHAR},
</if>
<if
test=
"method != null"
>
method = #{method, jdbcType=VARCHAR},
</if>
<if
test=
"appid != null"
>
appid = #{appid, jdbcType=VARCHAR},
</if>
<if
test=
"parenturl != null"
>
parenturl = #{parenturl, jdbcType=VARCHAR},
</if>
<if
test=
"params != null"
>
params = #{params, jdbcType=VARCHAR},
</if>
<if
test=
"accountsid != null"
>
accountsid = #{accountsid, jdbcType=VARCHAR},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update mobile_viewlog set delflag=1 where id=#{id,jdbcType=BIGINT}
</update>
<delete
id=
"deleteAllMobileViewLog"
>
delete from mobile_viewlog
</delete>
</mapper>
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/filter/MobileFilter.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
filter
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.sys.model.MobileViewlog
;
import
com.cftech.sys.service.MobileViewlogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.context.support.WebApplicationContextUtils
;
import
org.springframework.web.context.support.XmlWebApplicationContext
;
import
javax.servlet.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.IOException
;
public
class
MobileFilter
implements
Filter
{
@Autowired
private
MobileViewlogService
mobileViewlogService
;
// private static MobileViewlogServiceImpl mobileViewlogServiceImpl = new MobileViewlogServiceImpl();
@Override
public
void
init
(
FilterConfig
filterConfig
)
throws
ServletException
{
// TODO Auto-generated method stub
}
@Override
public
void
doFilter
(
ServletRequest
servletRequest
,
ServletResponse
servletResponse
,
FilterChain
filterChain
)
throws
IOException
,
ServletException
{
HttpServletRequest
request
=
(
HttpServletRequest
)
servletRequest
;
String
path
=
request
.
getRequestURI
();
if
(
path
.
indexOf
(
".html"
)!=-
1
){
//拦截并且记录此次访问
MobileViewlog
mobileViewlog
=
new
MobileViewlog
();
mobileViewlog
.
setRemoteAddr
(
StringUtils
.
getRemoteAddr
(
request
));
mobileViewlog
.
setUserAgent
(
request
.
getHeader
(
"user-agent"
));
mobileViewlog
.
setRequestUri
(
request
.
getRequestURI
());
mobileViewlog
.
setAppid
(
request
.
getParameter
(
"appid"
));
mobileViewlog
.
setMethod
(
request
.
getDispatcherType
().
toString
());
mobileViewlog
.
setType
(
"1"
);
if
(
request
.
getHeader
(
"REFERER"
)==
null
){
mobileViewlog
.
setType
(
"0"
);
}
else
{
mobileViewlog
.
setParenturl
(
request
.
getHeader
(
"REFERER"
));
}
mobileViewlog
.
setParams
(
request
.
getQueryString
());
ServletContext
sc
=
request
.
getSession
().
getServletContext
();
XmlWebApplicationContext
cxt
=
(
XmlWebApplicationContext
)
WebApplicationContextUtils
.
getWebApplicationContext
(
sc
);
if
(
cxt
!=
null
&&
cxt
.
getBean
(
"mobileViewlogService"
)
!=
null
&&
mobileViewlogService
==
null
)
mobileViewlogService
=
(
MobileViewlogService
)
cxt
.
getBean
(
"mobileViewlogService"
);
this
.
mobileViewlogService
.
save
(
mobileViewlog
);
}
filterChain
.
doFilter
(
servletRequest
,
servletResponse
);
}
@Override
public
void
destroy
()
{
// TODO Auto-generated method stub
}
}
sys-module/src/main/java/com/cftech/sys/interceptor/JWTInterceptor.java
View file @
25cf8c8d
...
...
@@ -6,15 +6,9 @@
package
com
.
cftech
.
sys
.
interceptor
;
import
com.cftech.core.util.JWTUtils
;
import
com.cftech.core.util.SpringContextHolder
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.sys.dao.LogMapper
;
import
com.cftech.sys.model.Log
;
import
com.cftech.sys.model.User
;
import
com.cftech.sys.security.UserUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.servlet.HandlerInterceptor
;
import
org.springframework.web.servlet.ModelAndView
;
...
...
sys-module/src/main/java/com/cftech/sys/interceptor/LogInterceptor.java
deleted
100644 → 0
View file @
5be7f588
/**
* Copyright © 2012-2013 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
package
com
.
cftech
.
sys
.
interceptor
;
import
com.cftech.core.util.SpringContextHolder
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.sys.dao.LogMapper
;
import
com.cftech.sys.model.Log
;
import
com.cftech.sys.model.User
;
import
com.cftech.sys.security.UserUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.servlet.HandlerInterceptor
;
import
org.springframework.web.servlet.ModelAndView
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 系统拦截器
*/
public
class
LogInterceptor
implements
HandlerInterceptor
{
private
static
LogMapper
logDao
=
SpringContextHolder
.
getBean
(
LogMapper
.
class
);
protected
final
Logger
logger
=
LoggerFactory
.
getLogger
(
LogInterceptor
.
class
);
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
return
true
;
}
public
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
modelAndView
)
throws
Exception
{
// if(modelAndView!=null) {
// String viewName = modelAndView.getViewName();
// UserAgent userAgent = UserAgent.parseUserAgentString(request.getHeader("User-Agent"));
// if(viewName.startsWith("modules/") && DeviceType.MOBILE.equals(userAgent.getOperatingSystem().getDeviceType())){
// modelAndView.setViewName(viewName.replaceFirst("modules", "mobile"));
// }
// }
}
@Transactional
(
readOnly
=
false
)
public
void
afterCompletion
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
throws
Exception
{
String
requestRri
=
request
.
getRequestURI
();
if
(
StringUtils
.
contains
(
requestRri
,
"add"
)
||
ex
!=
null
||
StringUtils
.
contains
(
requestRri
,
"save"
)
||
StringUtils
.
contains
(
requestRri
,
"update"
)
||
StringUtils
.
contains
(
requestRri
,
"modify"
)
||
StringUtils
.
contains
(
requestRri
,
"remove"
)
||
StringUtils
.
contains
(
requestRri
,
"delete"
)
||
StringUtils
.
contains
(
requestRri
,
"create"
)
){
User
user
=
UserUtils
.
getUser
();
if
(
user
!=
null
&&
user
.
getId
()!=
null
){
StringBuilder
params
=
new
StringBuilder
();
int
index
=
0
;
for
(
Object
param
:
request
.
getParameterMap
().
keySet
()){
params
.
append
((
index
++
==
0
?
""
:
"&"
)
+
param
+
"="
);
params
.
append
(
StringUtils
.
abbr
(
StringUtils
.
endsWithIgnoreCase
((
String
)
param
,
"password"
)
?
""
:
request
.
getParameter
((
String
)
param
),
100
));
}
Log
log
=
new
Log
();
log
.
setType
(
ex
==
null
?
Log
.
TYPE_ACCESS
:
Log
.
TYPE_EXCEPTION
);
log
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
log
.
setRemoteAddr
(
StringUtils
.
getRemoteAddr
(
request
));
log
.
setUserAgent
(
request
.
getHeader
(
"user-agent"
));
log
.
setRequestUri
(
request
.
getRequestURI
());
log
.
setAppid
(
UserUtils
.
getmpaccounts
(
request
));
log
.
setMethod
(
request
.
getMethod
());
log
.
setParams
(
params
.
toString
());
log
.
setException
(
ex
!=
null
?
ex
.
toString
()
:
""
);
logDao
.
save
(
log
);
}
}
// logger.debug("最大内存: {}, 已分配内存: {}, 已分配内存中的剩余空间: {}, 最大可用内存: {}",
// Runtime.getRuntime().maxMemory(), Runtime.getRuntime().totalMemory(), Runtime.getRuntime().freeMemory(),
// Runtime.getRuntime().maxMemory()-Runtime.getRuntime().totalMemory()+Runtime.getRuntime().freeMemory());
}
}
sys-module/src/main/java/com/cftech/sys/model/ExportLog.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
model
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* log 实体类
* 导出日志表
* @author KangLiang Huang
*/
@Data
@NoArgsConstructor
public
class
ExportLog
implements
Serializable
{
/**
* 编号
*/
private
Long
id
;
/**
* 日志类型
*/
private
String
type
;
/**
* 创建者
*/
private
String
createBy
;
/**
* 创建时间
*/
private
Timestamp
createDate
;
/**
* 操作IP地址
*/
private
String
remoteAddr
;
/**
* 用户代理
*/
private
String
userAgent
;
/**
* 请求URI
*/
private
String
requestUri
;
/**
* 操作方式
*/
private
String
method
;
/**
* 输出的SQL
*/
private
String
outsql
;
/**
* mybatis预编译的SQL
*/
private
String
orisql
;
/**
* 预编译的参数
*/
private
String
compileparams
;
/**
* 请求的参数
*/
private
String
params
;
/**
* 公众号ID
*/
private
Long
appid
;
public
static
final
String
TYPE_ACCESS
=
"1"
;
public
static
final
String
TYPE_EXCEPTION
=
"2"
;
}
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/model/Log.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
model
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* log 实体类
* 日志表
* Created by lisw 02/09/2016.
*/
@Data
@NoArgsConstructor
public
class
Log
implements
Serializable
{
/**
* 编号
*/
private
Long
id
;
/**
* 日志类型
*/
private
String
type
;
/**
* 创建者
*/
private
String
createBy
;
/**
* 创建时间
*/
private
Timestamp
createDate
;
/**
* 操作IP地址
*/
private
String
remoteAddr
;
/**
* 用户代理
*/
private
String
userAgent
;
/**
* 请求URI
*/
private
String
requestUri
;
/**
* 操作方式
*/
private
String
method
;
/**
* 操作提交的数据
*/
private
String
params
;
/**
* 异常信息
*/
private
String
exception
;
/**
* 公众号ID
*/
private
Long
appid
;
public
static
final
String
TYPE_ACCESS
=
"1"
;
public
static
final
String
TYPE_EXCEPTION
=
"2"
;
}
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/model/MobileLog.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
model
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
/**
* mobile_log 实体类
* 日志表
* Created by mb 02/12/2016.
*/
@Data
@NoArgsConstructor
@Document
(
collection
=
"logrecords"
)
public
class
MobileLog
implements
Serializable
{
@Id
private
String
id
;
/** 用户的openID **/
private
String
openid
;
/** 记录的模块 **/
private
String
module
;
/** 记录的模块名称 **/
private
String
modulename
;
/** 记录的关键字 **/
private
String
keyword
;
/** 记录的关键字id **/
private
String
keywordid
;
/** 记录的访问时间,记录时间戳 **/
private
String
vt
;
/** 记录的访问IP **/
private
String
ip
;
/** 记录的Appid **/
private
String
appid
;
/** 记录的页面URL **/
private
String
url
;
//冗余字段
/** field1 **/
private
String
field1
;
//操作日志类型 1:访问日志 2:操作日志
/** field2 **/
private
String
field2
;
//省份
/** field3 **/
private
String
field3
;
//城市
/** field4 **/
private
String
field4
;
//昵称
/** field5 **/
private
String
field5
;
/** field6 **/
private
String
field6
;
/** field7 **/
private
String
field7
;
/** field8 **/
private
String
field8
;
/** field9 **/
private
String
field9
;
/** field10 **/
private
String
field10
;
}
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/model/MobileViewlog.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
model
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* mobile_viewlog 实体类
* 日志表
* Created by mb 02/12/2016.
*/
@Data
@NoArgsConstructor
public
class
MobileViewlog
implements
Serializable
{
/**
* 编号
*/
private
Long
id
;
/**
* 日志类型1:内部跳转0:外部链接
*/
private
String
type
;
/**
* 创建时间
*/
private
Timestamp
createDate
;
/**
* 操作IP地址
*/
private
String
remoteAddr
;
/**
* 用户代理
*/
private
String
userAgent
;
/**
* 请求URI
*/
private
String
requestUri
;
/**
* 操作方式
*/
private
String
method
;
/**
* 公众号标识
*/
private
String
appid
;
/**
* 承载页面的地址
*/
private
String
parenturl
;
/**
* 请求参数
*/
private
String
params
;
/**
* 服务号标识
* */
private
Long
accountsid
;
}
\ No newline at end of file
sys-module/src/main/java/com/cftech/sys/param/SysLogListParam.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
param
;
public
class
SysLogListParam
{
private
String
name
;
private
String
brithdayStarttime
;
private
String
brithdayEndtime
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getBrithdayStarttime
()
{
return
brithdayStarttime
;
}
public
void
setBrithdayStarttime
(
String
brithdayStarttime
)
{
this
.
brithdayStarttime
=
brithdayStarttime
;
}
public
String
getBrithdayEndtime
()
{
return
brithdayEndtime
;
}
public
void
setBrithdayEndtime
(
String
brithdayEndtime
)
{
this
.
brithdayEndtime
=
brithdayEndtime
;
}
@Override
public
String
toString
()
{
return
"SysLogListParam [name="
+
name
+
", brithdayStarttime="
+
brithdayStarttime
+
", brithdayEndtime="
+
brithdayEndtime
+
"]"
;
}
}
sys-module/src/main/java/com/cftech/sys/service/ExportLogService.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.sys.model.ExportLog
;
import
com.cftech.sys.model.Log
;
import
java.util.List
;
import
java.util.Map
;
/**
* logService
* @author KangLiang Huang
*/
public
interface
ExportLogService
extends
GenericService
<
ExportLog
>
{
void
exportRSVPSQL
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
,
String
nameSpaceWithId
,
ExportLog
exportLog
);
void
exportRSVPSQL
(
Map
<
String
,
Object
>
paramster
,
String
nameSpaceWithId
,
ExportLog
exportLog
);
}
sys-module/src/main/java/com/cftech/sys/service/LogService.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.sys.model.Log
;
import
java.util.List
;
/**
* logService
* Created by lisw 02/09/2016.
*/
public
interface
LogService
extends
GenericService
<
Log
>
{
/**
* 分页查询,关联后台用户
*
* @return
*/
List
<
Log
>
fetchSearchByPageSysUser
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
);
/**
* 查询总数
*
* @return
*/
int
countSysUser
(
Conds
conds
);
}
sys-module/src/main/java/com/cftech/sys/service/MobileLogService.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
;
import
com.cftech.core.mongo.Pager
;
import
com.cftech.sys.model.MobileLog
;
/**
* mobileLogService
* Created by mb 02/12/2016.
*/
public
interface
MobileLogService
{
/**
* 分页查询数据
* @param pager
* @return
*/
public
Pager
selectPage
(
MobileLog
mobileLog
,
Pager
pager
);
}
sys-module/src/main/java/com/cftech/sys/service/MobileViewlogService.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.sys.model.MobileViewlog
;
/**
* mobileViewlogService
* Created by mb 02/12/2016.
*/
public
interface
MobileViewlogService
extends
GenericService
<
MobileViewlog
>
{
int
deleteAllMobileViewLog
();
}
sys-module/src/main/java/com/cftech/sys/service/impl/ExportLogServiceImpl.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.sys.dao.ExportLogMapper
;
import
com.cftech.sys.model.ExportLog
;
import
com.cftech.sys.service.ExportLogService
;
import
com.cftech.sys.service.SqlHelper
;
import
com.cftech.sys.util.ExportUtils
;
import
org.apache.ibatis.mapping.BoundSql
;
import
org.apache.ibatis.mapping.MappedStatement
;
import
org.apache.ibatis.mapping.ParameterMapping
;
import
org.apache.ibatis.session.Configuration
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.StringTokenizer
;
/**
* logService
* @author KangLiang Huang
*/
@Service
(
"exportLogService"
)
public
class
ExportLogServiceImpl
extends
GenericServiceImpl
<
ExportLog
>
implements
ExportLogService
{
@Autowired
private
SqlSessionFactory
sqlSessionFactory
;
/**
* exportLogMapper
*/
@Autowired
@Qualifier
(
"exportLogMapper"
)
private
ExportLogMapper
exportLogMapper
;
@Override
public
GenericDao
<
ExportLog
>
getGenericMapper
()
{
return
exportLogMapper
;
}
//获取执行的SQL,分页的调用方式
@Override
@Transactional
(
readOnly
=
false
)
public
void
exportRSVPSQL
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
,
String
nameSpaceWithId
,
ExportLog
exportLog
)
{
Map
<
String
,
Object
>
parameterMap
=
new
HashMap
<
String
,
Object
>();
parameterMap
.
put
(
"conds"
,
conds
);
parameterMap
.
put
(
"offset"
,
page
>
0
?
page
:
0
);
parameterMap
.
put
(
"limit"
,
pageSize
>
0
?
pageSize
:
0
);
parameterMap
.
put
(
"sort"
,
sort
);
Configuration
configuration
=
sqlSessionFactory
.
getConfiguration
();
BoundSql
boundSql
=
configuration
.
getMappedStatement
(
nameSpaceWithId
).
getBoundSql
(
parameterMap
);
String
sql
=
ExportUtils
.
formatSql
(
boundSql
.
getSql
());
// List<ParameterMapping> parameterMappings = boundSql.getParameterMappings();
String
outSQl
=
ExportUtils
.
formatSql
(
SqlHelper
.
getMapperSql
(
configuration
,
nameSpaceWithId
,
parameterMap
).
trim
());
ExportUtils
.
handleLog
(
exportLog
,
sql
,
outSQl
,
parameterMap
);
exportLogMapper
.
save
(
exportLog
);
}
//获取执行的SQL,简单Map的调用方式
@Override
@Transactional
(
readOnly
=
false
)
public
void
exportRSVPSQL
(
Map
<
String
,
Object
>
parameterMap
,
String
nameSpaceWithId
,
ExportLog
exportLog
)
{
Configuration
configuration
=
sqlSessionFactory
.
getConfiguration
();
BoundSql
boundSql
=
configuration
.
getMappedStatement
(
nameSpaceWithId
).
getBoundSql
(
parameterMap
);
String
sql
=
ExportUtils
.
formatSql
(
boundSql
.
getSql
());
// List<ParameterMapping> parameterMappings = boundSql.getParameterMappings();
String
outSQl
=
ExportUtils
.
formatSql
(
SqlHelper
.
getMapperSql
(
configuration
,
nameSpaceWithId
,
parameterMap
).
trim
());
ExportUtils
.
handleLog
(
exportLog
,
sql
,
outSQl
,
parameterMap
);
exportLogMapper
.
save
(
exportLog
);
}
}
sys-module/src/main/java/com/cftech/sys/service/impl/LogServiceImpl.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
.
impl
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.sys.dao.LogMapper
;
import
com.cftech.sys.model.Log
;
import
com.cftech.sys.service.LogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* logService
* Created by lisw 02/09/2016.
*/
@Service
(
"logService"
)
public
class
LogServiceImpl
extends
GenericServiceImpl
<
Log
>
implements
LogService
{
/**
* logMapper
*/
@Autowired
@Qualifier
(
"logMapper"
)
private
LogMapper
logMapper
;
@Override
public
GenericDao
<
Log
>
getGenericMapper
()
{
return
logMapper
;
}
@Override
public
List
<
Log
>
fetchSearchByPageSysUser
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"offset"
,
page
>
0
?
page
:
0
);
params
.
put
(
"limit"
,
pageSize
>
0
?
pageSize
:
0
);
params
.
put
(
"sort"
,
sort
);
return
logMapper
.
fetchSearchByPageSysUser
(
params
);
}
@Override
public
int
countSysUser
(
Conds
conds
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
conds
);
return
logMapper
.
countSysUser
(
params
);
}
}
sys-module/src/main/java/com/cftech/sys/service/impl/MobileLogServiceImpl.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
.
impl
;
import
com.cftech.core.mongo.Pager
;
import
com.cftech.sys.dao.MobileLogMapper
;
import
com.cftech.sys.model.MobileLog
;
import
com.cftech.sys.service.MobileLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* mobileLogService
* Created by mb 02/12/2016.
*/
@Service
(
"mobileLogService"
)
public
class
MobileLogServiceImpl
implements
MobileLogService
{
@Autowired
private
MobileLogMapper
mobileLogMapper
;
@Override
public
Pager
selectPage
(
MobileLog
mobileLog
,
Pager
pager
)
{
return
mobileLogMapper
.
selectPage
(
mobileLog
,
pager
);
}
}
sys-module/src/main/java/com/cftech/sys/service/impl/MobileViewlogServiceImpl.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
service
.
impl
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.sys.dao.MobileViewlogMapper
;
import
com.cftech.sys.model.MobileViewlog
;
import
com.cftech.sys.service.MobileViewlogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
/**
* mobileViewlogService
* Created by mb 02/12/2016.
*/
@Service
(
"mobileViewlogService"
)
public
class
MobileViewlogServiceImpl
extends
GenericServiceImpl
<
MobileViewlog
>
implements
MobileViewlogService
{
/**
* mobileViewlogMapper
*/
@Autowired
@Qualifier
(
"mobileViewlogMapper"
)
private
MobileViewlogMapper
mobileViewlogMapper
;
@Override
public
GenericDao
<
MobileViewlog
>
getGenericMapper
()
{
return
mobileViewlogMapper
;
}
@Override
public
int
deleteAllMobileViewLog
()
{
// TODO Auto-generated method stub
return
mobileViewlogMapper
.
deleteAllMobileViewLog
();
}
}
sys-module/src/main/java/com/cftech/sys/util/ExportUtils.java
deleted
100644 → 0
View file @
5be7f588
package
com
.
cftech
.
sys
.
util
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.sys.model.ExportLog
;
import
com.cftech.sys.model.Log
;
import
com.cftech.sys.security.UserUtils
;
import
org.springframework.http.HttpRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
import
java.util.StringTokenizer
;
/**
* Created by user on 2018/8/2.
*/
public
class
ExportUtils
{
public
static
void
handleLog
(
ExportLog
exportLog
,
String
sql
,
String
outSQl
,
Map
<
String
,
Object
>
parameter
)
{
exportLog
.
setOrisql
(
sql
);
exportLog
.
setOutsql
(
outSQl
);
exportLog
.
setCompileparams
(
JSONObject
.
toJSONString
(
parameter
));
}
public
static
ExportLog
generateExportLog
(
Long
userid
,
HttpServletRequest
request
)
{
ExportLog
log
=
new
ExportLog
();
StringBuilder
params
=
new
StringBuilder
();
int
index
=
0
;
log
.
setType
(
ExportLog
.
TYPE_ACCESS
);
log
.
setCreateBy
(
String
.
valueOf
(
userid
));
log
.
setRemoteAddr
(
StringUtils
.
getRemoteAddr
(
request
));
log
.
setUserAgent
(
request
.
getHeader
(
"user-agent"
));
log
.
setRequestUri
(
request
.
getRequestURI
());
log
.
setAppid
(
UserUtils
.
getmpaccounts
(
request
));
log
.
setMethod
(
request
.
getMethod
());
for
(
Object
param
:
request
.
getParameterMap
().
keySet
()){
params
.
append
((
index
++
==
0
?
""
:
"&"
)
+
param
+
"="
);
params
.
append
(
StringUtils
.
abbr
(
StringUtils
.
endsWithIgnoreCase
((
String
)
param
,
"password"
)
?
""
:
request
.
getParameter
((
String
)
param
),
100
));
}
log
.
setParams
(
params
.
toString
());
return
log
;
}
public
static
String
formatSql
(
String
oriSql
)
{
StringTokenizer
whitespaceStripper
=
new
StringTokenizer
(
oriSql
);
StringBuilder
outerBuilder
=
new
StringBuilder
();
while
(
whitespaceStripper
.
hasMoreTokens
())
{
outerBuilder
.
append
(
whitespaceStripper
.
nextToken
());
outerBuilder
.
append
(
" "
);
}
return
outerBuilder
.
toString
();
}
// public static void main(String[]args)
// {
// String sql = "select hello, osadad dadnasdnalkjndw from dkadasdjj where dasd ='1' ";
// System.out.println(sql);
// sql = formatSql(sql);
// System.out.println(sql);
// }
}
workshop-module/src/main/java/com/cftech/workshop/workshop/web/WorkshopController.java
View file @
25cf8c8d
...
...
@@ -7,15 +7,10 @@ import com.cftech.base.codingrule.utils.CodingruleUtils;
import
com.cftech.core.schafflerentity.VisitEntity
;
import
com.cftech.core.util.*
;
import
com.cftech.sys.model.ExportLog
;
import
com.cftech.sys.service.ExportLogService
;
import
com.cftech.sys.util.ExportUtils
;
import
com.cftech.workshop.details.model.Details
;
import
com.cftech.workshop.details.service.DetailsService
;
import
com.cftech.workshop.details.web.DetailsController
;
import
com.cftech.workshop.meeting.model.Meeting
;
import
com.cftech.workshop.meeting.service.MeetingService
;
import
com.cftech.workshop.signin.web.SignInController
;
import
com.cftech.workshop.workshop.model.Workshop
;
import
com.cftech.workshop.workshop.model.WorkshopDto
;
import
com.cftech.workshop.workshop.model.WorkshopRSVP
;
...
...
@@ -33,16 +28,12 @@ import org.apache.poi.hssf.util.HSSFColor;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.xpath.operations.Or
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.util.HtmlUtils
;
...
...
@@ -50,7 +41,6 @@ import org.springframework.web.util.HtmlUtils;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.util.*
;
...
...
@@ -80,8 +70,6 @@ public class WorkshopController {
@Autowired
private
MeetingService
meetingService
;
@Autowired
private
ExportLogService
exportLogService
;
@Autowired
private
DetailsService
detailsService
;
...
...
@@ -247,15 +235,7 @@ public class WorkshopController {
}
Sort
sort
=
new
Sort
(
"s.sort"
,
OrderType
.
ASC
);
List
<
WorkshopRSVP
>
list1
=
workshopService
.
exportRSVP
(
conds
,
sort
,
0
,
0
);
System
.
out
.
println
();
try
{
ExportLog
exportLog
=
ExportUtils
.
generateExportLog
(
UserUtils
.
getUser
().
getId
(),
request
);
exportLogService
.
exportRSVPSQL
(
conds
,
sort
,
0
,
0
,
"com.cftech.workshop.workshop.dao.WorkshopMapper.exportRSVP"
,
exportLog
);
}
catch
(
Exception
e
)
{
log
.
error
(
"保存导出日志异常"
,
e
);
}
Meeting
meeting
=
meetingService
.
fetchById
(
meetingId
);
//研讨会开始和结束时间
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment