初始代码
This commit is contained in:
20
yunzhupaas-visualdata/pom.xml
Normal file
20
yunzhupaas-visualdata/pom.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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-java-boot</artifactId>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<version>5.2.0-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yunzhupaas-visualdata</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>yunzhupaas-visualdata-entity</module>
|
||||
<module>yunzhupaas-visualdata-biz</module>
|
||||
<module>yunzhupaas-visualdata-controller</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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-controller</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-visualdata-biz</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.JsonUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualAssetsEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPageVO;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.model.visualassets.*;
|
||||
import com.yunzhupaas.visualdata.service.VisualAssetsService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 静态资源
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "全局变量", description = "assets")
|
||||
@RequestMapping("/api/blade-visual/assets")
|
||||
public class VisualAssetsController extends SuperController<VisualAssetsService, VisualAssetsEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页")
|
||||
@GetMapping("/list")
|
||||
public ActionResult<VisualPageVO<VisualAssetsListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualAssetsEntity> data = getBaseService().getList(pagination);
|
||||
List<VisualAssetsListVO> list = JsonUtil.getJsonToList(data, VisualAssetsListVO.class);
|
||||
VisualPageVO paginationVO = JsonUtil.getJsonToBean(pagination, VisualPageVO.class);
|
||||
paginationVO.setRecords(list);
|
||||
return ActionResult.success(paginationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<VisualAssetsInfoVO> info(@RequestParam("id")String id) {
|
||||
VisualAssetsEntity entity = getBaseService().getInfo(id);
|
||||
VisualAssetsInfoVO vo = JsonUtil.getJsonToBean(entity, VisualAssetsInfoVO.class);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param recordCrForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/save")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordCrForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult create(@RequestBody VisualAssetsCrForm recordCrForm) {
|
||||
VisualAssetsEntity entity = JsonUtil.getJsonToBean(recordCrForm, VisualAssetsEntity.class);
|
||||
getBaseService().create(entity);
|
||||
return ActionResult.success(MsgCode.SU001.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param recordUpForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordUpForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult update(@RequestBody VisualAssetsUpForm recordUpForm) {
|
||||
VisualAssetsEntity entity = JsonUtil.getJsonToBean(recordUpForm, VisualAssetsEntity.class);
|
||||
getBaseService().update(entity.getId(), entity);
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(String ids) {
|
||||
if (getBaseService().delete(ids)) {
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.JsonUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualCategoryEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPageVO;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.model.visualcategory.VisualCategoryCrForm;
|
||||
import com.yunzhupaas.visualdata.model.visualcategory.VisualCategoryInfoVO;
|
||||
import com.yunzhupaas.visualdata.model.visualcategory.VisualCategoryListVO;
|
||||
import com.yunzhupaas.visualdata.model.visualcategory.VisualCategoryUpForm;
|
||||
import com.yunzhupaas.visualdata.service.VisualCategoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏分类
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "大屏分类", description = "category")
|
||||
@RequestMapping("/api/blade-visual/category")
|
||||
public class VisualCategoryController extends SuperController<VisualCategoryService, VisualCategoryEntity> {
|
||||
|
||||
@Autowired
|
||||
private VisualCategoryService categoryService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "列表")
|
||||
@GetMapping("/page")
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<VisualPageVO<VisualCategoryListVO>> page(VisualPaginationModel pagination) {
|
||||
List<VisualCategoryEntity> data = categoryService.getList(pagination,true);
|
||||
List<VisualCategoryListVO> list = JsonUtil.getJsonToList(data, VisualCategoryListVO.class);
|
||||
VisualPageVO paginationVO = JsonUtil.getJsonToBean(pagination, VisualPageVO.class);
|
||||
paginationVO.setRecords(list);
|
||||
return ActionResult.success(paginationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "列表")
|
||||
@GetMapping("/list")
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<List<VisualCategoryListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualCategoryEntity> data = categoryService.getList(pagination,false);
|
||||
List<VisualCategoryListVO> list = JsonUtil.getJsonToList(data, VisualCategoryListVO.class);
|
||||
return ActionResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
public ActionResult<VisualCategoryInfoVO> info(@RequestParam("id") String id) {
|
||||
VisualCategoryEntity entity = categoryService.getInfo(id);
|
||||
VisualCategoryInfoVO vo = JsonUtil.getJsonToBean(entity, VisualCategoryInfoVO.class);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param categoryCrForm 大屏分类模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/save")
|
||||
@Parameters({
|
||||
@Parameter(name = "categoryCrForm", description = "大屏分类模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult create(@RequestBody @Valid VisualCategoryCrForm categoryCrForm) {
|
||||
VisualCategoryEntity entity = JsonUtil.getJsonToBean(categoryCrForm, VisualCategoryEntity.class);
|
||||
if (categoryService.isExistByValue(entity.getCategoryvalue(), entity.getId())) {
|
||||
return ActionResult.fail(MsgCode.EXIST003.get());
|
||||
}
|
||||
categoryService.create(entity);
|
||||
return ActionResult.success(MsgCode.SU001.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param categoryUpForm 大屏分类模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
@Parameters({
|
||||
@Parameter(name = "categoryUpForm", description = "大屏分类模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult update(@RequestBody VisualCategoryUpForm categoryUpForm) {
|
||||
VisualCategoryEntity entity = JsonUtil.getJsonToBean(categoryUpForm, VisualCategoryEntity.class);
|
||||
if (categoryService.isExistByValue(entity.getCategoryvalue(), entity.getId())) {
|
||||
return ActionResult.fail(MsgCode.EXIST003.get());
|
||||
}
|
||||
boolean flag = categoryService.update(categoryUpForm.getId(), entity);
|
||||
if (!flag) {
|
||||
return ActionResult.fail(MsgCode.FA001.get());
|
||||
}
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(String ids) {
|
||||
VisualCategoryEntity entity = categoryService.getInfo(ids);
|
||||
if (entity != null) {
|
||||
categoryService.delete(entity);
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.JsonUtil;
|
||||
import com.yunzhupaas.util.StringUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualComponentEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPageVO;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.model.visualcomponent.*;
|
||||
import com.yunzhupaas.visualdata.service.VisualComponentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏组件库
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "大屏组件库配置", description = "component")
|
||||
@RequestMapping("/api/blade-visual/component")
|
||||
public class VisualComponentController extends SuperController<VisualComponentService, VisualComponentEntity> {
|
||||
|
||||
@Autowired
|
||||
private VisualComponentService componentService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页")
|
||||
@GetMapping("/list")
|
||||
public ActionResult<VisualPageVO<VisualComponentListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualComponentEntity> data = componentService.getList(pagination);
|
||||
List<VisualComponentListVO> list = JsonUtil.getJsonToList(data, VisualComponentListVO.class);
|
||||
VisualPageVO paginationVO = JsonUtil.getJsonToBean(pagination, VisualPageVO.class);
|
||||
paginationVO.setRecords(list);
|
||||
return ActionResult.success(paginationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<VisualComponentInfoVO> info(@RequestParam("id")String id) {
|
||||
VisualComponentEntity entity = componentService.getInfo(id);
|
||||
VisualComponentInfoVO vo = JsonUtil.getJsonToBean(entity, VisualComponentInfoVO.class);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param recordCrForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/save")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordCrForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult create(@RequestBody VisualComponentCrForm recordCrForm) {
|
||||
VisualComponentEntity entity = JsonUtil.getJsonToBean(recordCrForm, VisualComponentEntity.class);
|
||||
componentService.create(entity);
|
||||
return ActionResult.success(MsgCode.SU001.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param recordUpForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordUpForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult update(@RequestBody VisualComponentUpForm recordUpForm) {
|
||||
VisualComponentEntity entity = JsonUtil.getJsonToBean(recordUpForm, VisualComponentEntity.class);
|
||||
componentService.update(entity.getId(), entity);
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(String ids) {
|
||||
VisualComponentEntity entity = componentService.getInfo(ids);
|
||||
if (entity != null) {
|
||||
componentService.delete(entity);
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,439 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.Method;
|
||||
import cn.xuyanwu.spring.file.storage.FileInfo;
|
||||
import com.google.common.base.Joiner;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.base.vo.DownloadVO;
|
||||
import com.yunzhupaas.base.vo.ListVO;
|
||||
import com.yunzhupaas.config.ConfigValueUtil;
|
||||
import com.yunzhupaas.constant.FileTypeConstant;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.emnus.ModuleTypeEnum;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
import com.yunzhupaas.model.FileListVO;
|
||||
import com.yunzhupaas.util.*;
|
||||
import com.yunzhupaas.util.FileExport;
|
||||
import com.yunzhupaas.util.FileUploadUtils;
|
||||
import com.yunzhupaas.visualdata.entity.VisualCategoryEntity;
|
||||
import com.yunzhupaas.visualdata.entity.VisualConfigEntity;
|
||||
import com.yunzhupaas.visualdata.entity.VisualEntity;
|
||||
import com.yunzhupaas.visualdata.enums.VisualImgEnum;
|
||||
import com.yunzhupaas.visualdata.model.VisualPageVO;
|
||||
import com.yunzhupaas.visualdata.model.visual.*;
|
||||
import com.yunzhupaas.visualdata.model.visualcategory.VisualCategoryListVO;
|
||||
import com.yunzhupaas.visualdata.model.visualconfig.VisualConfigInfoModel;
|
||||
import com.yunzhupaas.visualdata.model.visualfile.ImageVO;
|
||||
import com.yunzhupaas.visualdata.service.VisualCategoryService;
|
||||
import com.yunzhupaas.visualdata.service.VisualConfigService;
|
||||
import com.yunzhupaas.visualdata.service.VisualService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.Headers;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 大屏基本信息
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "大屏基本信息", description = "visual")
|
||||
@RequestMapping("/api/blade-visual/visual")
|
||||
@Slf4j
|
||||
public class VisualController extends SuperController<VisualService, VisualEntity> {
|
||||
|
||||
@Autowired
|
||||
private FileExport fileExport;
|
||||
@Autowired
|
||||
private VisualService visualService;
|
||||
@Autowired
|
||||
private VisualConfigService configService;
|
||||
@Autowired
|
||||
private ConfigValueUtil configValueUtil;
|
||||
@Autowired
|
||||
private VisualCategoryService categoryService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页")
|
||||
@GetMapping("/list")
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<VisualPageVO<VisualListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualEntity> data = visualService.getList(pagination);
|
||||
List<VisualListVO> list = JsonUtil.getJsonToList(data, VisualListVO.class);
|
||||
VisualPageVO paginationVO = JsonUtil.getJsonToBean(pagination, VisualPageVO.class);
|
||||
paginationVO.setRecords(list);
|
||||
return ActionResult.success(paginationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
public ActionResult<VisualInfoVO> info(@RequestParam("id")String id) {
|
||||
VisualEntity visual = visualService.getInfo(id);
|
||||
VisualConfigEntity config = configService.getInfo(id);
|
||||
VisualInfoVO vo = new VisualInfoVO();
|
||||
vo.setVisual(JsonUtil.getJsonToBean(visual, VisualInfoModel.class));
|
||||
vo.setConfig(JsonUtil.getJsonToBean(config, VisualConfigInfoModel.class));
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param visualCrform 大屏模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/save")
|
||||
@Parameters({
|
||||
@Parameter(name = "visualCrform", description = "大屏模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult create(@RequestBody @Valid VisualCrform visualCrform) {
|
||||
VisualEntity visual = JsonUtil.getJsonToBean(visualCrform.getVisual(), VisualEntity.class);
|
||||
visual.setBackgroundUrl(VisusalImgUrl.url + configValueUtil.getBiVisualPath() + "bg/bg1.png");
|
||||
VisualConfigEntity config = JsonUtil.getJsonToBean(visualCrform.getConfig(), VisualConfigEntity.class);
|
||||
visualService.create(visual, config);
|
||||
Map<String, String> data = new HashMap<>(16);
|
||||
data.put("id", visual.getId());
|
||||
return ActionResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param categoryUpForm 大屏模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
@Parameters({
|
||||
@Parameter(name = "categoryUpForm", description = "大屏模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult update(@RequestBody VisualUpform categoryUpForm) {
|
||||
VisualEntity visual = JsonUtil.getJsonToBean(categoryUpForm.getVisual(), VisualEntity.class);
|
||||
VisualConfigEntity config = JsonUtil.getJsonToBean(categoryUpForm.getConfig(), VisualConfigEntity.class);
|
||||
visualService.update(visual.getId(), visual, config);
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(@RequestParam("ids")String ids) {
|
||||
VisualEntity entity = visualService.getInfo(ids);
|
||||
if (entity != null) {
|
||||
visualService.delete(entity);
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "复制")
|
||||
@PostMapping("/copy")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult copy(@RequestParam("id")String id) {
|
||||
VisualEntity entity = visualService.getInfo(id);
|
||||
VisualConfigEntity config = configService.getInfo(id);
|
||||
if (entity != null) {
|
||||
entity.setTitle(entity.getTitle() + "_复制");
|
||||
visualService.create(entity, config);
|
||||
return ActionResult.success(MsgCode.SU005.get(), entity.getId());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA001.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取类型")
|
||||
@GetMapping("/category")
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<List<VisualCategoryListVO>> list() {
|
||||
List<VisualCategoryEntity> data = categoryService.getList();
|
||||
List<VisualCategoryListVO> list = JsonUtil.getJsonToList(data, VisualCategoryListVO.class);
|
||||
return ActionResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param file 文件
|
||||
* @param type 类型
|
||||
* @return
|
||||
*/
|
||||
@NoDataSourceBind()
|
||||
@Operation(summary = "上传文件")
|
||||
@Parameters({
|
||||
@Parameter(name = "type", description = "类型",required = true),
|
||||
})
|
||||
@PostMapping(value = "/put-file/{type}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public ActionResult<ImageVO> file(MultipartFile file, @PathVariable("type") String type) {
|
||||
ImageVO vo = new ImageVO();
|
||||
VisualImgEnum imgEnum = VisualImgEnum.getByMessage(type);
|
||||
if (imgEnum != null) {
|
||||
String path = imgEnum.getMessage();
|
||||
String filePath = configValueUtil.getBiVisualPath() + path + "/";
|
||||
String name = RandomUtil.uuId() + "." + UpUtil.getFileType(file);
|
||||
//上传文件
|
||||
FileInfo fileInfo = FileUploadUtils.uploadFile(file, filePath, name);
|
||||
vo.setOriginalName(fileInfo.getOriginalFilename());
|
||||
vo.setLink(VisusalImgUrl.url + fileInfo.getPath() + fileInfo.getFilename());
|
||||
vo.setName(VisusalImgUrl.url + fileInfo.getPath() + fileInfo.getFilename());
|
||||
}
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图片列表
|
||||
*
|
||||
* @param type 文件夹
|
||||
* @return
|
||||
*/
|
||||
@NoDataSourceBind()
|
||||
@Operation(summary = "获取图片列表")
|
||||
@GetMapping("/{type}")
|
||||
@Parameters({
|
||||
@Parameter(name = "type", description = "文件夹", required = true),
|
||||
})
|
||||
public ActionResult<List<ImageVO>> getFile(@PathVariable("type") String type) {
|
||||
List<ImageVO> vo = new ArrayList<>();
|
||||
VisualImgEnum imgEnum = VisualImgEnum.getByMessage(type);
|
||||
if (imgEnum != null) {
|
||||
String path = configValueUtil.getBiVisualPath() + imgEnum.getMessage() + "/";
|
||||
List<FileListVO> fileList = FileUploadUtils.getFileList(path);
|
||||
fileList.forEach(fileListVO -> {
|
||||
ImageVO imageVO = new ImageVO();
|
||||
imageVO.setName(fileListVO.getFileName());
|
||||
imageVO.setLink(VisusalImgUrl.url + fileListVO.getFileName());
|
||||
imageVO.setOriginalName(fileListVO.getFileName());
|
||||
vo.add(imageVO);
|
||||
});
|
||||
}
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏下拉框
|
||||
*/
|
||||
@Operation(summary = "大屏下拉框")
|
||||
@GetMapping("/Selector")
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<ListVO<VisualSelectorVO>> selector() {
|
||||
List<VisualEntity> visualList = visualService.getList();
|
||||
List<VisualCategoryEntity> categoryList = categoryService.getList();
|
||||
List<VisualSelectorVO> listVos = new ArrayList<>();
|
||||
for (VisualCategoryEntity category : categoryList) {
|
||||
VisualSelectorVO categoryModel = new VisualSelectorVO();
|
||||
categoryModel.setId(category.getCategoryvalue());
|
||||
categoryModel.setFullName(category.getCategorykey());
|
||||
List<VisualEntity> visualAll = visualList.stream().filter(t -> t.getCategory().equals(Integer.parseInt(category.getCategoryvalue()))).collect(Collectors.toList());
|
||||
if (visualAll.size() > 0) {
|
||||
List<VisualSelectorVO> childList = new ArrayList<>();
|
||||
for (VisualEntity visual : visualAll) {
|
||||
VisualSelectorVO visualModel = new VisualSelectorVO();
|
||||
visualModel.setId(visual.getId());
|
||||
visualModel.setFullName(visual.getTitle());
|
||||
visualModel.setChildren(null);
|
||||
visualModel.setHasChildren(false);
|
||||
childList.add(visualModel);
|
||||
}
|
||||
categoryModel.setHasChildren(true);
|
||||
categoryModel.setChildren(childList);
|
||||
listVos.add(categoryModel);
|
||||
}
|
||||
}
|
||||
ListVO vo = new ListVO();
|
||||
vo.setList(listVos);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏导出
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "大屏导出")
|
||||
@PostMapping("/{id}/Actions/ExportData")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<DownloadVO> exportData(@PathVariable("id") String id) {
|
||||
VisualEntity entity = visualService.getInfo(id);
|
||||
VisualConfigEntity configEntity = configService.getInfo(id);
|
||||
VisualModel model = new VisualModel();
|
||||
model.setEntity(entity);
|
||||
model.setConfigEntity(configEntity);
|
||||
DownloadVO downloadVO = fileExport.exportFile(model, configValueUtil.getTemporaryFilePath(), entity.getTitle(), ModuleTypeEnum.VISUAL_DATA.getTableName());
|
||||
return ActionResult.success(downloadVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏导入
|
||||
*
|
||||
* @param multipartFile 文件
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "大屏导入")
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
@PostMapping(value = "/Model/Actions/ImportData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public ActionResult ImportData(MultipartFile multipartFile) throws DataException {
|
||||
//判断是否为.json结尾
|
||||
if (FileUtil.existsSuffix(multipartFile, ModuleTypeEnum.VISUAL_DATA.getTableName())) {
|
||||
return ActionResult.fail(MsgCode.IMP002.get());
|
||||
}
|
||||
//获取文件内容
|
||||
String fileContent = FileUtil.getFileContent(multipartFile);
|
||||
VisualModel vo = JsonUtil.getJsonToBean(fileContent, VisualModel.class);
|
||||
visualService.createImport(vo.getEntity(), vo.getConfigEntity());
|
||||
return ActionResult.success(MsgCode.SU000.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取API动态数据
|
||||
*
|
||||
* @param apiRequest 大屏模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取API动态数据")
|
||||
@PostMapping(value = "/GetApiData")
|
||||
@Parameters({
|
||||
@Parameter(name = "apiRequest", description = "大屏模型",required = true),
|
||||
})
|
||||
public String getApiData(@RequestBody @Valid VisualApiRequest apiRequest) throws IOException {
|
||||
OkHttpClient client = new OkHttpClient.Builder().callTimeout(Duration.ofSeconds(apiRequest.getTimeout())).build();
|
||||
Headers headers;
|
||||
Request request;
|
||||
if (!apiRequest.getHeaders().isEmpty()) {
|
||||
Headers.Builder builder = new Headers.Builder();
|
||||
apiRequest.getHeaders().forEach((k, v) -> {
|
||||
builder.add(k, v);
|
||||
});
|
||||
headers = builder.build();
|
||||
} else {
|
||||
headers = new Headers.Builder().build();
|
||||
}
|
||||
if (apiRequest.getMethod().equalsIgnoreCase("post")) {
|
||||
request = new Request.Builder().url(apiRequest.getUrl())
|
||||
.post(okhttp3.RequestBody.create(okhttp3.MediaType.parse("application/json;charset=utf-8"), apiRequest.getParams().isEmpty() ? "" : JsonUtil.getObjectToString(apiRequest.getParams())))
|
||||
.headers(headers)
|
||||
.build();
|
||||
} else {
|
||||
String params = Joiner.on("&")
|
||||
.useForNull("")
|
||||
.withKeyValueSeparator("=")
|
||||
.join(apiRequest.getParams());
|
||||
request = new Request.Builder().url(apiRequest.getUrl() + (apiRequest.getUrl().contains("?") ? "&" : "?") + params)
|
||||
.get()
|
||||
.headers(headers)
|
||||
.build();
|
||||
}
|
||||
return client.newCall(request).execute().body().string();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取API动态数据
|
||||
*
|
||||
* @param proxyModel 代理模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取API动态数据")
|
||||
@PostMapping(value = "/proxy")
|
||||
@Parameters({
|
||||
@Parameter(name = "proxyModel", description = "代理模型",required = true),
|
||||
})
|
||||
public String getApiData(@RequestBody @Valid VisualProxyModel proxyModel) throws IOException {
|
||||
Map<String, String> headers;
|
||||
boolean isForm = false;
|
||||
if (!proxyModel.getHeaders().isEmpty()) {
|
||||
headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
||||
headers.putAll(proxyModel.getHeaders());
|
||||
if(headers.containsKey("form")){
|
||||
//头部指定当前为form表单
|
||||
isForm = true;
|
||||
}
|
||||
} else {
|
||||
headers = new HashMap<>(1, 1);
|
||||
}
|
||||
//Header无自定义TOKEN 取当前TOKEN
|
||||
if(!headers.containsKey("Authorization")){
|
||||
String token = UserProvider.getToken();
|
||||
if(StringUtil.isNotEmpty(token)){
|
||||
headers.put("Authorization", token);
|
||||
}
|
||||
}
|
||||
HttpRequest httpRequest = HttpRequest.of(proxyModel.getUrl()).method(Method.valueOf(proxyModel.getMethod().toUpperCase())).addHeaders(headers);
|
||||
if(isForm){
|
||||
httpRequest.form(proxyModel.getData());
|
||||
}else if(proxyModel.getData() != null && !proxyModel.getData().isEmpty()){
|
||||
httpRequest.body(JsonUtil.getObjectToString(proxyModel.getData()));
|
||||
}else {
|
||||
httpRequest.form(proxyModel.getParams());
|
||||
}
|
||||
try {
|
||||
return httpRequest.timeout(10000).execute().body();
|
||||
} catch (Exception e){
|
||||
log.info("接口请求失败 {} {}", proxyModel.getUrl(), e.getMessage());
|
||||
throw new DataException(MsgCode.FA037.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.DesUtil;
|
||||
import com.yunzhupaas.util.JsonUtil;
|
||||
import com.yunzhupaas.util.StringUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualDbEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPageVO;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.model.visualdb.*;
|
||||
import com.yunzhupaas.visualdata.service.VisualDbService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 大屏数据源配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "大屏数据源配置", description = "db")
|
||||
@RequestMapping("/api/blade-visual/db")
|
||||
public class VisualDbController extends SuperController<VisualDbService, VisualDbEntity> {
|
||||
|
||||
@Autowired
|
||||
private VisualDbService dbService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页")
|
||||
@GetMapping("/list")
|
||||
public ActionResult<VisualPageVO<VisualDbListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualDbEntity> data = dbService.getList(pagination);
|
||||
List<VisualDbListVO> list = JsonUtil.getJsonToList(data, VisualDbListVO.class);
|
||||
VisualPageVO paginationVO = JsonUtil.getJsonToBean(pagination, VisualPageVO.class);
|
||||
paginationVO.setRecords(list);
|
||||
return ActionResult.success(paginationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<VisualDbInfoVO> info(@RequestParam("id")String id) {
|
||||
VisualDbEntity entity = dbService.getInfo(id);
|
||||
VisualDbInfoVO vo = JsonUtil.getJsonToBean(entity, VisualDbInfoVO.class);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*
|
||||
* @param dbUpForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增或修改")
|
||||
@PostMapping("/submit")
|
||||
@Parameters({
|
||||
@Parameter(name = "dbUpForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult submit(@RequestBody VisualDbUpForm dbUpForm) {
|
||||
VisualDbEntity entity = JsonUtil.getJsonToBean(dbUpForm, VisualDbEntity.class);
|
||||
if (StringUtil.isEmpty(entity.getId())) {
|
||||
dbService.create(entity);
|
||||
return ActionResult.success(MsgCode.SU001.get());
|
||||
} else {
|
||||
dbService.update(entity.getId(), entity);
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(String ids) {
|
||||
VisualDbEntity entity = dbService.getInfo(ids);
|
||||
if (entity != null) {
|
||||
dbService.delete(entity);
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉数据源
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "下拉数据源")
|
||||
@GetMapping("/db-list")
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<List<VisualDbSelectVO>> list() {
|
||||
List<VisualDbEntity> data = dbService.getList();
|
||||
List<VisualDbSelectVO> list = JsonUtil.getJsonToList(data, VisualDbSelectVO.class);
|
||||
return ActionResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据源测试连接
|
||||
*
|
||||
* @param dbCrForm 数据源模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "数据源测试连接")
|
||||
@PostMapping("/db-test")
|
||||
@Parameters({
|
||||
@Parameter(name = "dbCrForm", description = "数据源模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult test(@RequestBody VisualDbCrForm dbCrForm) {
|
||||
VisualDbEntity entity = JsonUtil.getJsonToBean(dbCrForm, VisualDbEntity.class);
|
||||
entity.setPassword(DesUtil.aesOrDecode(entity.getPassword(), false, true));
|
||||
boolean flag = dbService.dbTest(entity);
|
||||
if (flag) {
|
||||
return ActionResult.success(MsgCode.DB301.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.DB302.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态执行SQL
|
||||
*
|
||||
* @param queryForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "动态执行SQL")
|
||||
@PostMapping("/dynamic-query")
|
||||
@Parameters({
|
||||
@Parameter(name = "queryForm", description = "数据模型",required = true),
|
||||
})
|
||||
public ActionResult query(@RequestBody VisualDbQueryForm queryForm) {
|
||||
VisualDbEntity entity = dbService.getInfo(queryForm.getId());
|
||||
List<Map<String, Object>> data = new ArrayList<>();
|
||||
if (entity != null) {
|
||||
entity.setPassword(DesUtil.aesOrDecode(entity.getPassword(), false, true));
|
||||
queryForm.setSql(DesUtil.aesOrDecode(queryForm.getSql(), false, true));
|
||||
data = dbService.query(entity, queryForm.getSql());
|
||||
}
|
||||
return ActionResult.success(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.JsonUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualGlobEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPageVO;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.model.visualglob.*;
|
||||
import com.yunzhupaas.visualdata.service.VisualGlobService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全局变量
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "全局变量", description = "glob")
|
||||
@RequestMapping("/api/blade-visual/visual-global")
|
||||
public class VisualGlobController extends SuperController<VisualGlobService, VisualGlobEntity> {
|
||||
|
||||
@Autowired
|
||||
private VisualGlobService gloService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页")
|
||||
@GetMapping("/list")
|
||||
public ActionResult<VisualPageVO<VisualGlobListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualGlobEntity> data = gloService.getList(pagination);
|
||||
List<VisualGlobListVO> list = JsonUtil.getJsonToList(data, VisualGlobListVO.class);
|
||||
VisualPageVO paginationVO = JsonUtil.getJsonToBean(pagination, VisualPageVO.class);
|
||||
paginationVO.setRecords(list);
|
||||
return ActionResult.success(paginationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<VisualGlobInfoVO> info(@RequestParam("id")String id) {
|
||||
VisualGlobEntity entity = gloService.getInfo(id);
|
||||
VisualGlobInfoVO vo = JsonUtil.getJsonToBean(entity, VisualGlobInfoVO.class);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param recordCrForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/save")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordCrForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult create(@RequestBody VisualGlobCrForm recordCrForm) {
|
||||
VisualGlobEntity entity = JsonUtil.getJsonToBean(recordCrForm, VisualGlobEntity.class);
|
||||
gloService.create(entity);
|
||||
return ActionResult.success(MsgCode.SU001.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param recordUpForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordUpForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult update(@RequestBody VisualGlobUpForm recordUpForm) {
|
||||
VisualGlobEntity entity = JsonUtil.getJsonToBean(recordUpForm, VisualGlobEntity.class);
|
||||
gloService.update(entity.getId(), entity);
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(String ids) {
|
||||
VisualGlobEntity entity = gloService.getInfo(ids);
|
||||
if (entity != null) {
|
||||
gloService.delete(entity);
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.JsonUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualMapEntity;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.model.visualmap.*;
|
||||
import com.yunzhupaas.visualdata.service.VisualMapService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 大屏地图
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "大屏地图", description = "map")
|
||||
@RequestMapping("/api/blade-visual/map")
|
||||
public class VisualMapController extends SuperController<VisualMapService, VisualMapEntity> {
|
||||
|
||||
@Autowired
|
||||
private VisualMapService mapService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页")
|
||||
@GetMapping("/lazy-list")
|
||||
public ActionResult<List<VisualMapListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualMapEntity> data = mapService.getListWithColnums(pagination, VisualMapEntity::getId, VisualMapEntity::getName
|
||||
, VisualMapEntity::getCode, VisualMapEntity::getParentCode, VisualMapEntity::getParentId
|
||||
, VisualMapEntity::getAncestors, VisualMapEntity::getMapLevel);
|
||||
List<VisualMapListVO> list = JsonUtil.getJsonToList(data, VisualMapListVO.class);
|
||||
VisualMapEntity parent = getBaseService().getInfo(pagination.getParentId());
|
||||
list.forEach(m -> {
|
||||
m.setHasChildren(getBaseService().hasChild(m.getId()));
|
||||
if(parent != null){
|
||||
m.setParentName(parent.getName());
|
||||
}
|
||||
});
|
||||
return ActionResult.success(MsgCode.SU005.get(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
public ActionResult<VisualMapInfoVO> info(@RequestParam("id") String id) {
|
||||
VisualMapEntity entity = mapService.getInfo(id);
|
||||
VisualMapInfoVO vo = JsonUtil.getJsonToBean(entity, VisualMapInfoVO.class);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param mapCrForm 地图模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/save")
|
||||
@Parameters({
|
||||
@Parameter(name = "mapCrForm", description = "地图模型", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult create(@RequestBody VisualMapCrForm mapCrForm) {
|
||||
VisualMapEntity entity = JsonUtil.getJsonToBean(mapCrForm, VisualMapEntity.class);
|
||||
mapService.create(entity);
|
||||
return ActionResult.success(MsgCode.SU001.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param mapUpForm 地图模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
@Parameters({
|
||||
@Parameter(name = "mapUpForm", description = "地图模型", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult update(@RequestBody VisualMapUpForm mapUpForm) {
|
||||
VisualMapEntity entity = JsonUtil.getJsonToBean(mapUpForm, VisualMapEntity.class);
|
||||
boolean flag = mapService.update(mapUpForm.getId(), entity);
|
||||
if (!flag) {
|
||||
return ActionResult.fail(MsgCode.FA001.get());
|
||||
}
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(@RequestParam("ids") String ids) {
|
||||
VisualMapEntity entity = mapService.getInfo(ids);
|
||||
if (entity != null) {
|
||||
mapService.delete(entity);
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "数据详情")
|
||||
@GetMapping("/data")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
public String dataInfo(@RequestParam("id") String id) {
|
||||
VisualMapEntity entity = mapService.getInfo(id);
|
||||
Assert.notNull(entity, MsgCode.FA001::get);
|
||||
return entity.getData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.yunzhupaas.visualdata.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.controller.SuperController;
|
||||
import com.yunzhupaas.constant.MsgCode;
|
||||
import com.yunzhupaas.util.JsonUtil;
|
||||
import com.yunzhupaas.util.StringUtil;
|
||||
import com.yunzhupaas.visualdata.entity.VisualRecordEntity;
|
||||
import com.yunzhupaas.visualdata.model.VisualPageVO;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import com.yunzhupaas.visualdata.model.visual.VisualPaginationModel;
|
||||
import com.yunzhupaas.visualdata.model.visualrecord.VisualRecordCrForm;
|
||||
import com.yunzhupaas.visualdata.model.visualrecord.VisualRecordInfoVO;
|
||||
import com.yunzhupaas.visualdata.model.visualrecord.VisualRecordListVO;
|
||||
import com.yunzhupaas.visualdata.model.visualrecord.VisualRecordUpForm;
|
||||
import com.yunzhupaas.visualdata.service.VisualRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏数据源配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "大屏数据集配置", description = "record")
|
||||
@RequestMapping("/api/blade-visual/record")
|
||||
public class VisualRecordController extends SuperController<VisualRecordService, VisualRecordEntity> {
|
||||
|
||||
@Autowired
|
||||
private VisualRecordService recordService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param pagination 分页模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页")
|
||||
@GetMapping("/list")
|
||||
public ActionResult<VisualPageVO<VisualRecordListVO>> list(VisualPaginationModel pagination) {
|
||||
List<VisualRecordEntity> data = recordService.getList(pagination);
|
||||
List<VisualRecordListVO> list = JsonUtil.getJsonToList(data, VisualRecordListVO.class);
|
||||
VisualPageVO paginationVO = JsonUtil.getJsonToBean(pagination, VisualPageVO.class);
|
||||
paginationVO.setRecords(list);
|
||||
return ActionResult.success(paginationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "详情")
|
||||
@GetMapping("/detail")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult<VisualRecordInfoVO> info(@RequestParam("id")String id) {
|
||||
VisualRecordEntity entity = recordService.getInfo(id);
|
||||
VisualRecordInfoVO vo = JsonUtil.getJsonToBean(entity, VisualRecordInfoVO.class);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param recordCrForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/save")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordCrForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult create(@RequestBody VisualRecordCrForm recordCrForm) {
|
||||
VisualRecordEntity entity = JsonUtil.getJsonToBean(recordCrForm, VisualRecordEntity.class);
|
||||
recordService.create(entity);
|
||||
return ActionResult.success(MsgCode.SU001.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param recordUpForm 数据模型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
@Parameters({
|
||||
@Parameter(name = "recordUpForm", description = "数据模型",required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult update(@RequestBody VisualRecordUpForm recordUpForm) {
|
||||
VisualRecordEntity entity = JsonUtil.getJsonToBean(recordUpForm, VisualRecordEntity.class);
|
||||
recordService.update(entity.getId(), entity);
|
||||
return ActionResult.success(MsgCode.SU004.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 主键
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/remove")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键", required = true),
|
||||
})
|
||||
@SaCheckPermission("onlineDev.dataScreen")
|
||||
public ActionResult delete(String ids) {
|
||||
VisualRecordEntity entity = recordService.getInfo(ids);
|
||||
if (entity != null) {
|
||||
recordService.delete(entity);
|
||||
return ActionResult.success(MsgCode.SU003.get());
|
||||
}
|
||||
return ActionResult.fail(MsgCode.FA003.get());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yunzhupaas.visualdata.controller.aop;
|
||||
|
||||
/**
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司(http://www.szlecheng.cn)
|
||||
* @date 2024-03-26
|
||||
*/
|
||||
|
||||
import com.yunzhupaas.base.UserInfo;
|
||||
import com.yunzhupaas.config.ConfigValueUtil;
|
||||
import com.yunzhupaas.database.util.TenantDataSourceUtil;
|
||||
import com.yunzhupaas.util.ServletUtil;
|
||||
import com.yunzhupaas.util.StringUtil;
|
||||
import com.yunzhupaas.util.UserProvider;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024/3/15 17:12
|
||||
*/
|
||||
@Slf4j
|
||||
@Aspect
|
||||
@Component
|
||||
@Order(1)
|
||||
public class VisualBindAspect {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private ConfigValueUtil configValueUtil;
|
||||
|
||||
@Pointcut("within(com.yunzhupaas.visualdata.controller.VisualCategoryController || com.yunzhupaas.visualdata.controller.VisualMapController) && (execution(* com.yunzhupaas.*.controller.VisualCategoryController.list(..)) || execution(* com.yunzhupaas.*.controller.VisualMapController.dataInfo(..)))")
|
||||
public void bindDataSource() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* NoDataSourceBind 不需要绑定数据库的注解
|
||||
*
|
||||
* @param pjp
|
||||
* @return
|
||||
* @throws Throwable
|
||||
*/
|
||||
@Around("bindDataSource()")
|
||||
public Object doAroundService(ProceedingJoinPoint pjp) throws Throwable {
|
||||
if (configValueUtil.isMultiTenancy()) {
|
||||
String jwtToken = ServletUtil.getRequest().getHeader("Authorization");
|
||||
if(StringUtil.isEmpty(jwtToken)){
|
||||
//兼容旧版大屏前端
|
||||
jwtToken = ServletUtil.getRequest().getParameter("token");
|
||||
}
|
||||
UserInfo userInfo = UserProvider.getUser(jwtToken);
|
||||
if(userInfo.getTenantId() == null){
|
||||
throw new RuntimeException("租户信息为空: " + jwtToken);
|
||||
}
|
||||
//设置租户
|
||||
TenantDataSourceUtil.switchTenant(userInfo.getTenantId());
|
||||
}
|
||||
Object obj = pjp.proceed();
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.yunzhupaas.visualdata.utils;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.yunzhupaas.properties.SecurityProperties;
|
||||
import com.yunzhupaas.util.ServletUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class VisualDataPermissionUtil {
|
||||
|
||||
private static SecurityProperties securityProperties;
|
||||
private static final String[] refererPath = new String[]{"**/DataV/view/{id}", "**/DataV/build/{id}"};
|
||||
|
||||
public VisualDataPermissionUtil(SecurityProperties securityProperties) {
|
||||
VisualDataPermissionUtil.securityProperties = securityProperties;
|
||||
}
|
||||
|
||||
public static void checkByReferer() {
|
||||
if (securityProperties.isEnablePreAuth()) {
|
||||
String referer = ServletUtil.getHeader("Referer");
|
||||
String id = null;
|
||||
for (String s : refererPath) {
|
||||
Map<String, String> pathVariables = ServletUtil.getPathVariables(s, referer);
|
||||
id = pathVariables.get("id");
|
||||
if (id != null) {
|
||||
id = id.split("[?]")[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
StpUtil.checkPermissionOr("onlineDev.dataScreen", id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
29
yunzhupaas-visualdata/yunzhupaas-visualdata-entity/pom.xml
Normal file
29
yunzhupaas-visualdata/yunzhupaas-visualdata-entity/pom.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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-entity</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-common-all</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-exception</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 静态资源
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年12月28日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_assets")
|
||||
public class VisualAssetsEntity {
|
||||
|
||||
/** 主键 */
|
||||
@TableId("id")
|
||||
private String id;
|
||||
|
||||
/** 资源名称 */
|
||||
@TableField("assetsName")
|
||||
private String assetsName;
|
||||
/** 资源大小 1M */
|
||||
@TableField("assetsSize")
|
||||
private String assetsSize;
|
||||
/** 资源上传时间 */
|
||||
@TableField("assetsTime")
|
||||
private Date assetsTime;
|
||||
/** 资源后缀名 */
|
||||
@TableField("assetsType")
|
||||
private String assetsType;
|
||||
/** 资源地址 */
|
||||
@TableField("assetsUrl")
|
||||
private String assetsUrl;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 大屏分类
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_category")
|
||||
public class VisualCategoryEntity {
|
||||
/** 主键 */
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
/** 分类值 */
|
||||
@TableField("CATEGORY_KEY")
|
||||
private String categorykey;
|
||||
|
||||
/** 分类名称 */
|
||||
@TableField("CATEGORY_VALUE")
|
||||
private String categoryvalue;
|
||||
|
||||
/** 是否删除 */
|
||||
@TableField("IS_DELETED")
|
||||
private Integer isdeleted;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 大屏组件库
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_component")
|
||||
public class VisualComponentEntity {
|
||||
|
||||
/** 主键 */
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
/** 组件名称 */
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/** 组件内容 */
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/** 组件类型 */
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/** 组件图片 */
|
||||
@TableField("img")
|
||||
private String img;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 大屏基本配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_config")
|
||||
public class VisualConfigEntity {
|
||||
/** 主键 */
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
/** 可视化表主键 */
|
||||
@TableField("VISUAL_ID")
|
||||
private String visualId;
|
||||
|
||||
/** 配置json */
|
||||
@TableField("DETAIL")
|
||||
private String detail;
|
||||
|
||||
/** 组件json */
|
||||
@TableField("COMPONENT")
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 大屏数据源配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_db")
|
||||
public class VisualDbEntity {
|
||||
/** 主键 */
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
/** 名称 */
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
|
||||
/** 驱动类 */
|
||||
@TableField("DRIVER_CLASS")
|
||||
private String driverClass;
|
||||
|
||||
/** 连接地址 */
|
||||
@TableField("URL")
|
||||
private String url;
|
||||
|
||||
/** 用户名 */
|
||||
@TableField("USERNAME")
|
||||
private String username;
|
||||
|
||||
/** 密码 */
|
||||
@TableField("PASSWORD")
|
||||
private String password;
|
||||
|
||||
/** 备注 */
|
||||
@TableField("REMARK")
|
||||
private String remark;
|
||||
|
||||
/** 创建人 */
|
||||
@TableField("CREATE_USER")
|
||||
private String createUser;
|
||||
|
||||
/** 创建部门 */
|
||||
@TableField("CREATE_DEPT")
|
||||
private String createDept;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField("CREATE_TIME")
|
||||
private Date createTime;
|
||||
|
||||
/** 修改人 */
|
||||
@TableField("UPDATE_USER")
|
||||
private String updateUser;
|
||||
|
||||
/** 修改时间 */
|
||||
@TableField("UPDATE_TIME")
|
||||
private Date updateTime;
|
||||
|
||||
/** 状态 */
|
||||
@TableField("STATUS")
|
||||
private String status;
|
||||
|
||||
/** 是否已删除 */
|
||||
@TableField("IS_DELETED")
|
||||
private String isDeleted;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 大屏基本信息
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual")
|
||||
public class VisualEntity {
|
||||
/** 主键 */
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
/** 大屏标题 */
|
||||
@TableField("TITLE")
|
||||
private String title;
|
||||
|
||||
/** 大屏背景 */
|
||||
@TableField("BACKGROUND_URL")
|
||||
private String backgroundUrl;
|
||||
|
||||
/** 大屏类型 */
|
||||
@TableField("CATEGORY")
|
||||
private Integer category;
|
||||
|
||||
/** 发布密码 */
|
||||
@TableField("PASSWORD")
|
||||
private String password;
|
||||
|
||||
/** 创建人 */
|
||||
@TableField("CREATE_USER")
|
||||
private String createUser;
|
||||
|
||||
/** 创建部门 */
|
||||
@TableField("CREATE_DEPT")
|
||||
private String createDept;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField("CREATE_TIME")
|
||||
private Date createTime;
|
||||
|
||||
/** 修改人 */
|
||||
@TableField("UPDATE_USER")
|
||||
private String updateUser;
|
||||
|
||||
/** 修改时间 */
|
||||
@TableField("UPDATE_TIME")
|
||||
private Date updateTime;
|
||||
|
||||
/** 状态 */
|
||||
@TableField("STATUS")
|
||||
private Integer status;
|
||||
|
||||
/** 是否已删除 */
|
||||
@TableField("IS_DELETED")
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 全局变量
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年12月28日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_glob")
|
||||
public class VisualGlobEntity {
|
||||
|
||||
/** 主键 */
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
/** 变量名称 */
|
||||
@TableField("globalName")
|
||||
private String globalName;
|
||||
|
||||
/** 变量Key */
|
||||
@TableField("globalKey")
|
||||
private String globalKey;
|
||||
|
||||
/** 组变量值 */
|
||||
@TableField("globalValue")
|
||||
private String globalValue;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 大屏地图配置
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_map")
|
||||
public class VisualMapEntity {
|
||||
/** 主键 */
|
||||
@TableId("id")
|
||||
private String id;
|
||||
|
||||
/** 地图名称 */
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/** 地图数据 */
|
||||
@TableField("data")
|
||||
private String data;
|
||||
|
||||
/** 地图编码 */
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/** 地图级别 0:国家 1:省份 2:城市 3:区县 */
|
||||
@TableField("map_level")
|
||||
@JSONField(name = "level")
|
||||
private Integer mapLevel;
|
||||
|
||||
/** 上级ID */
|
||||
@TableField("parent_id")
|
||||
private String parentId;
|
||||
|
||||
/** 上级编码 */
|
||||
@TableField("parent_code")
|
||||
private String parentCode;
|
||||
|
||||
/** 祖编码 */
|
||||
@TableField("ancestors")
|
||||
private String ancestors;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.yunzhupaas.visualdata.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 大屏数据集
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_visual_record")
|
||||
public class VisualRecordEntity {
|
||||
|
||||
/** 主键 */
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
/** 名称 */
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/** 请求地址 */
|
||||
@TableField("url")
|
||||
private String url;
|
||||
|
||||
/** 数据集类型 */
|
||||
@TableField("dataType")
|
||||
private Integer dataType;
|
||||
|
||||
/** 请求方法 */
|
||||
@TableField("dataMethod")
|
||||
private String dataMethod;
|
||||
|
||||
/** 数据集类型 */
|
||||
@TableField("dataHeader")
|
||||
private String dataHeader;
|
||||
|
||||
/** 请求数据 */
|
||||
@TableField("data")
|
||||
private String data;
|
||||
|
||||
/** 请求参数 */
|
||||
@TableField("dataQuery")
|
||||
private String dataQuery;
|
||||
|
||||
/** 请求参数类型 */
|
||||
@TableField("dataQueryType")
|
||||
private String dataQueryType;
|
||||
|
||||
/** 过滤器 */
|
||||
@TableField("dataFormatter")
|
||||
private String dataFormatter;
|
||||
|
||||
/** 开启跨域 */
|
||||
@TableField("proxy")
|
||||
private Integer proxy;
|
||||
|
||||
/** WebSocket地址 */
|
||||
@TableField("wsUrl")
|
||||
private String wsUrl;
|
||||
|
||||
/** 数据集类型 */
|
||||
@TableField("dbsql")
|
||||
private String dbsql;
|
||||
|
||||
/** 数据集类型 */
|
||||
@TableField("fsql")
|
||||
@JSONField(name = "sql")
|
||||
private String fsql;
|
||||
|
||||
/** 数据集类型 */
|
||||
@TableField("result")
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* MTQQ 连接地址
|
||||
*/
|
||||
@TableField("mqttUrl")
|
||||
private String mqtturl;
|
||||
|
||||
/**
|
||||
* MQTT 配置
|
||||
*/
|
||||
@TableField("mqttConfig")
|
||||
private String mqttConfig;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "f_tenant_id" , fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.yunzhupaas.visualdata.enums;
|
||||
|
||||
/**
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
public enum VisualImgEnum {
|
||||
/**
|
||||
* 背景图片
|
||||
*/
|
||||
BG("0", "bg"),
|
||||
/**
|
||||
* 图片框
|
||||
*/
|
||||
BORDER("1", "border"),
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
SOURCE("2", "source"),
|
||||
/**
|
||||
* banner
|
||||
*/
|
||||
BANNER("3", "banner"),
|
||||
/**
|
||||
* banner
|
||||
*/
|
||||
BACKGROUND("5", "background"),
|
||||
/**
|
||||
* 大屏截图
|
||||
*/
|
||||
SCREENSHOT("4", "screenShot");
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
private String message;
|
||||
|
||||
VisualImgEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断名称是否存在
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static VisualImgEnum getByMessage(String type) {
|
||||
for (VisualImgEnum value : VisualImgEnum.values()) {
|
||||
if(value.code.contains(type) || value.getMessage().contains(type)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yunzhupaas.visualdata.model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualPageVO<T> {
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
@Schema(description ="数据")
|
||||
private List<T> records;
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@Schema(description ="当前页")
|
||||
private Long current;
|
||||
/**
|
||||
* 每页行数
|
||||
*/
|
||||
@Schema(description ="每页行数")
|
||||
private Long size;
|
||||
/**
|
||||
* 总记录数
|
||||
*/
|
||||
@Schema(description ="总记录数")
|
||||
private Long total;
|
||||
/**
|
||||
* 总页数
|
||||
*/
|
||||
@Schema(description ="总页数")
|
||||
private Long pages;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.yunzhupaas.visualdata.model;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualPagination {
|
||||
@Schema(description ="每页条数",example = "10")
|
||||
private long size=10;
|
||||
@Schema(description ="当前页数",example = "1")
|
||||
private long current=1;
|
||||
@Schema(hidden = true)
|
||||
private long total;
|
||||
@Schema(hidden = true)
|
||||
private long pages;
|
||||
|
||||
public <T> List<T> setData(IPage<T> page) {
|
||||
this.total = page.getTotal();
|
||||
if (this.total > 0) {
|
||||
this.pages = this.total % this.size == 0 ? this.total / this.size : this.total / this.size + 1;
|
||||
} else {
|
||||
this.pages = 0L;
|
||||
}
|
||||
return page.getRecords();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 请求Api数据结构
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualApiRequest {
|
||||
|
||||
@NotBlank
|
||||
@Schema(description ="路径")
|
||||
private String url;
|
||||
@NotBlank
|
||||
@Schema(description ="每页条数")
|
||||
private String method;
|
||||
@Schema(description ="每页条数")
|
||||
private Map<String, String> headers = Collections.emptyMap();
|
||||
@Schema(description ="每页条数")
|
||||
private Map<String, String> params = Collections.emptyMap();
|
||||
@Schema(description ="每页条数")
|
||||
private int timeout = 3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualCrModel {
|
||||
@Schema(description ="标题")
|
||||
private String title;
|
||||
@Schema(description ="密码")
|
||||
private String password;
|
||||
@Schema(description ="分类")
|
||||
private String category;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.yunzhupaas.visualdata.model.visualconfig.VisualConfigCrForm;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualCrform {
|
||||
@Schema(description ="大屏基本信息")
|
||||
private VisualCrModel visual;
|
||||
@Schema(description ="大屏配置")
|
||||
private VisualConfigCrForm config;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualInfoModel extends VisualCrModel{
|
||||
@Schema(description ="背景url")
|
||||
private String backgroundUrl;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.yunzhupaas.visualdata.model.visualconfig.VisualConfigInfoModel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualInfoVO {
|
||||
@Schema(description ="大屏基本信息")
|
||||
private VisualInfoModel visual;
|
||||
@Schema(description ="大屏配置")
|
||||
private VisualConfigInfoModel config;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualListVO {
|
||||
@Schema(description ="背景url")
|
||||
private String backgroundUrl;
|
||||
@Schema(description ="标题")
|
||||
private String title;
|
||||
@Schema(description ="密码")
|
||||
private String password;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
@Schema(description ="发布状态")
|
||||
private Integer status;
|
||||
@Schema(description ="分类")
|
||||
private String category;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.yunzhupaas.visualdata.entity.VisualConfigEntity;
|
||||
import com.yunzhupaas.visualdata.entity.VisualEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 大屏导出
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年7月10日
|
||||
*/
|
||||
@Data
|
||||
public class VisualModel {
|
||||
@Schema(description ="大屏基本信息")
|
||||
private VisualEntity entity;
|
||||
@Schema(description ="大屏配置信息")
|
||||
private VisualConfigEntity configEntity;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.yunzhupaas.visualdata.model.VisualPagination;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualPaginationModel extends VisualPagination {
|
||||
@Schema(description ="分类")
|
||||
private Integer category;
|
||||
@Schema(description ="名称")
|
||||
private String title;
|
||||
@Schema(description ="名称")
|
||||
private String categoryValue;
|
||||
@Schema(description ="名称")
|
||||
private String name;
|
||||
@Schema(description ="名称")
|
||||
private String globalName;
|
||||
@Schema(description ="名称")
|
||||
private String assetsName;
|
||||
@Schema(description = "组件类型(0,1)")
|
||||
private Integer type;
|
||||
@Schema(description ="上级编码")
|
||||
private String parentId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualProxyModel {
|
||||
|
||||
@NotBlank
|
||||
@Schema(description ="路径")
|
||||
private String url;
|
||||
@NotBlank
|
||||
@Schema(description ="请求方式")
|
||||
private String method;
|
||||
@Schema(description ="headers")
|
||||
private Map<String, String> headers = Collections.emptyMap();
|
||||
@Schema(description ="data")
|
||||
private Map<String, Object> data = null;
|
||||
@Schema(description ="params")
|
||||
private Map<String, Object> params = Collections.emptyMap();
|
||||
@Schema(description ="每页条数")
|
||||
private int timeout = 3;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualSelectorVO {
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
@Schema(description ="名称")
|
||||
private String fullName;
|
||||
@Schema(description ="是否有下级")
|
||||
private Boolean hasChildren;
|
||||
@Schema(description ="下级")
|
||||
private List<VisualSelectorVO> children;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualUpModel extends VisualCrModel{
|
||||
@Schema(description ="背景url")
|
||||
private String backgroundUrl;
|
||||
@Schema(description ="发布状态")
|
||||
private String status;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.visualdata.model.visual;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.yunzhupaas.visualdata.model.visualconfig.VisualConfigUpForm;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualUpform {
|
||||
@Schema(description ="大屏基本信息")
|
||||
private VisualUpModel visual;
|
||||
@Schema(description ="大屏配置")
|
||||
private VisualConfigUpForm config;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.yunzhupaas.visualdata.model.visualassets;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualAssetsCrForm {
|
||||
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "资源名称")
|
||||
private String assetsName;
|
||||
|
||||
@Schema(description = "资源大小")
|
||||
private String assetsSize;
|
||||
|
||||
@Schema(description = "资源上传时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date assetsTime;
|
||||
|
||||
@Schema(description = "资源后缀名")
|
||||
private String assetsType;
|
||||
|
||||
@Schema(description = "资源地址")
|
||||
private String assetsUrl;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.model.visualassets;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualAssetsInfoVO extends VisualAssetsCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.model.visualassets;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualAssetsListVO extends VisualAssetsCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.model.visualassets;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualAssetsUpForm extends VisualAssetsCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcategory;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualCategoryCrForm {
|
||||
@Schema(description ="分类键值")
|
||||
private String categoryKey;
|
||||
@Schema(description ="分类名称")
|
||||
private String categoryValue;
|
||||
@Schema(description ="是否已删除")
|
||||
private Integer isDeleted;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcategory;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualCategoryInfoVO {
|
||||
@Schema(description ="分类键值")
|
||||
private String categoryKey;
|
||||
@Schema(description ="分类名称")
|
||||
private String categoryValue;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
@Schema(description ="是否已删除")
|
||||
private Integer isDeleted;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcategory;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualCategoryListVO {
|
||||
@Schema(description ="分类键值")
|
||||
private String categoryKey;
|
||||
@Schema(description ="分类名称")
|
||||
private String categoryValue;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
@Schema(description ="是否已删除")
|
||||
private Integer isDeleted;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcategory;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualCategoryUpForm extends VisualCategoryCrForm {
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcomponent;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualComponentCrForm {
|
||||
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "组件内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "组件类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "组件图片")
|
||||
private String img;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcomponent;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualComponentInfoVO extends VisualComponentCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcomponent;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualComponentListVO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "组件类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "组件图片")
|
||||
private String img;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunzhupaas.visualdata.model.visualcomponent;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualComponentUpForm extends VisualComponentCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunzhupaas.visualdata.model.visualconfig;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualConfigCrForm {
|
||||
@Schema(description ="大屏详情")
|
||||
private String detail;
|
||||
@Schema(description ="内容")
|
||||
private String component;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunzhupaas.visualdata.model.visualconfig;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualConfigInfoModel extends VisualConfigCrForm{
|
||||
@Schema(description ="大屏配置主键")
|
||||
private String id;
|
||||
@Schema(description ="大屏基本主键")
|
||||
private String visualId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunzhupaas.visualdata.model.visualconfig;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualConfigUpForm extends VisualConfigCrForm {
|
||||
@Schema(description ="大屏配置主键")
|
||||
private String id;
|
||||
@Schema(description ="大屏基本主键")
|
||||
private String visualId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yunzhupaas.visualdata.model.visualdb;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualDbCrForm {
|
||||
@Schema(description ="驱动")
|
||||
private String driverClass;
|
||||
@Schema(description ="密码")
|
||||
private String password;
|
||||
@Schema(description ="连接")
|
||||
private String url;
|
||||
@Schema(description ="用户名")
|
||||
private String username;
|
||||
@Schema(description ="名称")
|
||||
private String name;
|
||||
@Schema(description ="备注")
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.yunzhupaas.visualdata.model.visualdb;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualDbInfoVO {
|
||||
/** 主键 */
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
|
||||
/** 名称 */
|
||||
@Schema(description ="名称")
|
||||
private String name;
|
||||
|
||||
/** 驱动类 */
|
||||
@Schema(description ="驱动类")
|
||||
private String driverClass;
|
||||
|
||||
/** 连接地址 */
|
||||
@Schema(description ="连接地址")
|
||||
private String url;
|
||||
|
||||
/** 用户名 */
|
||||
@Schema(description ="用户名")
|
||||
private String username;
|
||||
|
||||
/** 密码 */
|
||||
@Schema(description ="密码")
|
||||
private String password;
|
||||
|
||||
/** 备注 */
|
||||
@Schema(description ="备注")
|
||||
private String remark;
|
||||
|
||||
/** 状态 */
|
||||
@Schema(description ="状态")
|
||||
private String status;
|
||||
|
||||
/** 是否已删除 */
|
||||
@Schema(description ="是否已删除")
|
||||
private String isDeleted;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.yunzhupaas.visualdata.model.visualdb;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualDbListVO {
|
||||
@Schema(description ="驱动")
|
||||
private String driverClass;
|
||||
@Schema(description ="名称")
|
||||
private String name;
|
||||
@Schema(description ="用户名")
|
||||
private String username;
|
||||
@Schema(description ="连接")
|
||||
private String url;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
@Schema(description ="备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunzhupaas.visualdata.model.visualdb;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualDbQueryForm {
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
@Schema(description ="sql语句")
|
||||
private String sql;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yunzhupaas.visualdata.model.visualdb;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualDbSelectVO {
|
||||
@Schema(description ="驱动")
|
||||
private String driverClass;
|
||||
@Schema(description ="名称")
|
||||
private String name;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunzhupaas.visualdata.model.visualdb;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualDbUpForm extends VisualDbCrForm{
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yunzhupaas.visualdata.model.visualfile;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class ImageVO {
|
||||
@Schema(description ="路径")
|
||||
private String domain;
|
||||
@Schema(description ="链接")
|
||||
private String link;
|
||||
@Schema(description ="名称")
|
||||
private String name;
|
||||
@Schema(description ="名称")
|
||||
private String originalName;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.yunzhupaas.visualdata.model.visualglob;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualGlobCrForm {
|
||||
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "变量名称")
|
||||
private String globalName;
|
||||
|
||||
@Schema(description = "变量Key")
|
||||
private String globalKey;
|
||||
|
||||
@Schema(description = "组变量值")
|
||||
private String globalValue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.model.visualglob;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualGlobInfoVO extends VisualGlobCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.model.visualglob;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualGlobListVO extends VisualGlobCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunzhupaas.visualdata.model.visualglob;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualGlobUpForm extends VisualGlobCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yunzhupaas.visualdata.model.visualmap;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualMapCrForm {
|
||||
@Schema(description ="地图名称")
|
||||
private String name;
|
||||
@Schema(description ="地图数据")
|
||||
private String data;
|
||||
|
||||
@Schema(description ="地图编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description ="地图级别")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description ="上级ID")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description ="上级编码")
|
||||
private String parentCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.yunzhupaas.visualdata.model.visualmap;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualMapInfoVO {
|
||||
@Schema(description ="地图名称")
|
||||
private String name;
|
||||
@Schema(description ="地图数据")
|
||||
private String data;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description ="地图编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description ="地图级别")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description ="上级ID")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description ="上级编码")
|
||||
private String parentCode;
|
||||
|
||||
@Schema(description ="祖编码")
|
||||
private String ancestors;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.yunzhupaas.visualdata.model.visualmap;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualMapListVO {
|
||||
@Schema(description ="地图名称")
|
||||
private String name;
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description ="地图编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description ="地图级别")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description ="上级名称")
|
||||
private String parentName;
|
||||
|
||||
@Schema(description ="是否存在下级")
|
||||
private Boolean hasChildren;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.visualdata.model.visualmap;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2024年6月15日
|
||||
*/
|
||||
@Data
|
||||
public class VisualMapUpForm extends VisualMapCrForm {
|
||||
@Schema(description ="主键")
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.yunzhupaas.visualdata.model.visualrecord;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualRecordCrForm {
|
||||
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "请求地址")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "数据集类型")
|
||||
private Integer dataType;
|
||||
|
||||
@Schema(description = "请求方法")
|
||||
private String dataMethod;
|
||||
|
||||
@Schema(description = "数据集类型")
|
||||
private String dataHeader;
|
||||
|
||||
@Schema(description = "请求数据")
|
||||
private String data;
|
||||
|
||||
@Schema(description = "请求参数")
|
||||
private String dataQuery;
|
||||
|
||||
@Schema(description = "请求参数类型")
|
||||
private String dataQueryType;
|
||||
|
||||
@Schema(description = "过滤器")
|
||||
private String dataFormatter;
|
||||
|
||||
@Schema(description = "开启跨域")
|
||||
private Boolean proxy;
|
||||
|
||||
@Schema(description = "WebSocket地址")
|
||||
private String wsUrl;
|
||||
|
||||
@Schema(description = "数据集类型")
|
||||
private String dbsql;
|
||||
|
||||
@Schema(description = "数据集类型")
|
||||
private String sql;
|
||||
|
||||
@Schema(description = "MTQQ 连接地址")
|
||||
private String mqtturl;
|
||||
|
||||
@Schema(description = "MQTT 配置")
|
||||
private String mqttConfig;
|
||||
|
||||
@Schema(description = "数据集类型")
|
||||
private String result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunzhupaas.visualdata.model.visualrecord;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualRecordInfoVO extends VisualRecordCrForm {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.visualdata.model.visualrecord;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualRecordListVO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "数据集类型")
|
||||
private Integer dataType;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunzhupaas.visualdata.model.visualrecord;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 云筑产品开发平台组
|
||||
* @version V3.5.0
|
||||
* @copyright 深圳市乐程软件有限公司
|
||||
* @date 2023年7月7日
|
||||
*/
|
||||
@Data
|
||||
public class VisualRecordUpForm extends VisualRecordCrForm {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user