| | |
| | | db: |
| | | num: 1 |
| | | url: |
| | | '0': jdbc:mysql://172.16.8.100:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true |
| | | '0': jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true |
| | | password: |
| | | '0': 123456 |
| | | user: |
| | |
| | | number_format: 0. |
| | | new_builtin_class_resolver: safer |
| | | datasource: |
| | | url: jdbc:mysql://172.16.8.100:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: 123456 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
对比新文件 |
| | |
| | | <?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>iailab-plat</artifactId> |
| | | <groupId>com.iailab</groupId> |
| | | <version>0.0.1</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>iailab-fast</artifactId> |
| | | <description> |
| | | 快速开发框架,默认基础system,data,model |
| | | </description> |
| | | |
| | | |
| | | </project> |
| | |
| | | |
| | | </dependencies> |
| | | |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | |
| | | <version>${revision}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.iailab</groupId> |
| | | <artifactId>iailab-common-biz-tenant</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.auth0</groupId> |
| | | <artifactId>java-jwt</artifactId> |
| | | <version>${java-jwt.version}</version> |
| | |
| | | <groupId>org.openscada.external</groupId> |
| | | <artifactId>org.openscada.external.jcifs</artifactId> |
| | | <version>1.2.25</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>org.bouncycastle</groupId> |
| | | <artifactId>bcprov-jdk15on</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.openscada.jinterop</groupId> |
| | |
| | | <groupId>org.openscada.jinterop</groupId> |
| | | <artifactId>org.openscada.jinterop.deps</artifactId> |
| | | <version>1.5.0</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>org.bouncycastle</groupId> |
| | | <artifactId>bcprov-jdk15on</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.openscada.utgard</groupId> |
| | |
| | | package com.iailab.module.data.channel.modbus.controller.admin; |
| | | |
| | | import com.iailab.module.data.common.utils.PageUtils; |
| | | import com.iailab.module.data.common.utils.R; |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | | import com.iailab.module.data.channel.modbus.vo.ModBusDevicePageReqVO; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | | import com.iailab.module.data.channel.modbus.service.ChannelModbusDeviceService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.iailab.module.data.channel.modbus.vo.ModBusDeviceRespVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | import static com.iailab.framework.common.pojo.CommonResult.success; |
| | | |
| | | /** |
| | | * 操作modbus配置 |
| | |
| | | /** |
| | | * 分页查询设备 |
| | | * |
| | | * @param params |
| | | * @param reqVO |
| | | */ |
| | | @GetMapping("/list") |
| | | public R list(@RequestParam Map<String, Object> params){ |
| | | PageUtils page = channelModbusDeviceService.queryPage(params); |
| | | @GetMapping("/page") |
| | | public CommonResult<PageResult<ModBusDeviceRespVO>> list(@Valid ModBusDevicePageReqVO reqVO) { |
| | | PageResult<ChannelModBusDeviceEntity> page = channelModbusDeviceService.queryPage(reqVO); |
| | | |
| | | return R.ok().put("page", page); |
| | | return success(BeanUtils.toBean(page, ModBusDeviceRespVO.class)); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查询设备详情 |
| | | * |
| | | * @param id |
| | | */ |
| | | @GetMapping("/info/{id}") |
| | | public R info(@PathVariable("id") String id){ |
| | | ChannelModBusDeviceEntity info= channelModbusDeviceService.info(id); |
| | | return R.ok().put("data", info); |
| | | } |
| | | /** |
| | | * 添加设备 |
| | | * |
| | | * @param channelModBusDeviceEntity |
| | | */ |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity){ |
| | | String id = UUID.randomUUID().toString(); |
| | | channelModBusDeviceEntity.setId(id); |
| | | channelModbusDeviceService.add(channelModBusDeviceEntity); |
| | | return R.ok(); |
| | | public CommonResult<ChannelModBusDeviceEntity> info(@PathVariable("id") String id) { |
| | | ChannelModBusDeviceEntity info = channelModbusDeviceService.info(id); |
| | | return success(info); |
| | | } |
| | | |
| | | /** |
| | | * 修改设备 |
| | | * |
| | | * @param channelModBusDeviceEntity |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) { |
| | | * 添加设备 |
| | | * |
| | | * @param channelModBusDeviceEntity |
| | | */ |
| | | @PostMapping("/add") |
| | | public CommonResult<Boolean> add(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) { |
| | | String id = UUID.randomUUID().toString(); |
| | | channelModBusDeviceEntity.setId(id); |
| | | channelModbusDeviceService.add(channelModBusDeviceEntity); |
| | | return success(true); |
| | | } |
| | | |
| | | /** |
| | | * 修改设备 |
| | | * |
| | | * @param channelModBusDeviceEntity |
| | | */ |
| | | @PutMapping("/update") |
| | | public CommonResult<Boolean> update(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) { |
| | | channelModbusDeviceService.update(channelModBusDeviceEntity); |
| | | return R.ok(); |
| | | return success(true); |
| | | } |
| | | |
| | | /** |
| | | * 删除设备 |
| | | * |
| | | * @param params |
| | | * |
| | | * @param id |
| | | */ |
| | | @PostMapping("/delete") |
| | | public R delete(@RequestBody Map<String, Object> params) { |
| | | String id = (String)params.get("id"); |
| | | @DeleteMapping("/delete") |
| | | public CommonResult<Boolean> delete(@RequestParam("id") String id) { |
| | | channelModbusDeviceService.delete(id); |
| | | return R.ok(); |
| | | return success(true); |
| | | } |
| | | |
| | | |
| | |
| | | package com.iailab.module.data.channel.modbus.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
| | | import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; |
| | | import com.iailab.framework.tenant.core.db.dynamic.TenantDS; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | | import com.iailab.module.data.channel.modbus.vo.ModBusDevicePageReqVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | |
| | | * @Description |
| | | * @createTime 2023年04月24日 11:33:00 |
| | | */ |
| | | @TenantDS |
| | | @Mapper |
| | | public interface ChannelModBusDeviceDao extends BaseMapper<ChannelModBusDeviceEntity> { |
| | | public interface ChannelModBusDeviceDao extends BaseMapperX<ChannelModBusDeviceEntity> { |
| | | |
| | | default PageResult<ChannelModBusDeviceEntity> selectPage(ModBusDevicePageReqVO reqVO) { |
| | | return selectPage(reqVO, new LambdaQueryWrapperX<ChannelModBusDeviceEntity>() |
| | | .likeIfPresent(ChannelModBusDeviceEntity::getName, reqVO.getName()) |
| | | .likeIfPresent(ChannelModBusDeviceEntity::getAddress, reqVO.getAddress()) |
| | | .orderByDesc(ChannelModBusDeviceEntity::getCreateTime)); |
| | | } |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ModBus设备表 |
| | |
| | | */ |
| | | private String projectReference; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | package com.iailab.module.data.channel.modbus.service; |
| | | |
| | | import com.iailab.module.data.common.utils.PageUtils; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.module.data.channel.modbus.vo.ModBusDevicePageReqVO; |
| | | import com.iailab.module.data.channel.modbus.dto.ChannelModBusDeviceDTO; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | | |
| | |
| | | /** |
| | | * 分页查询设备 |
| | | * |
| | | * @param params |
| | | * @param reqVO |
| | | */ |
| | | PageUtils queryPage(Map<String, Object> params); |
| | | PageResult<ChannelModBusDeviceEntity> queryPage(ModBusDevicePageReqVO reqVO); |
| | | /** |
| | | * 添加设备 |
| | | * |
| | |
| | | package com.iailab.module.data.channel.modbus.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | | import com.iailab.module.data.common.utils.PageUtils; |
| | | import com.iailab.module.data.common.utils.Query; |
| | | import com.iailab.module.data.channel.modbus.vo.ModBusDevicePageReqVO; |
| | | import com.iailab.module.data.channel.modbus.dao.ChannelModBusDeviceDao; |
| | | import com.iailab.module.data.channel.modbus.dto.ChannelModBusDeviceDTO; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | |
| | | /** |
| | | * 分页查询设备 |
| | | * |
| | | * @param params |
| | | * @param reqVO |
| | | */ |
| | | @Override |
| | | public PageUtils queryPage(Map<String, Object> params) { |
| | | |
| | | String name = (String) params.get("name"); |
| | | |
| | | IPage<ChannelModBusDeviceEntity> page = this.page( |
| | | new Query<ChannelModBusDeviceEntity>().getPage(params), |
| | | new QueryWrapper<ChannelModBusDeviceEntity>() |
| | | .like(StringUtils.isNotBlank(name), "name", name) |
| | | .orderByDesc("create_time") |
| | | ); |
| | | return new PageUtils(page); |
| | | public PageResult<ChannelModBusDeviceEntity> queryPage(ModBusDevicePageReqVO reqVO) { |
| | | return channelModBusDeviceDao.selectPage(reqVO); |
| | | } |
| | | |
| | | /** |
对比新文件 |
| | |
| | | package com.iailab.module.data.channel.modbus.vo; |
| | | |
| | | import com.iailab.framework.common.pojo.PageParam; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.ToString; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年08月22日 |
| | | */ |
| | | @Schema(description = "数据平台 - ModeBus分页 Request VO") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ToString(callSuper = true) |
| | | public class ModBusDevicePageReqVO extends PageParam { |
| | | |
| | | private String name; |
| | | |
| | | private String address; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.channel.modbus.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年08月22日 |
| | | */ |
| | | @Schema(description = "数据平台 - ModBusDevice Response VO") |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class ModBusDeviceRespVO { |
| | | |
| | | @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("ID") |
| | | private String id; |
| | | |
| | | @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("设备名称") |
| | | private String name; |
| | | |
| | | @Schema(description = "IP地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("IP地址") |
| | | private String address; |
| | | |
| | | @Schema(description = "端口", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("端口") |
| | | private Integer port; |
| | | |
| | | @Schema(description = "不活动超时(ms)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("不活动超时(ms)") |
| | | private Integer connectInactivityTimeout; |
| | | |
| | | @Schema(description = "重连超时(ms)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("重连超时(ms)") |
| | | private Integer reconnectInterval; |
| | | |
| | | @Schema(description = "重试次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("重试次数") |
| | | private Integer attemptsBeforeTimeout; |
| | | |
| | | @Schema(description = "重试间隔(ms)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("重试间隔(ms)") |
| | | private Integer waitToRetryMilliseconds; |
| | | |
| | | @Schema(description = "读超时(ms)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("读超时(ms)") |
| | | private Integer readTimeout; |
| | | |
| | | @Schema(description = "写超时(ms)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("写超时(ms)") |
| | | private Integer writeTimeout; |
| | | |
| | | @Schema(description = "是否使用优化", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("是否使用优化") |
| | | private Boolean useOptimizedBlockRead; |
| | | |
| | | @Schema(description = "统内部用,默认空字符串", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("统内部用,默认空字符串") |
| | | private String projectReference; |
| | | |
| | | @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("创建时间") |
| | | private Date createTime; |
| | | |
| | | @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("更新时间") |
| | | private Date updateTime; |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.api.db; |
| | | |
| | | import com.iailab.module.infra.api.db.dto.DataSourceConfigRespDTO; |
| | | import com.iailab.module.infra.enums.ApiConstants; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * 数据源配置 API 接口 |
| | | * |
| | | * @author 芋道源码 |
| | | */ |
| | | @FeignClient(name = ApiConstants.NAME) |
| | | @Tag(name = "RPC 服务 - 数据源配置") |
| | | public interface DataSourceConfigServiceApi { |
| | | |
| | | String PREFIX = ApiConstants.PREFIX + "/data-source"; |
| | | |
| | | @PostMapping(PREFIX + "/get") |
| | | @Operation(summary = "获得数据源配置") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | DataSourceConfigRespDTO getDataSourceConfig(@RequestParam("id") Long id); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.api.db.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 数据源配置 Response DTO |
| | | * |
| | | * @author 芋道源码 |
| | | */ |
| | | @Data |
| | | public class DataSourceConfigRespDTO { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 连接名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 数据源连接 |
| | | */ |
| | | private String url; |
| | | /** |
| | | * 用户名 |
| | | */ |
| | | private String username; |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String password; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.api.db; |
| | | |
| | | import com.iailab.module.infra.api.db.dto.DataSourceConfigRespDTO; |
| | | import com.iailab.module.infra.convert.db.DataSourceConfigConvert; |
| | | import com.iailab.module.infra.service.db.DataSourceConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 数据源配置 API 实现类 |
| | | * |
| | | * @author 芋道源码 |
| | | */ |
| | | @Service |
| | | public class DataSourceConfigServiceApiImpl implements DataSourceConfigServiceApi { |
| | | |
| | | @Resource |
| | | private DataSourceConfigService dataSourceConfigService; |
| | | |
| | | @Override |
| | | public DataSourceConfigRespDTO getDataSourceConfig(Long id) { |
| | | return DataSourceConfigConvert.INSTANCE.convert02(dataSourceConfigService.getDataSourceConfig(id)); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.controller.admin.db.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * 数据源配置 Base VO,提供给添加、修改、详细的子 VO 使用 |
| | | * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
| | | */ |
| | | @Data |
| | | public class DataSourceConfigBaseVO { |
| | | |
| | | @Schema(description = "数据源名称", required = true, example = "test") |
| | | @NotNull(message = "数据源名称不能为空") |
| | | private String name; |
| | | |
| | | @Schema(description = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro") |
| | | @NotNull(message = "数据源连接不能为空") |
| | | private String url; |
| | | |
| | | @Schema(description = "用户名", required = true, example = "root") |
| | | @NotNull(message = "用户名不能为空") |
| | | private String username; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.controller.admin.db.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.ToString; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Schema(description = "管理后台 - 数据源配置创建 Request VO") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ToString(callSuper = true) |
| | | public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO { |
| | | |
| | | @Schema(description = "密码", required = true, example = "123456") |
| | | @NotNull(message = "密码不能为空") |
| | | private String password; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.controller.admin.db.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | @Schema(description = "管理后台 - 数据源配置的精简 Response VO") |
| | | @Data |
| | | public class DataSourceConfigSimpleRespVO { |
| | | |
| | | @Schema(description = "主键编号", required = true, example = "1024") |
| | | private Integer id; |
| | | |
| | | @Schema(description = "数据源名称", required = true, example = "test") |
| | | private String name; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.controller.admin.db.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.ToString; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Schema(description = "管理后台 - 数据源配置更新 Request VO") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ToString(callSuper = true) |
| | | public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO { |
| | | |
| | | @Schema(description = "主键编号", required = true, example = "1024") |
| | | @NotNull(message = "主键编号不能为空") |
| | | private Long id; |
| | | |
| | | @Schema(description = "密码", required = true, example = "123456") |
| | | @NotNull(message = "密码不能为空") |
| | | private String password; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.infra.convert.db; |
| | | |
| | | import com.iailab.module.infra.api.db.dto.DataSourceConfigRespDTO; |
| | | import com.iailab.module.infra.controller.admin.db.vo.DataSourceConfigCreateReqVO; |
| | | import com.iailab.module.infra.controller.admin.db.vo.DataSourceConfigRespVO; |
| | | import com.iailab.module.infra.controller.admin.db.vo.DataSourceConfigSimpleRespVO; |
| | | import com.iailab.module.infra.controller.admin.db.vo.DataSourceConfigUpdateReqVO; |
| | | import com.iailab.module.infra.dal.dataobject.db.DataSourceConfigDO; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 数据源配置 Convert |
| | | * |
| | | * @author 芋道源码 |
| | | */ |
| | | @Mapper |
| | | public interface DataSourceConfigConvert { |
| | | |
| | | DataSourceConfigConvert INSTANCE = Mappers.getMapper(DataSourceConfigConvert.class); |
| | | |
| | | DataSourceConfigDO convert(DataSourceConfigCreateReqVO bean); |
| | | |
| | | DataSourceConfigDO convert(DataSourceConfigUpdateReqVO bean); |
| | | |
| | | DataSourceConfigRespVO convert(DataSourceConfigDO bean); |
| | | |
| | | List<DataSourceConfigRespVO> convertList(List<DataSourceConfigDO> list); |
| | | |
| | | DataSourceConfigRespDTO convert02(DataSourceConfigDO bean); |
| | | |
| | | List<DataSourceConfigSimpleRespVO> convertList02(List<DataSourceConfigDO> list); |
| | | |
| | | } |
| | |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: jdbc:mysql://172.16.8.100:3306/iailab-plat?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |
| | | url: jdbc:mysql://127.0.0.1:3306/iailab_plat_system?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |
| | | # url: jdbc:mysql://127.0.0.1:3306/iailab-plat?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 |
| | | # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例 |
| | | # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 |
| | |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
| | | import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; |
| | | import com.iailab.framework.tenant.core.db.dynamic.TenantDS; |
| | | import com.iailab.module.system.controller.admin.app.vo.AppPageReqVO; |
| | | import com.iailab.module.system.dal.dataobject.app.AppDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | * @createTime 2024年08月16日 |
| | | */ |
| | | @Mapper |
| | | @TenantDS |
| | | public interface AppMapper extends BaseMapperX<AppDO> { |
| | | |
| | | default PageResult<AppDO> selectPage(AppPageReqVO reqVO) { |
| | |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: jdbc:mysql://127.0.0.1:3306/iailab-plat?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |
| | | url: jdbc:mysql://127.0.0.1:3306/iailab_plat_system?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |
| | | username: root |
| | | password: 123456 |
| | | slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 |
| | | lazy: true # 开启懒加载,保证启动速度 |
| | | url: jdbc:mysql://127.0.0.1:3306/iailab-plat?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |
| | | url: jdbc:mysql://127.0.0.1:3306/iailab_plat_system?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |
| | | username: root |
| | | password: 123456 |
| | | |
| | |
| | | host: 127.0.0.1 # 地址 |
| | | port: 6379 # 端口 |
| | | database: 1 # 数据库索引 |
| | | password: 123456 # 密码,建议生产环境开启 |
| | | #password: 123456 # 密码,建议生产环境开启 |
| | | |
| | | --- #################### MQ 消息队列相关配置 #################### |
| | | |
| | |
| | | |
| | | # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 |
| | | redis: |
| | | host: 172.16.8.100 # 地址 |
| | | host: 127.0.0.1 # 地址 |
| | | port: 6379 # 端口 |
| | | database: 0 # 数据库索引 |
| | | password: 123456 # 密码,建议生产环境开启 |
| | |
| | | <module>iailab-module-report</module> |
| | | <module>iailab-module-data</module> |
| | | <module>iailab-module-model</module> |
| | | <!--<module>iailab-fast</module>--> |
| | | </modules> |
| | | |
| | | <name>${project.artifactId}</name> |
| | |
| | | <nacos.username>nacos</nacos.username> |
| | | <nacos.password>nacos</nacos.password> |
| | | <nacos.metadata.version>1.0.0</nacos.metadata.version> |
| | | <log.path>D:\data</log.path> |
| | | <log.path>E:\DLUT\iailab-plat</log.path> |
| | | <logstash.address>127.0.0.1:4560</logstash.address> |
| | | </properties> |
| | | <activation> |