| | |
| | | if (methodSignature.contains("FaceController.add") || methodSignature.contains("FaceController.update")) { |
| | | map = new HashMap<>(); |
| | | } |
| | | |
| | | String operationMsg = "执行了" + className + "的" + operationTypeName + "操作."; |
| | | String operationDetail = "具体调用方法为:" + methodName + ",具体参数为:" + map.toString(); |
| | | |
| | | |
| | | //根据当前的语言环境设置不同的日志记录 |
| | | String lang = ActionUtil.getLang(); |
| | | if (!lang.contains("zh")) { |
| | | operationMsg = "executed:" + className + " operation"; |
| | | operationDetail = "Specific calling method is " + methodName + ",Specific parameters are " + map.toString(); |
| | | } |
| | | service.record(uId, operationType, operationTime, terminalIp, operationMsg, operationDetail); |
| | | } |
| | | |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | |
| | | public class ActionUtil{ |
| | | |
| | |
| | | String signNow = (String) EncryptionMD5(usefulNum); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (int i = 0; i < 10; i++) { |
| | | sb.append(signNow.charAt(i*2)); |
| | | sb.append(signNow.charAt(i * 2)); |
| | | } |
| | | String signResult = sb.append(signNow).toString(); |
| | | return sign.equals(signResult); |
| | | } |
| | | |
| | | //获取当前系统的语言环境 |
| | | public static String getLang() { |
| | | Locale locale = Locale.getDefault();//对Locale类实例化定义 |
| | | String lang = locale.getLanguage(); |
| | | return lang; |
| | | } |
| | | } |