2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-08-15 edbb2fe4eabbb7c526fb2f7313bead37d38928e2
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
@@ -262,12 +262,13 @@
        String orderBy = "t1." + orderByResult + " " + orderBySeq;
        List<Pole> poleList;
        Integer center = param.getCenter();
        if (SecurityUtils.getClientId() == null) {
            poleList = poleMapper.queryPoleOnLineStatesList(null, param.getIsTrue(),
                    param.getBingStates(), param.getGroupid(), param.getKeyword(), param.getCenter(), orderBy);
                    param.getBingStates(), param.getGroupid(), param.getKeyword(), center, orderBy);
        } else {
            poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(),
                    param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword(), param.getCenter(), orderBy);
                    param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword(), center, orderBy);
        }
        poleList.forEach(
@@ -642,10 +643,13 @@
        boolean result = saveOrUpdate(pole);
        if (result) {
            Light light = new Light();
            light.setDeviceCode(uniqueMac);
            light.setLightCount(2);
            SpringContextHolder.getBean(LightService.class).save(light);
            Light light = SpringContextHolder.getBean(LightService.class).getOne(Wrappers.lambdaQuery(Light.class).eq(Light::getDeviceCode, pole.getDeviceCode()).last("limit 1"));
            if (light == null) {
                light = new Light();
                light.setDeviceCode(uniqueMac);
                light.setLightCount(2);
                SpringContextHolder.getBean(LightService.class).save(light);
            }
        }
        /**