Commit 56bb1476 authored by liqin's avatar liqin 💬

Merge branch 'master' of http://111.203.232.171:8888/lee/chnmuseum-party into master

parents 2acadfe6 d1e7bcbf
......@@ -4,7 +4,34 @@ public enum OperModule {
USER(1,"用户管理"),
ROLE(2,"角色管理"),
DEPT(3,"部门管理"),
ORG(4,"机构管理");
ORG(4,"机构管理"),
DISPLAYCOPYRIGHT(5,"展板版权方管理"),
DISPLAYCLASSIFY(6,"展板分类管理"),
DISPLAYCONTENT(7,"展板内容管理"),
VIDEOCOPYRIGHT(8,"视频版权方管理"),
VIDEOCLASSIFY(9,"视频分类管理"),
VIDEOCONTENT(10,"视频内容管理"),
VIDEOREMIT(11,"视频汇出"),
LEARNPROJECT(12,"学习项目管理"),
LEARNCONTENT(13,"学习内容制作"),
CHECKVIDEO(14,"视频审核"),
CHECKDISPLAY(15,"展板审核"),
CHECKLEARN(16,"平台学习内容审核"),
RECHECK(17,"账号禁用审核"),
INTERACTIVE(18,"互动内容"),
STBBASE(19,"机顶盒基础信息管理"),
STBOPERATION(20,"机顶盒运维信息管理"),
STBACCOUNT(21,"机顶盒运维账号管理"),
APPVERSION(22,"app版本管理"),
PAGECUSTOM(23,"app界面自定义"),
OVERVIEW(24,"统计概览"),
INTERACTION(25,"互动统计"),
TEND(26,"趋势分析"),
LOG(27,"日志管理"),
CHANGEPWD(28,"修改密码"),
UNITADMIN(29,"账号管理"),
STATISTICALUSER(30,"统计用户管理")
;
// 错误编码
private Integer code;
......
......@@ -19,7 +19,9 @@ public enum OperType {
LOWER(11,"下架"),
CHANGE_PASSWORD(12,"修改密码"),
RESET_PASSWORD(13,"重置密码"),
VIDEO_EXPORT(14,"视频汇出")
VIDEO_EXPORT(14,"视频汇出"),
UPLOAD(15,"上传"),
CHANGE_STYLE(16,"修改风格"),
;
// 错误编码
......
......@@ -14,6 +14,7 @@ import cn.wisenergy.chnmuseum.party.service.TOperationLogService;
import cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javassist.util.HotSwapper;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.aspectj.lang.JoinPoint;
......@@ -99,16 +100,6 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
resultMap.put("message", e.getMessage());
return resultMap;
}
// if (user==null){
// HashMap<String, Object> resultMap = new HashMap<>();
// resultMap.put("resultCode", "500");
// resultMap.put("message", "用户未登录!");
// return resultMap;
// }
// String methodName = user.getUserName() + "登录本系统";
// if (user.getOrgName() != null) {
// methodName += ",机构" + user.getOrgName();
// }
String packages = point.getThis().getClass().getName();
if (packages.indexOf("$$EnhancerByCGLIB$$") > -1) { // 如果是CGLIB动态生成的类
try {
......@@ -126,10 +117,34 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
// String param=(String) point.proceed(point.getArgs());
object = point.proceed();
} catch (Exception e) {
// 异常处理记录日志..log.error(e);
// 异常处理记录日志..
// e.printStackTrace();
return getFailResult();
}
if (methodLog.operModule().getMsg().contains("运维")) {
//判断是哪个页面调的用户接口,返回不同日志操作对象
if (methodLog.operModule().getCode()==1){
TUser u = null;
if (methodLog.operType().getCode() == 2||methodLog.operType().getCode() == 3) {
u = (TUser) method_param[0];
} else if (methodLog.operType().getCode() == 13) {
u = user;
}else{
String s = (String) method_param[0];
u = userService.getById(s);
}
switch (u.getType()){
case "2": methodLog.operModule().setMsg(OperModule.UNITADMIN.getMsg());
break;
case "3": methodLog.operModule().setMsg(OperModule.STBBASE.getMsg());
break;
case "4": methodLog.operModule().setMsg(OperModule.STBACCOUNT.getMsg());
break;
case "5": methodLog.operModule().setMsg(OperModule.STATISTICALUSER.getMsg());
break;
}
}
if ("机顶盒运维信息管理".equals(methodLog.operModule().getMsg())) {
TOperationLog operationLog = new TOperationLog();
operationLog.setCreateTime(LocalDateTime.now());
operationLog.setUserId(user.getId());
......
......@@ -583,7 +583,7 @@ public class TUserController extends BaseController {
@ApiOperation(value = "管理员重置密码", notes = "管理员重置密码")
@RequestMapping(value = "/resetPassword", method = RequestMethod.PUT)
@RequiresPermissions("/user/resetPassword")
@MethodLog(operModule = OperModule.USER, operType = OperType.UPDATE)
@MethodLog(operModule = OperModule.CHANGEPWD, operType = OperType.UPDATE)
public ResponseEntity<Map<Object, Object>> resetPassword(String userId) {
try {
Map<Object, Object> map = new LinkedHashMap<>();
......
......@@ -21,7 +21,7 @@
r.*
from t_user u
left join t_user_role_link ur on ur.user_id = u.id
left join role r on ur.role_id = r.id
left join t_role r on ur.role_id = r.id
where u.id = #{id}
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment