refactor:mapstruct plus 引用 dao层结构调整

V0.5.x
regan 2023-05-18 01:02:16 +08:00
parent 5c348d7427
commit c7d290d239
186 changed files with 488 additions and 1051 deletions

View File

@ -1,4 +1,4 @@
package cc.iotkit.common.domain.model;
package cc.iotkit.common.api;
import lombok.Data;
@ -10,7 +10,7 @@ import java.util.Date;
* @author Lion Li
*/
@Data
public class BaseEntity {
public class BaseDto {
/**
*

View File

@ -7,7 +7,7 @@
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.manager.config;
package cc.iotkit.common.config;
import lombok.SneakyThrows;
import org.elasticsearch.common.settings.Settings;

View File

@ -7,7 +7,7 @@
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.manager.config;
package cc.iotkit.common.config;
import redis.embedded.RedisServer;

View File

@ -1,4 +1,4 @@
package cc.iotkit.common.domain.model;
package cc.iotkit.common.undefined;
import cc.iotkit.common.constant.UserConstants;
import jakarta.validation.constraints.NotBlank;

View File

@ -1,10 +1,8 @@
package cc.iotkit.common.domain.model;
package cc.iotkit.common.undefined;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.dromara.common.core.domain.dto.RoleDTO;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
@ -19,7 +17,6 @@ import java.util.Set;
@NoArgsConstructor
public class LoginUser implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**

View File

@ -1,4 +1,4 @@
package cc.iotkit.common.domain.vo;
package cc.iotkit.common.undefined;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cc.iotkit.common.domain.model;
package cc.iotkit.common.undefined;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -0,0 +1,38 @@
package cc.iotkit.common.undefined;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
*
*
* @author Lion Li
*/
@Data
@NoArgsConstructor
public class RoleDTO implements Serializable {
/**
* ID
*/
private Long roleId;
/**
*
*/
private String roleName;
/**
*
*/
private String roleKey;
/**
* 12345
*/
private String dataScope;
}

View File

@ -1,4 +1,4 @@
package cc.iotkit.manager.config;
package cc.iotkit.common.undefined;
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.annotations.Api;

View File

@ -0,0 +1,62 @@
package cc.iotkit.common.undefined;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;
import java.io.Serializable;
/**
* 线
*
* @author ruoyi
*/
@Data
@NoArgsConstructor
public class UserOnlineDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
private String tokenId;
/**
*
*/
private String deptName;
/**
*
*/
private String userName;
/**
* IP
*/
private String ipaddr;
/**
*
*/
private String loginLocation;
/**
*
*/
private String browser;
/**
*
*/
private String os;
/**
*
*/
private Long loginTime;
}

View File

@ -2,6 +2,7 @@ package cc.iotkit.model.system;
import cc.iotkit.model.Id;
import cc.iotkit.model.TenantEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,22 +0,0 @@
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbAlertConfig;
import cc.iotkit.model.alert.AlertConfig;
import java.util.List;
import java.util.stream.Collectors;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
@Mapper
public interface AlertConfigMapper {
AlertConfigMapper M = Mappers.getMapper(AlertConfigMapper.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

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

View File

@ -1,16 +0,0 @@
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbCategory;
import cc.iotkit.model.product.Category;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
@Mapper
public interface CategoryMapper {
CategoryMapper M = Mappers.getMapper(CategoryMapper.class);
Category toDto(TbCategory vo);
TbCategory toVo(Category dto);
}

View File

@ -1,20 +0,0 @@
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbChannelConfig;
import cc.iotkit.model.notify.ChannelConfig;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* @Author:
* @Date: 2023/5/11 21:02
* @Description:
*/
@Mapper
public interface ChannelConfigMapper {
ChannelConfigMapper M = Mappers.getMapper(ChannelConfigMapper.class);
ChannelConfig toDto(TbChannelConfig vo);
TbChannelConfig toVo(ChannelConfig dto);
}

View File

@ -1,21 +0,0 @@
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbChannel;
import cc.iotkit.model.notify.Channel;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* author:
* date: 2023-05-11 18:04
* description:
**/
@Mapper
public interface ChannelMapper {
ChannelMapper M = Mappers.getMapper(ChannelMapper.class);
Channel toDto(TbChannel vo);
TbChannel toVo(Channel dto);
}

View File

@ -1,20 +0,0 @@
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbChannelTemplate;
import cc.iotkit.model.notify.ChannelTemplate;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* @Author:
* @Date: 2023/5/11 21:02
* @Description:
*/
@Mapper
public interface ChannelTemplateMapper {
ChannelTemplateMapper M = Mappers.getMapper(ChannelTemplateMapper.class);
ChannelTemplate toDto(TbChannelTemplate vo);
TbChannelTemplate toVo(ChannelTemplate dto);
}

View File

@ -1,25 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbDeviceConfig;
import cc.iotkit.model.device.DeviceConfig;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
@Mapper
public interface DeviceConfigMapper {
DeviceConfigMapper M = Mappers.getMapper(DeviceConfigMapper.class);
DeviceConfig toDto(TbDeviceConfig vo);
TbDeviceConfig toVo(DeviceConfig dto);
}

View File

@ -1,16 +0,0 @@
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbDeviceGroup;
import cc.iotkit.model.device.DeviceGroup;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
@Mapper
public interface DeviceGroupMapper {
DeviceGroupMapper M = Mappers.getMapper(DeviceGroupMapper.class);
DeviceGroup toDto(TbDeviceGroup vo);
TbDeviceGroup toVo(DeviceGroup dto);
}

View File

@ -1,28 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbDeviceInfo;
import cc.iotkit.model.device.DeviceInfo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
@Mapper
public interface DeviceInfoMapper {
DeviceInfoMapper M = Mappers.getMapper(DeviceInfoMapper.class);
@Mapping(target = "state", ignore = true)
DeviceInfo toDto(TbDeviceInfo vo);
@Mapping(target = "state", ignore = true)
TbDeviceInfo toVo(DeviceInfo dto);
}

View File

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

View File

@ -1,25 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbOauthClient;
import cc.iotkit.model.OauthClient;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
@Mapper
public interface OauthClientMapper {
OauthClientMapper M = Mappers.getMapper(OauthClientMapper.class);
OauthClient toDto(TbOauthClient vo);
TbOauthClient toVo(OauthClient dto);
}

View File

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

View File

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

View File

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

View File

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

View File

@ -1,67 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.common.utils.JsonUtil;
import cc.iotkit.data.model.TbRuleInfo;
import cc.iotkit.model.rule.RuleInfo;
import com.fasterxml.jackson.core.type.TypeReference;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface RuleInfoMapper {
RuleInfoMapper M = Mappers.getMapper(RuleInfoMapper.class);
@Mappings({
@Mapping(target = "listeners", ignore = true),
@Mapping(target = "filters", ignore = true),
@Mapping(target = "actions", ignore = true)
}
)
RuleInfo toDto(TbRuleInfo vo);
@Mappings({
@Mapping(target = "listeners", ignore = true),
@Mapping(target = "filters", ignore = true),
@Mapping(target = "actions", ignore = true)
}
)
TbRuleInfo toVo(RuleInfo dto);
static RuleInfo toDtoFix(TbRuleInfo vo) {
RuleInfo dto = M.toDto(vo);
dto.setListeners(JsonUtil.parse(vo.getListeners(), new TypeReference<>() {
}));
dto.setFilters(JsonUtil.parse(vo.getFilters(), new TypeReference<>() {
}));
dto.setActions(JsonUtil.parse(vo.getActions(), new TypeReference<>() {
}));
return dto;
}
static TbRuleInfo toVoFix(RuleInfo dto) {
TbRuleInfo vo = M.toVo(dto);
vo.setListeners(JsonUtil.toJsonString(dto.getListeners()));
vo.setFilters(JsonUtil.toJsonString(dto.getFilters()));
vo.setActions(JsonUtil.toJsonString(dto.getActions()));
return vo;
}
static List<RuleInfo> toDto(List<TbRuleInfo> list) {
return list.stream().map(RuleInfoMapper::toDtoFix).collect(Collectors.toList());
}
}

View File

@ -1,33 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbSpaceDevice;
import cc.iotkit.model.space.SpaceDevice;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface SpaceDeviceMapper {
SpaceDeviceMapper M = Mappers.getMapper(SpaceDeviceMapper.class);
SpaceDevice toDto(TbSpaceDevice vo);
TbSpaceDevice toVo(SpaceDevice dto);
static List<SpaceDevice> toDto(List<TbSpaceDevice> list) {
return list.stream().map(M::toDto).collect(Collectors.toList());
}
}

View File

@ -1,33 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbSpace;
import cc.iotkit.model.space.Space;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface SpaceMapper {
SpaceMapper M = Mappers.getMapper(SpaceMapper.class);
Space toDto(TbSpace vo);
TbSpace toVo(Space dto);
static List<Space> toDto(List<TbSpace> list) {
return list.stream().map(M::toDto).collect(Collectors.toList());
}
}

View File

@ -1,51 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.common.utils.JsonUtil;
import cc.iotkit.data.model.TbTaskInfo;
import cc.iotkit.model.rule.TaskInfo;
import com.fasterxml.jackson.core.type.TypeReference;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface TaskInfoMapper {
TaskInfoMapper M = Mappers.getMapper(TaskInfoMapper.class);
@Mapping(target = "actions", ignore = true)
TaskInfo toDto(TbTaskInfo vo);
static TaskInfo toDtoFix(TbTaskInfo vo) {
TaskInfo dto = M.toDto(vo);
dto.setActions(JsonUtil.parse(vo.getActions(), new TypeReference<>() {
}));
return dto;
}
@Mapping(target = "actions", ignore = true)
TbTaskInfo toVo(TaskInfo dto);
static TbTaskInfo toVoFix(TaskInfo dto) {
TbTaskInfo vo = M.toVo(dto);
vo.setActions(JsonUtil.toJsonString(dto.getActions()));
return vo;
}
static List<TaskInfo> toDto(List<TbTaskInfo> list) {
return list.stream().map(TaskInfoMapper::toDtoFix).collect(Collectors.toList());
}
}

View File

@ -1,55 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.common.utils.JsonUtil;
import cc.iotkit.data.model.TbThingModel;
import cc.iotkit.model.product.ThingModel;
import org.apache.commons.lang3.StringUtils;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface ThingModelMapper {
ThingModelMapper M = Mappers.getMapper(ThingModelMapper.class);
@Mapping(target = "model", ignore = true)
ThingModel toDto(TbThingModel vo);
static ThingModel toDtoFix(TbThingModel vo) {
if (vo == null) {
return null;
}
ThingModel dto = M.toDto(vo);
if (StringUtils.isNotBlank(vo.getModel())) {
dto.setModel(JsonUtil.parse(vo.getModel(), ThingModel.Model.class));
}
return dto;
}
@Mapping(target = "model", ignore = true)
TbThingModel toVo(ThingModel dto);
static TbThingModel toVoFix(ThingModel dto) {
TbThingModel vo = M.toVo(dto);
vo.setModel(JsonUtil.toJsonString(dto.getModel()));
return vo;
}
static List<ThingModel> toDto(List<TbThingModel> list) {
return list.stream().map(ThingModelMapper::toDtoFix).collect(Collectors.toList());
}
}

View File

@ -1,80 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbUserInfo;
import cc.iotkit.model.UserInfo;
import org.apache.commons.lang3.StringUtils;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface UserInfoMapper {
UserInfoMapper M = Mappers.getMapper(UserInfoMapper.class);
@Mappings({
@Mapping(target = "roles", ignore = true),
@Mapping(target = "permissions", ignore = true),
@Mapping(target = "usePlatforms", ignore = true)
}
)
UserInfo toDto(TbUserInfo vo);
static UserInfo toDtoFix(TbUserInfo vo) {
UserInfo dto = M.toDto(vo);
dto.setRoles(splitToList(vo.getRoles()));
dto.setPermissions(splitToList(vo.getPermissions()));
dto.setUsePlatforms(splitToList(vo.getUsePlatforms()));
return dto;
}
@Mappings({
@Mapping(target = "roles", ignore = true),
@Mapping(target = "permissions", ignore = true),
@Mapping(target = "usePlatforms", ignore = true)
}
)
TbUserInfo toVo(UserInfo dto);
static TbUserInfo toVoFix(UserInfo dto) {
TbUserInfo vo = M.toVo(dto);
vo.setRoles(listToStr(dto.getRoles()));
vo.setPermissions(listToStr(dto.getPermissions()));
vo.setUsePlatforms(listToStr(dto.getUsePlatforms()));
return vo;
}
static List<UserInfo> toDto(List<TbUserInfo> list) {
return list.stream().map(UserInfoMapper::toDtoFix).collect(Collectors.toList());
}
static List<String> splitToList(String str) {
if (StringUtils.isBlank(str)) {
return new ArrayList<>();
}
return Arrays.asList(str.split(","));
}
static String listToStr(List<String> list) {
if (list == null || list.size() == 0) {
return "";
}
return String.join(",", list);
}
}

View File

@ -1,35 +0,0 @@
/*
* +----------------------------------------------------------------------
* | Copyright (c) 2021-2022 All rights reserved.
* +----------------------------------------------------------------------
* | Licensed
* +----------------------------------------------------------------------
* | Author: xw2sy@163.com
* +----------------------------------------------------------------------
*/
package cc.iotkit.data.convert;
import cc.iotkit.data.model.TbVirtualDevice;
import cc.iotkit.model.device.VirtualDevice;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;
import java.util.stream.Collectors;
@Mapper
public interface VirtualDeviceMapper {
VirtualDeviceMapper M = Mappers.getMapper(VirtualDeviceMapper.class);
@Mapping(target = "devices", ignore = true)
VirtualDevice toDto(TbVirtualDevice vo);
TbVirtualDevice toVo(VirtualDevice dto);
static List<VirtualDevice> toDto(List<TbVirtualDevice> list) {
return list.stream().map(VirtualDeviceMapper.M::toDto).collect(Collectors.toList());
}
}

View File

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

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysConfig;
import cc.iotkit.data.model.TbSysConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysDept;
import cc.iotkit.data.model.TbSysDept;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysDictData;
import cc.iotkit.data.model.TbSysDictData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysDictType;
import cc.iotkit.data.model.TbSysDictType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysLogininfor;
import cc.iotkit.data.model.TbSysLogininfor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysMenu;
import cc.iotkit.data.model.TbSysMenu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysNotice;
import cc.iotkit.data.model.TbSysNotice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysOperLog;
import cc.iotkit.data.model.TbSysOperLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysOssConfig;
import cc.iotkit.data.model.TbSysOssConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysOss;
import cc.iotkit.data.model.TbSysOss;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysPost;
import cc.iotkit.data.model.TbSysPost;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysRole;
import cc.iotkit.data.model.TbSysRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysTenantPackage;
import cc.iotkit.data.model.TbSysTenantPackage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysDept;
import cc.iotkit.data.model.TbSysDept;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysUserPost;
import cc.iotkit.data.model.TbSysUserPost;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,8 +9,8 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysDept;
import cc.iotkit.data.model.system.TbSysUser;
import cc.iotkit.data.model.TbSysDept;
import cc.iotkit.data.model.TbSysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -9,7 +9,7 @@
*/
package cc.iotkit.data.dao.system;
import cc.iotkit.data.model.system.TbSysUserRole;
import cc.iotkit.data.model.TbSysUserRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

View File

@ -1,4 +1,4 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import lombok.Data;
import org.springframework.data.annotation.CreatedBy;

View File

@ -1,5 +1,8 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import cc.iotkit.model.system.SysConfig;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -17,6 +20,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "sys_config")
@AutoMapper(target = SysConfig.class)
public class TbSysConfig extends BaseEntity {
/**

View File

@ -1,5 +1,9 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import cc.iotkit.model.system.SysConfig;
import cc.iotkit.model.system.SysDept;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -17,6 +21,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "sys_dept")
@AutoMapper(target = SysDept.class)
public class TbSysDept extends BaseEntity {
private static final long serialVersionUID = 1L;

View File

@ -1,5 +1,7 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.model.system.SysDictData;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -16,6 +18,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "sys_dict_data")
@AutoMapper(target = SysDictData.class)
public class TbSysDictData extends BaseEntity {
/**

View File

@ -1,5 +1,9 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import cc.iotkit.model.system.SysDictData;
import cc.iotkit.model.system.SysDictType;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -17,6 +21,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "sys_dict_type")
@AutoMapper(target = SysDictType.class)
public class TbSysDictType extends BaseEntity {
/**

View File

@ -1,11 +1,14 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import cc.iotkit.model.system.SysDictData;
import cc.iotkit.model.system.SysLogininfor;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
@ -17,6 +20,7 @@ import java.util.Date;
@Data
@Entity
@Table(name = "sys_logininfor")
@AutoMapper(target = SysLogininfor.class)
public class TbSysLogininfor extends BaseEntity {
/**
* ID

View File

@ -1,6 +1,9 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.common.domain.model.BaseEntity;
import cc.iotkit.data.model.BaseEntity;
import cc.iotkit.model.system.SysDictData;
import cc.iotkit.model.system.SysMenu;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -18,6 +21,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "sys_menu")
@AutoMapper(target = SysMenu.class)
public class TbSysMenu extends BaseEntity {
/**

View File

@ -1,5 +1,9 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import cc.iotkit.model.system.SysLogininfor;
import cc.iotkit.model.system.SysNotice;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -16,6 +20,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "sys_notice")
@AutoMapper(target = SysNotice.class)
public class TbSysNotice extends BaseEntity {
/**

View File

@ -1,5 +1,8 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.model.system.SysLogininfor;
import cc.iotkit.model.system.SysOperLog;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import javax.persistence.Entity;
@ -16,6 +19,7 @@ import java.util.Date;
@Data
@Entity
@Table(name = "oper_log")
@AutoMapper(target = SysOperLog.class)
public class TbSysOperLog implements Serializable {
private static final long serialVersionUID = 1L;

View File

@ -1,5 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,5 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,5 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,5 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

View File

@ -1,6 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.common.domain.model.BaseEntity;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,6 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.common.domain.model.BaseEntity;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,5 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

View File

@ -1,5 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import javax.persistence.Entity;

View File

@ -1,5 +1,6 @@
package cc.iotkit.data.model.system;
package cc.iotkit.data.model;
import cc.iotkit.data.model.BaseEntity;
import lombok.Data;
import javax.persistence.Entity;

View File

@ -1,10 +1,13 @@
package cc.iotkit.data.service.system;
package cc.iotkit.data.service;
import cc.iotkit.data.dao.system.SysConfigRepository;
import cc.iotkit.data.model.TbSysConfig;
import cc.iotkit.data.system.ISysConfigData;
import cc.iotkit.model.Paging;
import cc.iotkit.model.system.SysConfig;
import java.util.List;
import io.github.linpeilie.Converter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
@ -16,10 +19,14 @@ public class SysConfigDataImpl implements ISysConfigData {
@Autowired
private SysConfigRepository alertConfigRepository;
@Autowired
private Converter converter;
@Override
public SysConfig findById(Long aLong) {
return null;
public SysConfig findById(Long id) {
TbSysConfig tbSysConfig = alertConfigRepository.findById(id).orElseThrow();
return converter.convert(tbSysConfig,SysConfig.class);
}
@Override
@ -33,7 +40,7 @@ public class SysConfigDataImpl implements ISysConfigData {
}
@Override
public void deleteById(Long aLong) {
public void deleteById(Long id) {
}

View File

@ -40,7 +40,7 @@
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-common-security</artifactId>
<artifactId>iot-common-satoken</artifactId>
</dependency>
</dependencies>

View File

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>iot-common-security</artifactId>
<artifactId>iot-common-satoken</artifactId>
<dependencies>

View File

@ -1,6 +1,6 @@
package cc.iotkit.common.satoken.core.service;
import cc.iotkit.common.domain.model.LoginUser;
import cc.iotkit.common.undefined.LoginUser;
import cc.iotkit.common.enums.UserType;
import cc.iotkit.common.satoken.utils.LoginHelper;
import cn.dev33.satoken.stp.StpInterface;

View File

@ -1,5 +1,13 @@
package cc.iotkit.common.satoken.listener;
import cc.iotkit.common.constant.CacheConstants;
import cc.iotkit.common.enums.UserType;
import cc.iotkit.common.redis.utils.RedisUtils;
import cc.iotkit.common.satoken.utils.LoginHelper;
import cc.iotkit.common.undefined.LoginUser;
import cc.iotkit.common.undefined.UserOnlineDTO;
import cc.iotkit.common.utils.ServletUtils;
import cc.iotkit.common.utils.ip.AddressUtils;
import cn.dev33.satoken.config.SaTokenConfig;
import cn.dev33.satoken.listener.SaTokenListener;
import cn.dev33.satoken.stp.SaLoginModel;
@ -7,14 +15,6 @@ import cn.hutool.http.useragent.UserAgent;
import cn.hutool.http.useragent.UserAgentUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.constant.CacheConstants;
import org.dromara.common.core.domain.dto.UserOnlineDTO;
import org.dromara.common.core.domain.model.LoginUser;
import org.dromara.common.core.enums.UserType;
import org.dromara.common.core.utils.ServletUtils;
import org.dromara.common.core.utils.ip.AddressUtils;
import org.dromara.common.redis.utils.RedisUtils;
import org.dromara.common.satoken.utils.LoginHelper;
import org.springframework.stereotype.Component;
import java.time.Duration;

View File

@ -2,7 +2,7 @@ package cc.iotkit.common.satoken.utils;
import cc.iotkit.common.constant.TenantConstants;
import cc.iotkit.common.constant.UserConstants;
import cc.iotkit.common.domain.model.LoginUser;
import cc.iotkit.common.undefined.LoginUser;
import cc.iotkit.common.enums.DeviceType;
import cc.iotkit.common.enums.UserType;
import cn.dev33.satoken.context.SaHolder;

View File

@ -1,6 +1,6 @@
package cc.iotkit.common.tenant.core;
import cc.iotkit.common.domain.model.BaseEntity;
import cc.iotkit.common.api.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class TenantEntity extends BaseEntity {
public class TenantDto extends BaseDto {
/**
*

View File

@ -10,8 +10,8 @@
package cc.iotkit.common.web.handler;
import cc.iotkit.common.api.Response;
import cc.iotkit.common.web.handler.GlobalExceptionHandler;
import cn.dev33.satoken.util.SaResult;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
@ -22,7 +22,6 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
@ControllerAdvice

View File

@ -27,7 +27,7 @@
<module>iot-common-log</module>
<module>iot-common-oss</module>
<module>iot-common-redis</module>
<module>iot-common-security</module>
<module>iot-common-satoken</module>
<module>iot-common-tenant</module>
<module>iot-common-web</module>
<module>iot-common-websocket</module>

View File

@ -25,7 +25,7 @@
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-common-security</artifactId>
<artifactId>iot-common-satoken</artifactId>
</dependency>
<dependency>

View File

@ -1,13 +1,13 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysConfigBo;
import cc.iotkit.system.domain.vo.SysConfigVo;
import cc.iotkit.system.dto.bo.SysConfigBo;
import cc.iotkit.system.dto.vo.SysConfigVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cc.iotkit.system.service.ISysConfigService;
import jakarta.servlet.http.HttpServletResponse;
@ -35,8 +35,8 @@ public class SysConfigController extends BaseController {
*/
@SaCheckPermission("system:config:list")
@PostMapping("/list")
public PagedDataVo<SysConfigVo> list(@RequestBody @Validated SysConfigBo config, PageRequest<?> query) {
return configService.selectPageConfigList(config, query);
public PagedDataVo<SysConfigVo> list(@RequestBody @Validated PageRequest<SysConfigBo> query) {
return configService.selectPageConfigList(query);
}
/**

View File

@ -5,8 +5,8 @@ import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.utils.StringUtils;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysDeptBo;
import cc.iotkit.system.domain.vo.SysDeptVo;
import cc.iotkit.system.dto.bo.SysDeptBo;
import cc.iotkit.system.dto.vo.SysDeptVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.convert.Convert;
import cc.iotkit.system.service.ISysDeptService;

View File

@ -1,12 +1,12 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.system.domain.bo.SysDictDataBo;
import cc.iotkit.system.domain.vo.SysDictDataVo;
import cc.iotkit.system.dto.bo.SysDictDataBo;
import cc.iotkit.system.dto.vo.SysDictDataVo;
import cc.iotkit.system.service.ISysDictDataService;
import cc.iotkit.system.service.ISysDictTypeService;
import cn.dev33.satoken.annotation.SaCheckPermission;

View File

@ -1,13 +1,13 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysDictTypeBo;
import cc.iotkit.system.domain.vo.SysDictTypeVo;
import cc.iotkit.system.dto.bo.SysDictTypeBo;
import cc.iotkit.system.dto.vo.SysDictTypeVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cc.iotkit.system.service.ISysDictTypeService;
import jakarta.servlet.http.HttpServletResponse;

View File

@ -2,17 +2,16 @@ package cc.iotkit.system.controller;
import cc.iotkit.common.constant.TenantConstants;
import cc.iotkit.common.constant.UserConstants;
import cc.iotkit.common.exception.BizException;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.satoken.utils.LoginHelper;
import cc.iotkit.common.utils.StringUtils;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.SysMenu;
import cc.iotkit.system.domain.bo.SysMenuBo;
import cc.iotkit.system.domain.vo.MenuTreeSelectVo;
import cc.iotkit.system.domain.vo.RouterVo;
import cc.iotkit.system.domain.vo.SysMenuVo;
import cc.iotkit.system.dto.SysMenu;
import cc.iotkit.system.dto.bo.SysMenuBo;
import cc.iotkit.system.dto.vo.MenuTreeSelectVo;
import cc.iotkit.system.dto.vo.RouterVo;
import cc.iotkit.system.dto.vo.SysMenuVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole;
import cn.dev33.satoken.annotation.SaMode;

View File

@ -1,12 +1,12 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysNoticeBo;
import cc.iotkit.system.domain.vo.SysNoticeVo;
import cc.iotkit.system.dto.bo.SysNoticeBo;
import cc.iotkit.system.dto.vo.SysNoticeVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cc.iotkit.system.service.ISysNoticeService;
import lombok.RequiredArgsConstructor;

View File

@ -1,15 +1,15 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.validate.AddGroup;
import cc.iotkit.common.validate.EditGroup;
import cc.iotkit.common.validate.QueryGroup;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysOssConfigBo;
import cc.iotkit.system.domain.vo.SysOssConfigVo;
import cc.iotkit.system.dto.bo.SysOssConfigBo;
import cc.iotkit.system.dto.vo.SysOssConfigVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cc.iotkit.system.service.ISysOssConfigService;
import jakarta.validation.constraints.NotEmpty;

View File

@ -2,14 +2,14 @@ package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.validate.QueryGroup;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysOssBo;
import cc.iotkit.system.domain.vo.SysOssUploadVo;
import cc.iotkit.system.domain.vo.SysOssVo;
import cc.iotkit.system.dto.bo.SysOssBo;
import cc.iotkit.system.dto.vo.SysOssUploadVo;
import cc.iotkit.system.dto.vo.SysOssVo;
import cc.iotkit.system.service.ISysOssService;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;

View File

@ -1,13 +1,13 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysPostBo;
import cc.iotkit.system.domain.vo.SysPostVo;
import cc.iotkit.system.dto.bo.SysPostBo;
import cc.iotkit.system.dto.vo.SysPostVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cc.iotkit.system.service.ISysPostService;
import jakarta.servlet.http.HttpServletResponse;

View File

@ -6,12 +6,12 @@ import cc.iotkit.common.satoken.utils.LoginHelper;
import cc.iotkit.common.utils.StringUtils;
import cc.iotkit.common.utils.file.MimeTypeUtils;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysUserBo;
import cc.iotkit.system.domain.bo.SysUserProfileBo;
import cc.iotkit.system.domain.vo.AvatarVo;
import cc.iotkit.system.domain.vo.ProfileVo;
import cc.iotkit.system.domain.vo.SysOssVo;
import cc.iotkit.system.domain.vo.SysUserVo;
import cc.iotkit.system.dto.bo.SysUserBo;
import cc.iotkit.system.dto.bo.SysUserProfileBo;
import cc.iotkit.system.dto.vo.AvatarVo;
import cc.iotkit.system.dto.vo.ProfileVo;
import cc.iotkit.system.dto.vo.SysOssVo;
import cc.iotkit.system.dto.vo.SysUserVo;
import cn.dev33.satoken.secure.BCrypt;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.io.FileUtil;

View File

@ -1,18 +1,18 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.SysUserRole;
import cc.iotkit.system.domain.bo.SysDeptBo;
import cc.iotkit.system.domain.bo.SysRoleBo;
import cc.iotkit.system.domain.bo.SysUserBo;
import cc.iotkit.system.domain.vo.DeptTreeSelectVo;
import cc.iotkit.system.domain.vo.SysRoleVo;
import cc.iotkit.system.domain.vo.SysUserVo;
import cc.iotkit.system.dto.SysUserRole;
import cc.iotkit.system.dto.bo.SysDeptBo;
import cc.iotkit.system.dto.bo.SysRoleBo;
import cc.iotkit.system.dto.bo.SysUserBo;
import cc.iotkit.system.dto.vo.DeptTreeSelectVo;
import cc.iotkit.system.dto.vo.SysRoleVo;
import cc.iotkit.system.dto.vo.SysUserVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cc.iotkit.system.service.ISysDeptService;
import cc.iotkit.system.service.ISysRoleService;

View File

@ -2,7 +2,7 @@ package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.constant.TenantConstants;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
@ -10,8 +10,8 @@ import cc.iotkit.common.tenant.helper.TenantHelper;
import cc.iotkit.common.validate.AddGroup;
import cc.iotkit.common.validate.EditGroup;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysTenantBo;
import cc.iotkit.system.domain.vo.SysTenantVo;
import cc.iotkit.system.dto.bo.SysTenantBo;
import cc.iotkit.system.dto.vo.SysTenantVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole;
import com.baomidou.lock.annotation.Lock4j;

View File

@ -2,15 +2,15 @@ package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.constant.TenantConstants;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
import cc.iotkit.common.log.enums.BusinessType;
import cc.iotkit.common.validate.AddGroup;
import cc.iotkit.common.validate.EditGroup;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysTenantPackageBo;
import cc.iotkit.system.domain.vo.SysTenantPackageVo;
import cc.iotkit.system.dto.bo.SysTenantPackageBo;
import cc.iotkit.system.dto.vo.SysTenantPackageVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole;
import cc.iotkit.system.service.ISysTenantPackageService;

View File

@ -1,8 +1,8 @@
package cc.iotkit.system.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.domain.model.LoginUser;
import cc.iotkit.common.domain.vo.PagedDataVo;
import cc.iotkit.common.undefined.LoginUser;
import cc.iotkit.common.undefined.PagedDataVo;
import cc.iotkit.common.excel.core.ExcelResult;
import cc.iotkit.common.excel.utils.ExcelUtil;
import cc.iotkit.common.log.annotation.Log;
@ -13,9 +13,9 @@ import cc.iotkit.common.utils.MapstructUtils;
import cc.iotkit.common.utils.StreamUtils;
import cc.iotkit.common.utils.StringUtils;
import cc.iotkit.common.web.core.BaseController;
import cc.iotkit.system.domain.bo.SysDeptBo;
import cc.iotkit.system.domain.bo.SysUserBo;
import cc.iotkit.system.domain.vo.*;
import cc.iotkit.system.dto.bo.SysDeptBo;
import cc.iotkit.system.dto.bo.SysUserBo;
import cc.iotkit.system.dto.vo.*;
import cc.iotkit.system.service.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.secure.BCrypt;

View File

@ -1,4 +1,4 @@
package cc.iotkit.system.domain;
package cc.iotkit.system.dto;
import cc.iotkit.common.utils.StringUtils;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cc.iotkit.system.domain;
package cc.iotkit.system.dto;
import lombok.Data;

Some files were not shown because too many files have changed in this diff Show More