| | |
| | | package com.sinata.core.aop; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.constant.dictmap.base.AbstractDictMap; |
| | | import com.sinata.core.log.LogManager; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.core.log.factory.LogTaskFactory; |
| | | import com.sinata.core.shiro.ShiroKit; |
| | | import com.sinata.core.shiro.ShiroUser; |
| | | import com.sinata.core.support.HttpKit; |
| | | import com.sinata.core.util.Contrast; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.Signature; |
| | | import org.aspectj.lang.annotation.Around; |
| | |
| | | sb.append(" & "); |
| | | } |
| | | |
| | | //如果涉及到修改,比对变化 |
| | | // 如果涉及到修改,比对变化 |
| | | String msg; |
| | | if (bussinessName.indexOf("修改") != -1 || bussinessName.indexOf("编辑") != -1) { |
| | | Object obj1 = LogObjectHolder.me().get(); |
| | | Map<String, String> obj2 = HttpKit.getRequestParameters(); |
| | | msg = Contrast.contrastObj(dictClass, key, obj1, obj2); |
| | | //msg = Contrast.contrastObj(dictClass, key, obj1, obj2); |
| | | msg = key + "=" + obj2.get(key) |
| | | + ";" + JSONUtil.toJsonStr(obj1) |
| | | + ";" + JSONUtil.toJsonStr(obj2); |
| | | } else { |
| | | Map<String, String> parameters = HttpKit.getRequestParameters(); |
| | | AbstractDictMap dictMap = (AbstractDictMap) dictClass.newInstance(); |
| | | msg = Contrast.parseMutiKey(dictMap, key, parameters); |
| | | //AbstractDictMap dictMap = (AbstractDictMap) dictClass.newInstance(); |
| | | //msg = Contrast.parseMutiKey(dictMap, key, parameters); |
| | | msg = JSONUtil.toJsonStr(parameters); |
| | | } |
| | | |
| | | LogManager.me().executeLog(LogTaskFactory.bussinessLog(user.getId(), bussinessName, className, methodName, msg, HttpKit.getIp())); |