2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-18 7f74c2a4101e25e7889c046e8d3bcc1c30f360d3
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java
@@ -7,6 +7,7 @@
import com.sandu.common.service.impl.BaseServiceImpl;
import com.sandu.common.util.SpringContextHolder;
import com.sandu.ximon.admin.security.SecurityUtils;
import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils;
import com.sandu.ximon.admin.utils.VnnoxAPIUtil;
import com.sandu.ximon.admin.vo.EquipmentInfomation;
import com.sandu.ximon.dao.domain.LedPlayerEntity;
@@ -38,8 +39,29 @@
        return getOne(Wrappers.lambdaQuery(LedPlayerEntity.class).eq(LedPlayerEntity::getPlayerId, playerId));
    }
    /**
     * 诺瓦设备新增
     *
     * @param ledPlayerEntity
     * @return
     */
    public boolean saveLed(LedPlayerEntity ledPlayerEntity) {
        return ledPlayerEntityMapper.saveLed(ledPlayerEntity);
        boolean b = ledPlayerEntityMapper.saveLed(ledPlayerEntity);
        /**
         * 诺瓦设备新增 日志记录开始
         */
        List<String> listCode = new ArrayList<>(1);
        listCode.add(ledPlayerEntity.getSn());
        String content = "{ 设备id:" + ledPlayerEntity.getId() + "设备code:" + ledPlayerEntity.getSn()
                + "诺瓦playId:" + ledPlayerEntity.getPlayerId()
                + "诺瓦设备名称:" + ledPlayerEntity.getName() +
                "}";
        StoreOperationRecordsUtils.storeOperationData(listCode, null, "诺瓦设备新增", content);
        /**
         * 诺瓦设备新增 日志记录结束
         */
        return b;
    }
@@ -109,14 +131,4 @@
        return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list));
    }
//    public List<LedPlayerEntity> ledPlayerEntityList() {
//        List<LedPlayerEntity> list;
//        //超管
//        if (SecurityUtils.getClientId() == null) {
//            list = ledPlayerEntityMapper.ledPlayerEntityList(null, null);
//        } else {
//            list = ledPlayerEntityMapper.ledPlayerEntityList(null, SecurityUtils.getUserId());
//        }
//        return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list));
//    }
}