Commit 8a031077 authored by litengwei's avatar litengwei

消息组件优化

parent 6869ab04
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.ISignService;
import com.yeejoin.amos.boot.module.jcs.api.dto.SignDto;
import com.yeejoin.amos.component.rule.config.RuleConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.MqttException;
......@@ -32,6 +33,7 @@ import java.util.List;
* @author system_generator
* @date 2022-08-15
*/
@Slf4j
@Service
public class SignServiceImpl extends BaseService<SignDto,Sign,SignMapper> implements ISignService {
......@@ -142,7 +144,7 @@ public class SignServiceImpl extends BaseService<SignDto,Sign,SignMapper> implem
jsonObject.put("data",json);
emqKeeper.getMqttClient().publish("emq.sign.created",jsonObject.toString().getBytes(),1,false);
} catch (MqttException e) {
e.printStackTrace();
log.info(String.format("发送eqm打卡消息失败:%s", e.getMessage()));
}
}
return save;
......
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