|  | @@ -3,10 +3,13 @@ package com.zy.bms.service.lp.impl;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
	
		
			
				|  |  |  import com.zy.bms.entity.lp.LpInfoState;
 | 
	
		
			
				|  |  |  import com.zy.bms.mapper.lp.LpInfoStateMapper;
 | 
	
		
			
				|  |  | +import com.zy.bms.service.IPostMqttMsgService;
 | 
	
		
			
				|  |  |  import com.zy.bms.service.lp.ILpInfoStateService;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import javax.annotation.Resource;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * <p>
 | 
	
		
			
				|  |  |   * 设备-路牌 服务实现类
 | 
	
	
		
			
				|  | @@ -18,8 +21,20 @@ import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  @Service
 | 
	
		
			
				|  |  |  public class LpInfoStateServiceImpl extends ServiceImpl<LpInfoStateMapper, LpInfoState> implements ILpInfoStateService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Resource
 | 
	
		
			
				|  |  | +    private IPostMqttMsgService postMqttMsgService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public LpInfoState getByOpenNum(String openNum) {
 | 
	
		
			
				|  |  |          return baseMapper.selectOne(new QueryWrapper<LpInfoState>().eq("open_num", openNum));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public boolean updateWakeAndThresh(LpInfoState entity) {
 | 
	
		
			
				|  |  | +        if (baseMapper.updateWakeAndThresh(entity) > 0) {
 | 
	
		
			
				|  |  | +            postMqttMsgService.setWakeAndThreshLp(entity.getOpenNum(), entity.getWakeInt(), entity.getThresh());
 | 
	
		
			
				|  |  | +            return true;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return false;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |