|
@@ -0,0 +1,42 @@
|
|
|
+package com.fdkankan.manage.service.impl;
|
|
|
+
|
|
|
+import com.fdkankan.manage.entity.CameraIncrementLog;
|
|
|
+import com.fdkankan.manage.entity.UserIncrement;
|
|
|
+import com.fdkankan.manage.mapper.ICameraIncrementLogMapper;
|
|
|
+import com.fdkankan.manage.service.ICameraIncrementLogService;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fdkankan.manage.service.IUserIncrementService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 服务实现类
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author
|
|
|
+ * @since 2023-02-01
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class CameraIncrementLogServiceImpl extends ServiceImpl<ICameraIncrementLogMapper, CameraIncrementLog> implements ICameraIncrementLogService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void saveLog(Long cameraId, Long incrementId, Long userId, Integer operationType) {
|
|
|
+ CameraIncrementLog cameraIncrementLog = new CameraIncrementLog();
|
|
|
+ cameraIncrementLog.setCameraId(cameraId);
|
|
|
+ cameraIncrementLog.setOperationType(operationType);
|
|
|
+ cameraIncrementLog.setOperationUser(userId);
|
|
|
+ cameraIncrementLog.setIncrementId(incrementId);
|
|
|
+ this.save(cameraIncrementLog);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ IUserIncrementService userIncrementService;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void saveUnbindLog(Long cameraId) {
|
|
|
+ UserIncrement userIncrement = userIncrementService.getByCameraId(cameraId);
|
|
|
+ this.saveLog(cameraId,userIncrement.getId(),null,1);
|
|
|
+ }
|
|
|
+}
|