初始代码
This commit is contained in:
27
yunzhupaas-visualdata/yunzhupaas-visualdata-biz/pom.xml
Normal file
27
yunzhupaas-visualdata/yunzhupaas-visualdata-biz/pom.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>yunzhupaas-visualdata</artifactId>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<version>5.2.0-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yunzhupaas-visualdata-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-visualdata-entity</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualAssetsEntity;
|
||||
|
||||
/**
|
||||
* 静态资源
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
public interface VisualAssetsMapper extends SuperMapper<VisualAssetsEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualCategoryEntity;
|
||||
|
||||
/**
|
||||
* 大屏分类
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualCategoryMapper extends SuperMapper<VisualCategoryEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualComponentEntity;
|
||||
|
||||
/**
|
||||
* 大屏组件库
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
public interface VisualComponentMapper extends SuperMapper<VisualComponentEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualConfigEntity;
|
||||
|
||||
/**
|
||||
* 大屏基本配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualConfigMapper extends SuperMapper<VisualConfigEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualDbEntity;
|
||||
|
||||
/**
|
||||
* 大屏数据源配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualDbMapper extends SuperMapper<VisualDbEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualGlobEntity;
|
||||
|
||||
/**
|
||||
* 全局变量
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
public interface VisualGlobMapper extends SuperMapper<VisualGlobEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualMapEntity;
|
||||
|
||||
/**
|
||||
* 大屏地图配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualMapMapper extends SuperMapper<VisualMapEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualEntity;
|
||||
|
||||
/**
|
||||
* 大屏基本信息
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualMapper extends SuperMapper<VisualEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.mapper;
|
||||
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import com.yunzhupaas.visualdata.entity.VisualRecordEntity;
|
||||
|
||||
/**
|
||||
* 大屏数据集
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
public interface VisualRecordMapper extends SuperMapper<VisualRecordEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualAssetsEntity;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 静态资源
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualAssetsService extends SuperService<VisualAssetsEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
* @return
|
||||
*/
|
||||
List<VisualAssetsEntity> getList(VisualPaginationModel pagination);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VisualAssetsEntity> getList();
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualAssetsEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualAssetsEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualAssetsEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
boolean delete(String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualCategoryEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualCategoryService extends SuperService<VisualCategoryEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
*/
|
||||
List<VisualCategoryEntity> getList(VisualPaginationModel pagination,boolean isPage);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return 大屏分类列表
|
||||
*/
|
||||
List<VisualCategoryEntity> getList();
|
||||
|
||||
/**
|
||||
* 验证值
|
||||
*
|
||||
* @param value 名称
|
||||
* @param id 主键值
|
||||
* @return ignore
|
||||
*/
|
||||
boolean isExistByValue(String value, String id);
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return ignore
|
||||
*/
|
||||
VisualCategoryEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualCategoryEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return ignore
|
||||
*/
|
||||
boolean update(String id, VisualCategoryEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualCategoryEntity entity);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualComponentEntity;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏组件库
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualComponentService extends SuperService<VisualComponentEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
* @return
|
||||
*/
|
||||
List<VisualComponentEntity> getList(VisualPaginationModel pagination);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VisualComponentEntity> getList();
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualComponentEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualComponentEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualComponentEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualComponentEntity entity);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualConfigEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏基本配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualConfigService extends SuperService<VisualConfigEntity> {
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VisualConfigEntity> getList();
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualConfigEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualConfigEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualConfigEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualConfigEntity entity);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualDbEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 大屏数据源配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualDbService extends SuperService<VisualDbEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
* @return
|
||||
*/
|
||||
List<VisualDbEntity> getList(VisualPaginationModel pagination);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VisualDbEntity> getList();
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualDbEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualDbEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualDbEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualDbEntity entity);
|
||||
|
||||
/**
|
||||
* 测试连接
|
||||
*
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean dbTest(VisualDbEntity entity);
|
||||
|
||||
/**
|
||||
* 执行sql
|
||||
*
|
||||
* @param entity 实体对象
|
||||
* @param sql sql
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> query(VisualDbEntity entity, String sql);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualGlobEntity;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏组件库
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualGlobService extends SuperService<VisualGlobEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
* @return
|
||||
*/
|
||||
List<VisualGlobEntity> getList(VisualPaginationModel pagination);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VisualGlobEntity> getList();
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualGlobEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualGlobEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualGlobEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualGlobEntity entity);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualMapEntity;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏地图配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualMapService extends SuperService<VisualMapEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
* @return
|
||||
*/
|
||||
List<VisualMapEntity> getList(VisualPaginationModel pagination);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param pagination 条件
|
||||
* @param columns 筛选字段
|
||||
* @return
|
||||
*/
|
||||
List<VisualMapEntity> getListWithColnums(VisualPaginationModel pagination, SFunction<VisualMapEntity, ?>... columns);
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualMapEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualMapEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualMapEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualMapEntity entity);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 是否存在夏季
|
||||
*/
|
||||
boolean hasChild(String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.visualdata.entity.VisualRecordEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏数据集
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
public interface VisualRecordService extends SuperService<VisualRecordEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
* @return
|
||||
*/
|
||||
List<VisualRecordEntity> getList(VisualPaginationModel pagination);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VisualRecordEntity> getList();
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualRecordEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void create(VisualRecordEntity entity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualRecordEntity entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualRecordEntity entity);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.yunzhupaas.visualdata.service;
|
||||
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
import com.yunzhupaas.visualdata.entity.VisualConfigEntity;
|
||||
import com.yunzhupaas.visualdata.entity.VisualEntity;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏基本信息
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public interface VisualService extends SuperService<VisualEntity> {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 条件
|
||||
* @return
|
||||
*/
|
||||
List<VisualEntity> getList(VisualPaginationModel pagination);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VisualEntity> getList();
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param id 主键值
|
||||
* @return
|
||||
*/
|
||||
VisualEntity getInfo(String id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
* @param configEntity 配置属性
|
||||
*/
|
||||
void create(VisualEntity entity, VisualConfigEntity configEntity);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param id 主键值
|
||||
* @param entity 实体对象
|
||||
* @param configEntity 配置属性
|
||||
* @return
|
||||
*/
|
||||
boolean update(String id, VisualEntity entity, VisualConfigEntity configEntity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param entity 实体对象
|
||||
*/
|
||||
void delete(VisualEntity entity);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param entity 实体对象
|
||||
* @param configEntity 配置属性
|
||||
* @throws DataException
|
||||
*/
|
||||
void createImport(VisualEntity entity, VisualConfigEntity configEntity) throws DataException;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.util.StringUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualAssetsEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualAssetsMapper;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualAssetsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 静态资源
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Service
|
||||
public class VisualAssetsServiceImpl extends SuperServiceImpl<VisualAssetsMapper, VisualAssetsEntity> implements VisualAssetsService {
|
||||
|
||||
@Override
|
||||
public List<VisualAssetsEntity> getList(VisualPaginationModel pagination) {
|
||||
QueryWrapper<VisualAssetsEntity> queryWrapper = new QueryWrapper<>();
|
||||
if(ObjectUtil.isNotEmpty(pagination.getAssetsName())){
|
||||
queryWrapper.lambda().like(VisualAssetsEntity::getAssetsName, pagination.getAssetsName());
|
||||
}
|
||||
Page page = new Page(pagination.getCurrent(), pagination.getSize());
|
||||
IPage<VisualAssetsEntity> iPages = this.page(page, queryWrapper);
|
||||
return pagination.setData(iPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VisualAssetsEntity> getList() {
|
||||
QueryWrapper<VisualAssetsEntity> queryWrapper = new QueryWrapper<>();
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualAssetsEntity getInfo(String id) {
|
||||
QueryWrapper<VisualAssetsEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualAssetsEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualAssetsEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualAssetsEntity entity) {
|
||||
entity.setId(id);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(String id) {
|
||||
if (StringUtil.isNotEmpty(id)) {
|
||||
return this.removeById(id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualCategoryEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualCategoryMapper;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualCategoryService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏分类
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Service
|
||||
public class VisualCategoryServiceImpl extends SuperServiceImpl<VisualCategoryMapper, VisualCategoryEntity> implements VisualCategoryService {
|
||||
|
||||
@Override
|
||||
public List<VisualCategoryEntity> getList(VisualPaginationModel pagination,boolean isPage) {
|
||||
QueryWrapper<VisualCategoryEntity> queryWrapper = new QueryWrapper<>();
|
||||
if(ObjectUtil.isNotEmpty(pagination.getCategoryValue())){
|
||||
queryWrapper.lambda().like(VisualCategoryEntity::getCategorykey,pagination.getCategoryValue());
|
||||
}
|
||||
queryWrapper.lambda().orderByAsc(VisualCategoryEntity::getCategorykey);
|
||||
if(isPage){
|
||||
Page page = new Page(pagination.getCurrent(), pagination.getSize());
|
||||
IPage<VisualCategoryEntity> iPages = this.page(page, queryWrapper);
|
||||
return pagination.setData(iPages);
|
||||
}
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VisualCategoryEntity> getList() {
|
||||
QueryWrapper<VisualCategoryEntity> queryWrapper = new QueryWrapper<>();
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExistByValue(String value, String id) {
|
||||
QueryWrapper<VisualCategoryEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualCategoryEntity::getCategoryvalue, value);
|
||||
if (!StringUtils.isEmpty(id)) {
|
||||
queryWrapper.lambda().ne(VisualCategoryEntity::getId, id);
|
||||
}
|
||||
return this.count(queryWrapper) > 0 ? true : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualCategoryEntity getInfo(String id) {
|
||||
QueryWrapper<VisualCategoryEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualCategoryEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualCategoryEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualCategoryEntity entity) {
|
||||
entity.setId(id);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualCategoryEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualComponentEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualComponentMapper;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualComponentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏组件库
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Service
|
||||
public class VisualComponentServiceImpl extends SuperServiceImpl<VisualComponentMapper, VisualComponentEntity> implements VisualComponentService {
|
||||
|
||||
@Override
|
||||
public List<VisualComponentEntity> getList(VisualPaginationModel pagination) {
|
||||
QueryWrapper<VisualComponentEntity> queryWrapper = new QueryWrapper<>();
|
||||
if(ObjectUtil.isNotEmpty(pagination.getName())){
|
||||
queryWrapper.lambda().like(VisualComponentEntity::getName, pagination.getName());
|
||||
}
|
||||
queryWrapper.lambda().eq(VisualComponentEntity::getType, pagination.getType());
|
||||
Page page = new Page(pagination.getCurrent(), pagination.getSize());
|
||||
IPage<VisualComponentEntity> iPages = this.page(page, queryWrapper);
|
||||
return pagination.setData(iPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VisualComponentEntity> getList() {
|
||||
QueryWrapper<VisualComponentEntity> queryWrapper = new QueryWrapper<>();
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualComponentEntity getInfo(String id) {
|
||||
QueryWrapper<VisualComponentEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualComponentEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualComponentEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualComponentEntity entity) {
|
||||
entity.setId(id);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualComponentEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualConfigEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualConfigMapper;
|
||||
import com.yunzhupaas.visualdata.service.VisualConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 大屏基本配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Service
|
||||
public class VisualConfigServiceImpl extends SuperServiceImpl<VisualConfigMapper, VisualConfigEntity> implements VisualConfigService {
|
||||
|
||||
@Override
|
||||
public List<VisualConfigEntity> getList() {
|
||||
QueryWrapper<VisualConfigEntity> queryWrapper = new QueryWrapper<>();
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualConfigEntity getInfo(String id) {
|
||||
QueryWrapper<VisualConfigEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualConfigEntity::getVisualId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualConfigEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualConfigEntity entity) {
|
||||
entity.setId(id);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualConfigEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.database.model.dto.PrepSqlDTO;
|
||||
import com.yunzhupaas.database.util.ConnUtil;
|
||||
import com.yunzhupaas.database.util.JdbcUtil;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.util.UserProvider;
|
||||
import com.yunzhupaas.visualdata.entity.VisualCategoryEntity;
|
||||
import com.yunzhupaas.visualdata.entity.VisualDbEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualDbMapper;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualDbService;
|
||||
import lombok.Cleanup;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 大屏数据源配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Service
|
||||
public class VisualDbServiceImpl extends SuperServiceImpl<VisualDbMapper, VisualDbEntity> implements VisualDbService {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<VisualDbEntity> getList(VisualPaginationModel pagination) {
|
||||
QueryWrapper<VisualDbEntity> queryWrapper = new QueryWrapper<>();
|
||||
if(ObjectUtil.isNotEmpty(pagination.getName())){
|
||||
queryWrapper.lambda().like(VisualDbEntity::getName,pagination.getName());
|
||||
}
|
||||
queryWrapper.lambda().orderByDesc(VisualDbEntity::getCreateTime);
|
||||
Page page = new Page(pagination.getCurrent(), pagination.getSize());
|
||||
IPage<VisualDbEntity> iPages = this.page(page, queryWrapper);
|
||||
return pagination.setData(iPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VisualDbEntity> getList() {
|
||||
QueryWrapper<VisualDbEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().orderByDesc(VisualDbEntity::getCreateTime);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualDbEntity getInfo(String id) {
|
||||
QueryWrapper<VisualDbEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualDbEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualDbEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setUpdateUser(UserProvider.getLoginUserId());
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualDbEntity entity) {
|
||||
entity.setId(id);
|
||||
entity.setUpdateTime(new Date());
|
||||
entity.setUpdateUser(UserProvider.getLoginUserId());
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualDbEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dbTest(VisualDbEntity entity) {
|
||||
boolean flag = false;
|
||||
try {
|
||||
@Cleanup Connection conn = ConnUtil.getConn(entity.getUsername(), entity.getPassword(), entity.getUrl());
|
||||
flag = conn != null;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> query(VisualDbEntity entity, String sql) {
|
||||
List<Map<String,Object>> data = new ArrayList<>();
|
||||
try {
|
||||
data = JdbcUtil.queryList(new PrepSqlDTO(sql).withConn(entity.getUsername(), entity.getPassword(), entity.getUrl())).setIsLowerCase(true).get();
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualGlobEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualGlobMapper;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualGlobService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全局变量
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Service
|
||||
public class VisualGlobServiceImpl extends SuperServiceImpl<VisualGlobMapper, VisualGlobEntity> implements VisualGlobService {
|
||||
|
||||
@Override
|
||||
public List<VisualGlobEntity> getList(VisualPaginationModel pagination) {
|
||||
QueryWrapper<VisualGlobEntity> queryWrapper = new QueryWrapper<>();
|
||||
if(ObjectUtil.isNotEmpty(pagination.getGlobalName())){
|
||||
queryWrapper.lambda().like(VisualGlobEntity::getGlobalName, pagination.getGlobalName());
|
||||
}
|
||||
Page page = new Page(pagination.getCurrent(), pagination.getSize());
|
||||
IPage<VisualGlobEntity> iPages = this.page(page, queryWrapper);
|
||||
return pagination.setData(iPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VisualGlobEntity> getList() {
|
||||
QueryWrapper<VisualGlobEntity> queryWrapper = new QueryWrapper<>();
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualGlobEntity getInfo(String id) {
|
||||
QueryWrapper<VisualGlobEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualGlobEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualGlobEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualGlobEntity entity) {
|
||||
entity.setId(id);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualGlobEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.text.StrPool;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.util.StringUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualMapEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualMapMapper;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualMapService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 大屏地图配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Service
|
||||
public class VisualMapServiceImpl extends SuperServiceImpl<VisualMapMapper, VisualMapEntity> implements VisualMapService {
|
||||
|
||||
@Override
|
||||
public List<VisualMapEntity> getList(VisualPaginationModel pagination) {
|
||||
return getListWithColnums(pagination);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<VisualMapEntity> getListWithColnums(VisualPaginationModel pagination, SFunction<VisualMapEntity, ?>... columns) {
|
||||
if(StringUtil.isEmpty(pagination.getParentId())) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
QueryWrapper<VisualMapEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda()
|
||||
.select(columns)
|
||||
.eq(VisualMapEntity::getParentId, pagination.getParentId())
|
||||
.orderByAsc(VisualMapEntity::getId);
|
||||
if(ObjectUtil.isNotEmpty(pagination.getName())){
|
||||
queryWrapper.lambda().like(VisualMapEntity::getName, pagination.getName());
|
||||
}
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualMapEntity getInfo(String id) {
|
||||
if(StringUtil.isEmpty(id)) {
|
||||
return null;
|
||||
}
|
||||
QueryWrapper<VisualMapEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualMapEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualMapEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
VisualMapEntity parent = getByCode(entity.getCode());
|
||||
Assert.isNull(parent, MsgCode.EXIST002::get);
|
||||
parent = getInfo(entity.getParentId());
|
||||
if(parent != null){
|
||||
entity.setParentCode(parent.getCode());
|
||||
entity.setAncestors(parent.getAncestors() + StrPool.COMMA + parent.getCode());
|
||||
}
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualMapEntity entity) {
|
||||
VisualMapEntity parent = getByCode(entity.getCode());
|
||||
Assert.isTrue(parent == null || Objects.equals(parent.getId(), id), MsgCode.EXIST002::get);
|
||||
entity.setId(id);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualMapEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasChild(String id) {
|
||||
if(StringUtil.isEmpty(id)) {
|
||||
return false;
|
||||
}
|
||||
QueryWrapper<VisualMapEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualMapEntity::getParentId, id);
|
||||
return this.exists(queryWrapper);
|
||||
}
|
||||
|
||||
private VisualMapEntity getByCode(String code){
|
||||
if(StringUtil.isNotEmpty(code)){
|
||||
QueryWrapper<VisualMapEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualMapEntity::getCode, code);
|
||||
return getBaseMapper().selectOne(queryWrapper);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualRecordEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualRecordMapper;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏数据集
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Service
|
||||
public class VisualRecordServiceImpl extends SuperServiceImpl<VisualRecordMapper, VisualRecordEntity> implements VisualRecordService {
|
||||
|
||||
@Override
|
||||
public List<VisualRecordEntity> getList(VisualPaginationModel pagination) {
|
||||
QueryWrapper<VisualRecordEntity> queryWrapper = new QueryWrapper<>();
|
||||
if(ObjectUtil.isNotEmpty(pagination.getName())){
|
||||
queryWrapper.lambda().like(VisualRecordEntity::getName, pagination.getName());
|
||||
}
|
||||
Page page = new Page(pagination.getCurrent(), pagination.getSize());
|
||||
IPage<VisualRecordEntity> iPages = this.page(page, queryWrapper);
|
||||
return pagination.setData(iPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VisualRecordEntity> getList() {
|
||||
QueryWrapper<VisualRecordEntity> queryWrapper = new QueryWrapper<>();
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualRecordEntity getInfo(String id) {
|
||||
QueryWrapper<VisualRecordEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualRecordEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualRecordEntity entity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualRecordEntity entity) {
|
||||
entity.setId(id);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualRecordEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.yunzhupaas.visualdata.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
import com.yunzhupaas.util.RandomUtil;
|
||||
import com.yunzhupaas.util.UserProvider;
|
||||
import com.yunzhupaas.visualdata.entity.VisualConfigEntity;
|
||||
import com.yunzhupaas.visualdata.entity.VisualEntity;
|
||||
import com.yunzhupaas.visualdata.mapper.VisualMapper;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.service.VisualConfigService;
|
||||
import com.yunzhupaas.visualdata.service.VisualService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏基本信息
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Service
|
||||
public class VisualServiceImpl extends SuperServiceImpl<VisualMapper, VisualEntity> implements VisualService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VisualConfigService configService;
|
||||
|
||||
@Override
|
||||
public List<VisualEntity> getList(VisualPaginationModel pagination) {
|
||||
QueryWrapper<VisualEntity> queryWrapper = new QueryWrapper<>();
|
||||
if(ObjectUtil.isNotEmpty(pagination.getTitle())){
|
||||
queryWrapper.lambda().like(VisualEntity::getTitle, pagination.getTitle());
|
||||
}
|
||||
queryWrapper.lambda().eq(VisualEntity::getCategory, pagination.getCategory());
|
||||
queryWrapper.lambda().orderByDesc(VisualEntity::getCreateTime);
|
||||
Page page = new Page(pagination.getCurrent(), pagination.getSize());
|
||||
IPage<VisualEntity> iPages = this.page(page, queryWrapper);
|
||||
return pagination.setData(iPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VisualEntity> getList() {
|
||||
QueryWrapper<VisualEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().orderByDesc(VisualEntity::getCreateTime);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualEntity getInfo(String id) {
|
||||
QueryWrapper<VisualEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(VisualEntity::getId, id);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(VisualEntity entity, VisualConfigEntity configEntity) {
|
||||
entity.setId(RandomUtil.uuId());
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setUpdateUser(UserProvider.getLoginUserId());
|
||||
entity.setStatus(1);
|
||||
entity.setIsDeleted(0);
|
||||
this.save(entity);
|
||||
configEntity.setVisualId(entity.getId());
|
||||
configService.create(configEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, VisualEntity entity, VisualConfigEntity configEntity) {
|
||||
entity.setId(id);
|
||||
entity.setUpdateTime(new Date());
|
||||
entity.setUpdateUser(UserProvider.getLoginUserId());
|
||||
boolean flag = this.updateById(entity);
|
||||
if (configEntity != null) {
|
||||
configService.update(configEntity.getId(), configEntity);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(VisualEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
VisualConfigEntity config = configService.getInfo(entity.getId());
|
||||
configService.delete(config);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createImport(VisualEntity entity, VisualConfigEntity configEntity) throws DataException {
|
||||
try {
|
||||
this.save(entity);
|
||||
configService.create(configEntity);
|
||||
}catch (Exception e){
|
||||
throw new DataException(MsgCode.IMP003.get());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user