Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
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
reyun
manager
Commits
b1b3eeda
Commit
b1b3eeda
authored
7 years ago
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示
parent
4e07bb5e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
1 deletion
+11
-1
workspace.xml
.idea/workspace.xml
+0
-0
UserRepository.java
src/main/java/common/repository/UserRepository.java
+4
-0
NewUserLogThread.java
src/main/java/util/NewUserLogThread.java
+6
-0
applicationContext-schedule.xml
src/main/resources/spring/applicationContext-schedule.xml
+1
-1
No files found.
.idea/workspace.xml
View file @
b1b3eeda
This diff is collapsed.
Click to expand it.
src/main/java/common/repository/UserRepository.java
View file @
b1b3eeda
...
@@ -23,6 +23,10 @@ public interface UserRepository extends JpaRepository<User, Long> {
...
@@ -23,6 +23,10 @@ public interface UserRepository extends JpaRepository<User, Long> {
@Query
(
value
=
"select * from user where email = ?1 and del_flag is not true"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from user where email = ?1 and del_flag is not true"
,
nativeQuery
=
true
)
User
login
(
String
email
);
User
login
(
String
email
);
@Query
(
value
=
"select * from user where email = ?1"
,
nativeQuery
=
true
)
User
findByEmail
(
String
email
);
@Query
(
value
=
"select * from user where del_flag is not true and (role = 2 or role = 3)"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from user where del_flag is not true and (role = 2 or role = 3)"
,
nativeQuery
=
true
)
List
<
User
>
findSales
();
List
<
User
>
findSales
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/util/NewUserLogThread.java
View file @
b1b3eeda
package
util
;
package
util
;
import
common.context.AppUtils
;
import
common.context.AppUtils
;
import
common.model.User
;
import
common.model.UserLog
;
import
common.model.UserLog
;
import
common.repository.UserLogRepository
;
import
common.repository.UserLogRepository
;
import
common.repository.UserRepository
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -18,6 +20,8 @@ public class NewUserLogThread
...
@@ -18,6 +20,8 @@ public class NewUserLogThread
protected
Logger
logger
=
LoggerFactory
.
getLogger
(
NewUserLogThread
.
class
);
protected
Logger
logger
=
LoggerFactory
.
getLogger
(
NewUserLogThread
.
class
);
private
UserLogRepository
userLogRepository
=
AppUtils
.
getApplicationContext
().
getBean
(
UserLogRepository
.
class
);
private
UserLogRepository
userLogRepository
=
AppUtils
.
getApplicationContext
().
getBean
(
UserLogRepository
.
class
);
private
UserRepository
userRepository
=
AppUtils
.
getApplicationContext
().
getBean
(
UserRepository
.
class
);
//操作用户
//操作用户
private
String
operaAccount
;
private
String
operaAccount
;
//操作用户名
//操作用户名
...
@@ -66,6 +70,8 @@ public class NewUserLogThread
...
@@ -66,6 +70,8 @@ public class NewUserLogThread
audit
.
setOperateType
(
this
.
operateType
);
audit
.
setOperateType
(
this
.
operateType
);
audit
.
setOldObject
(
this
.
oldObject
);
audit
.
setOldObject
(
this
.
oldObject
);
audit
.
setNewObject
(
this
.
newObject
);
audit
.
setNewObject
(
this
.
newObject
);
User
user
=
userRepository
.
findByEmail
(
this
.
operaAccount
);
audit
.
setRole
(
user
.
getRole
());
if
(
this
.
request
!=
null
)
{
if
(
this
.
request
!=
null
)
{
String
ipAddr
=
IPAddrUtil
.
getIpAddrNew
(
request
);
String
ipAddr
=
IPAddrUtil
.
getIpAddrNew
(
request
);
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/spring/applicationContext-schedule.xml
View file @
b1b3eeda
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<bean
id=
"tkioAccountTask"
class=
"tkio.task.AccountTask"
></bean>
<bean
id=
"tkioAccountTask"
class=
"tkio.task.AccountTask"
></bean>
<task:scheduled-tasks>
<task:scheduled-tasks>
<!--//定时同步短链数据(每5分钟执行一次)-->
<!--//定时同步短链数据(每5分钟执行一次)-->
<task:scheduled
ref=
"tkioAccountTask"
method=
"task"
cron=
"0 11
8
* * ?"
/>
<task:scheduled
ref=
"tkioAccountTask"
method=
"task"
cron=
"0 11
0
* * ?"
/>
</task:scheduled-tasks>
</task:scheduled-tasks>
<bean
id=
"tkioNoticeTask"
class=
"tkio.task.NoticeTask"
></bean>
<bean
id=
"tkioNoticeTask"
class=
"tkio.task.NoticeTask"
></bean>
...
...
This diff is collapsed.
Click to expand it.
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