2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-13 3f65fcaa359cadeffa9cec2c757ab879d0aad739
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java
@@ -2,20 +2,26 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.sandu.common.service.impl.BaseServiceImpl;
import com.sandu.ximon.admin.utils.VnnoxAPIUtil;
import com.sandu.ximon.dao.domain.LedPlayerEntity;
import com.sandu.ximon.dao.mapper.LedPlayerEntityMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
 * @Author liuhaonan
 * @Date 2021/12/22 15:27
 * @Version 1.0
 * 诺瓦设备
 */
@Service
@AllArgsConstructor
public class LedPlayerEntityService extends BaseServiceImpl<LedPlayerEntityMapper, LedPlayerEntity> {
    private final LedPlayerEntityMapper ledPlayerEntityMapper;
    private VnnoxAPIUtil vnnoxAPIUtil;
    public LedPlayerEntity getBySn(String sn){
        return getOne(Wrappers.lambdaQuery(LedPlayerEntity.class).eq(LedPlayerEntity::getSn, sn));
@@ -29,8 +35,23 @@
    }
  /*  public void listLed(String keyWord){
    /**
     * 诺瓦硬件设备
     */
    public LedPlayerEntity getBySnAndPlayerId(String sn){
        LedPlayerEntity one = getOne(Wrappers.lambdaQuery(LedPlayerEntity.class).eq(LedPlayerEntity::getSn, sn));
        if(one==null){
            throw new RuntimeException("诺瓦设备不存在");
        }
        List list=new ArrayList();
        list.add(one);
        List<LedPlayerEntity> led = vnnoxAPIUtil.syncCurrentInfo(list);
        return led.get(0);
    }
        Wrappers.lambdaQuery(LedPlayerEntity.class).eq(LedPlayerEntity::get)
    }*/
}