Browse Source

报告统计接口添加日志注解

fuyuchuan 2 weeks ago
parent
commit
52d13f2656

+ 5 - 0
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/PmTimeConfServiceImpl.java

@@ -338,6 +338,8 @@ public class PmTimeConfServiceImpl extends AbstractCrudService<PmTimeConfMapper,
     @Override
     public void isOpen(Integer isOpen, Integer id) {
         Long userId = SecurityUtils.getUserId();
+        String username = SecurityUtils.getUsername();
+        LocalDateTime now = LocalDateTime.now();
         PmTimeConf pmTimeConf = pmTimeConfMapper.selectById(id);
         if (pmTimeConf == null){
             throw new BusinessException("配置不存在!联系管理员后重试");
@@ -350,6 +352,9 @@ public class PmTimeConfServiceImpl extends AbstractCrudService<PmTimeConfMapper,
         } else {
             throw new BusinessException("参数异常,报告提醒开关操作失败!");
         }
+
+        pmTimeConf.setUpdateBy(username);
+        pmTimeConf.setUpdateTime(now);
         pmTimeConfMapper.updateById(pmTimeConf);
     }