forked from furioussoul/tailmaster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sunzhengjie
committed
Oct 28, 2017
1 parent
57df7f5
commit fdab233
Showing
8 changed files
with
157 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package esform.util; | ||
|
||
import esform.domain.BaseDomain; | ||
import esform.domain.User; | ||
import esform.filter.OauthFilter; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* Created by | ||
* | ||
* @name:孙证杰 | ||
* @email:[email protected] on 2017/10/28. | ||
*/ | ||
public class Util { | ||
|
||
public static void trace(BaseDomain domain, boolean isCreate){ | ||
User user = OauthFilter.getUser(); | ||
if(null == user){ | ||
throw new RuntimeException("not authorized"); | ||
} | ||
Date now = new Date(); | ||
if(isCreate){ | ||
domain.setCreateBy(user.getUserName()); | ||
domain.setCreateDt(now); | ||
} | ||
domain.setUpdateBy(user.getUserName()); | ||
domain.setUpdateDt(now); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.