Merge branch 'dev-V0.4.5' of https://gitee.com/iotkit-open-source/iotkit-parent into dev-V0.4.5

V0.5.x
xiwa 2023-05-17 08:24:08 +08:00
commit b75a7cb1b6
39 changed files with 195 additions and 2 deletions

View File

@ -1,10 +1,11 @@
package cc.iotkit.common.utils.file;
import cn.hutool.core.io.FileUtil;
import jakarta.servlet.http.HttpServletResponse;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

View File

@ -21,7 +21,6 @@
<module>iot-common-core</module>
<module>iot-script-engine</module>
<module>iot-message-bus</module>
<module>iot-message-notify</module>
<module>iot-common-doc</module>
<module>iot-common-excel</module>
<module>iot-common-log</module>

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysOssConfigData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysOssData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysPostData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysRoleData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysRoleDeptData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysRoleMenuData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysTenantData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysTenantPackageData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysUserData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysUserPostData {
}

View File

@ -0,0 +1,9 @@
package cc.iotkit.data.system;
/**
*
*
* @author sjg
*/
public interface ISysUserRoleData {
}

View File

@ -23,6 +23,16 @@
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- QueryDSL框架依赖 -->
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
</dependency>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@ -63,6 +73,11 @@
<groupId>cc.iotkit</groupId>
<artifactId>iot-data-service</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>2.7.11</version>
</dependency>
</dependencies>
@ -90,6 +105,26 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<!--因为QueryDsl是类型安全的所以还需要加上Maven APT plugin使用 APT 自动生成Q类:-->
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -0,0 +1,23 @@
package cc.iotkit.data.convert.system;
import cc.iotkit.data.model.TbAlertConfig;
import cc.iotkit.model.alert.AlertConfig;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface SysConfigMapper {
SysConfigMapper M = Mappers.getMapper(SysConfigMapper.class);
AlertConfig toDto(TbAlertConfig vo);
TbAlertConfig toVo(AlertConfig dto);
static List<AlertConfig> toDto(List<TbAlertConfig> alertConfigs) {
return alertConfigs.stream().map(M::toDto).collect(Collectors.toList());
}
}

View File

@ -0,0 +1,17 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysConfig;
import org.springframework.data.jpa.repository.JpaRepository;
public interface SysConfigRepository extends JpaRepository<TbSysConfig, Long>, QueryDslPredicateExecutor<TbSysConfig> {
}

View File

@ -0,0 +1,17 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysConfig;
import org.springframework.data.jpa.repository.JpaRepository;
public interface SysDeptRepository extends JpaRepository<TbSysConfig, Long> {
}

View File

@ -1,5 +1,6 @@
package cc.iotkit.system.mapper;
import cc.iotkit.model.system.SysDept;
import cc.iotkit.system.domain.vo.SysDeptVo;
import java.util.List;

View File

@ -15,6 +15,7 @@
<module>iot-system</module>
<module>iot-manager</module>
<module>iot-rule-engine</module>
<module>iot-message-notify</module>
</modules>