|
@@ -6,13 +6,11 @@ import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.xjrsoft.common.exception.MyException;
|
|
|
-import com.xjrsoft.common.mqtt.EmqClient;
|
|
|
import com.xjrsoft.module.personnel.entity.CarManagement;
|
|
|
import com.xjrsoft.module.personnel.mapper.CarManagementMapper;
|
|
|
import com.xjrsoft.module.personnel.service.ICarManagementService;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.eclipse.paho.mqttv5.common.MqttException;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -24,7 +22,6 @@ import java.util.List;
|
|
|
public class CarManagementServiceImpl extends MPJBaseServiceImpl<CarManagementMapper, CarManagement> implements ICarManagementService {
|
|
|
private final CarManagementMapper carManagementMapper;
|
|
|
|
|
|
- private EmqClient emqClient;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -47,11 +44,6 @@ public class CarManagementServiceImpl extends MPJBaseServiceImpl<CarManagementMa
|
|
|
.put("cType", carManagement.getCType())
|
|
|
.put("cFeeType", carManagement.getCFeeType());
|
|
|
|
|
|
- try {
|
|
|
- emqClient.publish("/car/identify/add", jsonObject);
|
|
|
- } catch (MqttException e) {
|
|
|
- log.error("mqtt", "publish", "/car/identify/add", e.getMessage());
|
|
|
- }
|
|
|
|
|
|
return true;
|
|
|
}
|
|
@@ -75,11 +67,6 @@ public class CarManagementServiceImpl extends MPJBaseServiceImpl<CarManagementMa
|
|
|
.put("cType", carManagement.getCType())
|
|
|
.put("cFeeType", carManagement.getCFeeType());
|
|
|
|
|
|
- try {
|
|
|
- emqClient.publish("/car/identify/update", jsonObject);
|
|
|
- } catch (MqttException e) {
|
|
|
- log.error("mqtt", "publish", "/car/identify/update", e.getMessage());
|
|
|
- }
|
|
|
|
|
|
return true;
|
|
|
}
|
|
@@ -96,12 +83,6 @@ public class CarManagementServiceImpl extends MPJBaseServiceImpl<CarManagementMa
|
|
|
|
|
|
JSONObject jsonObject = JSONUtil.createObj()
|
|
|
.put("cId", item.getCSyncId());
|
|
|
-
|
|
|
- try {
|
|
|
- emqClient.publish("/car/identify/delete", jsonObject);
|
|
|
- } catch (MqttException e) {
|
|
|
- log.error("mqtt", "publish", "/car/identify/delete", e.getMessage());
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
return true;
|