| | |
| | | import com.doumee.dao.business.SitesMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.*; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | if(StringUtils.contains(topic, info)){ |
| | | //如果锁头信息上报 |
| | | String lockid = ss[3];//锁头编码 |
| | | if( StringUtils.isBlank(lockid)){ |
| | | Integer lockid = Constants.formatIntegerFromStr(ss[3]) ;//锁头编码 |
| | | if( lockid == null){ |
| | | //如果锁头编码为空 |
| | | log.error("mqtt消息订阅==============无效数据====="+topic+param); |
| | | return; |
| | |
| | | log.info("mqtt消息订阅=========锁信息==========成功"); |
| | | }else if(StringUtils.contains(topic, closeLock)){ |
| | | //如果还车上报 |
| | | String lockid = ss[3];//锁头编码 |
| | | if( StringUtils.isBlank(lockid)){ |
| | | Integer lockid = Constants.formatIntegerFromStr(ss[3]);//锁头编码 |
| | | if( lockid == null){ |
| | | //如果锁头编码为空 |
| | | log.error("mqtt消息订阅==============无效数据====="+topic+param); |
| | | return; |
| | |
| | | bikes.setBackLockId( lockid); |
| | | bikes.setBackSiteId( siteid); |
| | | bikes.setBackCommondId(logId); |
| | | bikes.setStatus(pjson.getInteger("status")); |
| | | result = memberRidesService.mqttCloseBikeEvent(bikes); |
| | | logInfo = "mqtt消息订阅还车消息"; |
| | | log.info("mqtt消息订阅=========还车==========成功"); |