|
|
@@ -3,10 +3,13 @@ package com.zhongshu.iot.server.core.service.device;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
|
import com.zhongshu.card.client.model.base.IDParam;
|
|
|
import com.zhongshu.iot.client.model.mqtt.*;
|
|
|
+import com.zhongshu.iot.client.type.type.LogsLevel;
|
|
|
import com.zhongshu.iot.client.type.type.MqttUserState;
|
|
|
import com.zhongshu.iot.server.core.dao.mqtt.*;
|
|
|
import com.zhongshu.iot.server.core.dataConfig.MqttConfig;
|
|
|
import com.zhongshu.iot.server.core.domain.iot.mqtt.*;
|
|
|
+import com.zhongshu.iot.server.core.service.base.SuperService;
|
|
|
+import com.zhongshu.iot.server.core.service.user.OperationLogsService;
|
|
|
import com.zhongshu.iot.server.core.util.CommonUtil;
|
|
|
import com.zhongshu.iot.server.core.util.DateUtils;
|
|
|
import com.zhongshu.iot.server.core.util.bean.BeanUtils;
|
|
|
@@ -30,7 +33,7 @@ import java.util.List;
|
|
|
*/
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
-public class GateWayUserInfoService {
|
|
|
+public class GateWayUserInfoService extends SuperService {
|
|
|
|
|
|
@Autowired
|
|
|
private GateWayUserInfoDao gateWayUserInfoDao;
|
|
|
@@ -65,6 +68,9 @@ public class GateWayUserInfoService {
|
|
|
@Autowired
|
|
|
private GateWayUserInfoTempDao gateWayUserInfoTempDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private OperationLogsService operationLogsService;
|
|
|
+
|
|
|
/**
|
|
|
* 刷新系统所有的用户 和 用户权限数据
|
|
|
*/
|
|
|
@@ -265,6 +271,10 @@ public class GateWayUserInfoService {
|
|
|
|
|
|
// 同步用户
|
|
|
jmxSyncService.syncUserToMQTTService(entity);
|
|
|
+
|
|
|
+ // 添加日志
|
|
|
+ String userId = getCurrentUserId();
|
|
|
+ operationLogsService.addLogs(String.format("%s重置了 %s mqtt账号的密码", userId, entity.getUserName()), LogsLevel.High);
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
|
|