Commit 129824ec authored by liqin's avatar liqin 💬

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

parents 9d81c644 1ae4df7f
...@@ -30,7 +30,8 @@ public enum OperModule { ...@@ -30,7 +30,8 @@ public enum OperModule {
LOG(27,"日志管理"), LOG(27,"日志管理"),
CHANGEPWD(28,"修改密码"), CHANGEPWD(28,"修改密码"),
UNITADMIN(29,"账号管理"), UNITADMIN(29,"账号管理"),
STATISTICALUSER(30,"统计用户管理") STATISTICALUSER(30,"统计用户管理"),
LOGIN(31,"登录管理")
; ;
// 错误编码 // 错误编码
......
...@@ -24,7 +24,8 @@ public enum OperType { ...@@ -24,7 +24,8 @@ public enum OperType {
CHANGE_STYLE(16,"修改风格"), CHANGE_STYLE(16,"修改风格"),
DETAILS(17,"详情"), DETAILS(17,"详情"),
ACTIVATION(18,"激活"), ACTIVATION(18,"激活"),
FAULT(19,"故障") FAULT(19,"故障"),
LOGOUT(21,"退出登录"),
; ;
// 错误编码 // 错误编码
......
...@@ -129,16 +129,17 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> { ...@@ -129,16 +129,17 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
// getMethodLog(user,methodLog,method_param); // getMethodLog(user,methodLog,method_param);
if ("机顶盒运维信息管理".equals(methodLog.operModule().getMsg())) { if (OperModule.STBOPERATION.getMsg().equals(methodLog.operModule().getMsg())) {
TOperationLog operationLog = new TOperationLog(); TOperationLog operationLog = new TOperationLog();
operationLog.setCreateTime(LocalDateTime.now()); operationLog.setCreateTime(LocalDateTime.now());
operationLog.setUserId(user.getId()); operationLog.setUserId(user.getId());
operationLog.setArea(user.getAreaName());
operationLog.setOperationType(methodLog.operType().getMsg()); operationLog.setOperationType(methodLog.operType().getMsg());
operationLogService.save(operationLog); operationLogService.save(operationLog);
return object; return object;
} }
SysLog sysLog = new SysLog(); SysLog sysLog = new SysLog();
if ("1".equals(user.getId())) { if (user.getRoleList().contains("1")) {
sysLog.setType(1); sysLog.setType(1);
} else { } else {
sysLog.setType(2); sysLog.setType(2);
......
...@@ -28,7 +28,7 @@ public class WebLogAspect { ...@@ -28,7 +28,7 @@ public class WebLogAspect {
@Autowired @Autowired
private SysLogController sysLogController; private SysLogController sysLogController;
@Pointcut("execution (public * com.cmbchina.business.hall.web.controller.*.*(..))") @Pointcut("execution (public * cn.wisenergy.chnmuseum.party.web.controller.*.*(..))")
public void methodCutPoint() { public void methodCutPoint() {
} }
...@@ -76,7 +76,7 @@ public class WebLogAspect { ...@@ -76,7 +76,7 @@ public class WebLogAspect {
content = annotation.value(); content = annotation.value();
} }
//插入到系统日志表 //插入到系统日志表
this.sysLogController.insertSysLog(content,null,null); this.sysLogController.insertSysLog(content,null);
} }
return proceedingJoinPoint.proceed(); return proceedingJoinPoint.proceed();
......
...@@ -185,7 +185,7 @@ public class LoginController extends BaseController { ...@@ -185,7 +185,7 @@ public class LoginController extends BaseController {
if (user.getOrgName() != null) { if (user.getOrgName() != null) {
operationContent += ",机构" + user.getOrgName(); operationContent += ",机构" + user.getOrgName();
} }
this.sysLogController.insertSysLog(operationContent, username, user.getId()); this.sysLogController.insertSysLog(operationContent,user);
String token = JwtTokenUtil.sign(username, user.getId()); String token = JwtTokenUtil.sign(username, user.getId());
// 将token信息存入Redis // 将token信息存入Redis
......
...@@ -7,6 +7,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam; ...@@ -7,6 +7,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
import cn.wisenergy.chnmuseum.party.model.RunLog; import cn.wisenergy.chnmuseum.party.model.RunLog;
import cn.wisenergy.chnmuseum.party.model.SysLog; import cn.wisenergy.chnmuseum.party.model.SysLog;
import cn.wisenergy.chnmuseum.party.model.TOperationLog; import cn.wisenergy.chnmuseum.party.model.TOperationLog;
import cn.wisenergy.chnmuseum.party.model.TUser;
import cn.wisenergy.chnmuseum.party.service.TOperationLogService; import cn.wisenergy.chnmuseum.party.service.TOperationLogService;
import cn.wisenergy.chnmuseum.party.service.impl.RunLogServiceImpl; import cn.wisenergy.chnmuseum.party.service.impl.RunLogServiceImpl;
import cn.wisenergy.chnmuseum.party.service.impl.SysLogServiceImpl; import cn.wisenergy.chnmuseum.party.service.impl.SysLogServiceImpl;
...@@ -51,7 +52,7 @@ public class SysLogController extends BaseController { ...@@ -51,7 +52,7 @@ public class SysLogController extends BaseController {
*/ */
@ApiOperation(value = "插入系统日志", notes = "插入系统日志") @ApiOperation(value = "插入系统日志", notes = "插入系统日志")
@PostMapping(value = "/insertSysLog") @PostMapping(value = "/insertSysLog")
public Boolean insertSysLog(String operationContent, String username, String id) { public Boolean insertSysLog(String operationContent, TUser user) {
SysLog sysLog = new SysLog(); SysLog sysLog = new SysLog();
//日志时间 //日志时间
sysLog.setOperationTime(DateUtil80.getDateTimeOfTimestamp(System.currentTimeMillis())); sysLog.setOperationTime(DateUtil80.getDateTimeOfTimestamp(System.currentTimeMillis()));
...@@ -60,13 +61,13 @@ public class SysLogController extends BaseController { ...@@ -60,13 +61,13 @@ public class SysLogController extends BaseController {
HttpServletRequest request = attributes.getRequest(); HttpServletRequest request = attributes.getRequest();
String operationIp = NetWorkUtil.getLoggableAddress(request); String operationIp = NetWorkUtil.getLoggableAddress(request);
sysLog.setOperationIp(operationIp); sysLog.setOperationIp(operationIp);
if (username == null) { if (user.getUserName() == null) {
//操作者用户名 //操作者用户名
sysLog.setOperator(this.getUserName()); sysLog.setOperator(this.getUserName());
} else { } else {
sysLog.setOperator(username); sysLog.setOperator(user.getUserName());
} }
if ("1".equals(id)) { if (user.getRoleList().contains("1")) {
sysLog.setType(1); sysLog.setType(1);
} else { } else {
sysLog.setType(2); sysLog.setType(2);
......
...@@ -615,7 +615,7 @@ public class TUserController extends BaseController { ...@@ -615,7 +615,7 @@ public class TUserController extends BaseController {
@ApiOperation(value = "新增机顶盒账号") @ApiOperation(value = "新增机顶盒账号")
@RequestMapping(value = "/boxAdd", method = RequestMethod.POST) @RequestMapping(value = "/boxAdd", method = RequestMethod.POST)
@RequiresPermissions("/user/boxAdd") @RequiresPermissions("/user/boxAdd")
@MethodLog(operModule = OperModule.USER, operType = OperType.ADD) @MethodLog(operModule = OperModule.STBBASE, operType = OperType.ADD)
public ResponseEntity<Map<String, Object>> BoxAdd(TUser user) { public ResponseEntity<Map<String, Object>> BoxAdd(TUser user) {
Map<String, Object> resultMap = new LinkedHashMap<String, Object>(); Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
try { try {
...@@ -708,7 +708,7 @@ public class TUserController extends BaseController { ...@@ -708,7 +708,7 @@ public class TUserController extends BaseController {
@ApiOperation(value = "新增运维账号") @ApiOperation(value = "新增运维账号")
@RequestMapping(value = "/operationAdd", method = RequestMethod.POST) @RequestMapping(value = "/operationAdd", method = RequestMethod.POST)
@RequiresPermissions("/user/operationAdd") @RequiresPermissions("/user/operationAdd")
@MethodLog(operModule = OperModule.USER, operType = OperType.ADD) @MethodLog(operModule = OperModule.STBACCOUNT, operType = OperType.ADD)
public ResponseEntity<Map<String, Object>> operationAdd(TUser user) { public ResponseEntity<Map<String, Object>> operationAdd(TUser user) {
Map<String, Object> resultMap = new LinkedHashMap<String, Object>(); Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
try { try {
...@@ -779,7 +779,7 @@ public class TUserController extends BaseController { ...@@ -779,7 +779,7 @@ public class TUserController extends BaseController {
@ApiOperation(value = "新增统计账号") @ApiOperation(value = "新增统计账号")
@RequestMapping(value = "/statisticsAdd", method = RequestMethod.POST) @RequestMapping(value = "/statisticsAdd", method = RequestMethod.POST)
@RequiresPermissions("/user/statisticsAdd") @RequiresPermissions("/user/statisticsAdd")
@MethodLog(operModule = OperModule.USER, operType = OperType.ADD) @MethodLog(operModule = OperModule.STATISTICALUSER, operType = OperType.ADD)
public ResponseEntity<Map<String, Object>> statisticsAdd(TUser user) { public ResponseEntity<Map<String, Object>> statisticsAdd(TUser user) {
Map<String, Object> resultMap = new LinkedHashMap<String, Object>(); Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
try { try {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</sql> </sql>
<select id="getList" resultMap="BaseResultMap"> <select id="getList" resultMap="BaseResultMap">
SELECT b.*,r.`name` organ_name SELECT b.id,b.organ_id,b.mac,b.status,b.area_id,b.create_time,b.update_time,r.`name` organ_name
FROM t_box_operation b FROM t_box_operation b
left join t_organ r on r.id = b.organ_id left join t_organ r on r.id = b.organ_id
where 1=1 where 1=1
...@@ -36,7 +36,7 @@ left join t_organ r on r.id = b.organ_id ...@@ -36,7 +36,7 @@ left join t_organ r on r.id = b.organ_id
</select> </select>
<select id="selectBoxPage" resultMap="BaseResultMap"> <select id="selectBoxPage" resultMap="BaseResultMap">
select b.*,o.name organ_name,a.full_name area_name select b.id,b.organ_id,b.mac,b.status,b.area_id,b.create_time,b.update_time,o.name organ_name,a.full_name area_name
from t_user u from t_user u
left join t_organ o on o.id = u.org_id left join t_organ o on o.id = u.org_id
left join t_area a on u.area_id = a.id left join t_area a on u.area_id = a.id
...@@ -60,7 +60,7 @@ left join t_organ r on r.id = b.organ_id ...@@ -60,7 +60,7 @@ left join t_organ r on r.id = b.organ_id
</select> </select>
<select id="selectPageList" resultMap="BaseResultMap"> <select id="selectPageList" resultMap="BaseResultMap">
SELECT b.*,r.`name` organ_name SELECT b.id,b.organ_id,b.mac,b.status,b.area_id,b.create_time,b.update_time,r.`name` organ_name
FROM t_box_operation b FROM t_box_operation b
left join t_organ r on r.id = b.organ_id left join t_organ r on r.id = b.organ_id
where 1=1 where 1=1
......
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