| | |
| | | import org.springframework.boot.system.ApplicationHome; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.text.ParseException; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 通用工具列 |
| | |
| | | ApplicationHome applicationHome = new ApplicationHome(CommonUtil.class); |
| | | File jarFile = applicationHome.getDir(); |
| | | String baseDirPath; |
| | | if(YamlProperties.runModel == 1) { |
| | | if (YamlProperties.runModel == 1) { |
| | | //开发路径 |
| | | baseDirPath = jarFile.getParentFile().toString(); |
| | | }else { |
| | | } else { |
| | | //打包路径 |
| | | baseDirPath = jarFile.toString(); |
| | | } |
| | | return baseDirPath; |
| | | } |
| | | |
| | | /**手动记录特定日志*/ |
| | | public static void record(long uId, int operationType, String msg){ |
| | | userLogService.record(uId,operationType,msg); |
| | | /** |
| | | * 手动记录特定日志 |
| | | */ |
| | | public static void record(long uId, int operationType, String msg, String msgEnUs) { |
| | | userLogService.record(uId, operationType, msg, msgEnUs); |
| | | } |
| | | |
| | | /**手动记录特定日志*/ |
| | | public static void record(long uId, int operationType, String msg,String msgDetail){ |
| | | userLogService.record(uId,operationType,msg,msgDetail); |
| | | /** |
| | | * 手动记录特定日志 |
| | | */ |
| | | public static void record(long uId, int operationType, String msg, String msgDetail, String msgEnUs, String msgDetailEnUs) { |
| | | userLogService.record(uId, operationType, msg, msgDetail, msgEnUs, msgDetailEnUs); |
| | | } |
| | | /**手动记录特定日志*/ |
| | | public static void record2(HttpServletRequest request,long uId, int operationType, String msg,String msgDetail){ |
| | | userLogService.record2(request,uId,operationType,msg,msgDetail); |
| | | |
| | | /** |
| | | * 手动记录特定日志 |
| | | */ |
| | | public static void record2(HttpServletRequest request, long uId, int operationType, String msg, String msgDetail, String msgEnUs, String msgDetailEnUs) { |
| | | userLogService.record2(request, uId, operationType, msg, msgDetail, msgEnUs, msgDetailEnUs); |
| | | } |
| | | |
| | | } |