删除 provider convert.
This commit is contained in:
@@ -27,9 +27,16 @@ public class GenTable {
|
|||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求实体包名
|
* 业务实体包名
|
||||||
|
* <p>
|
||||||
|
* request dto 包
|
||||||
*/
|
*/
|
||||||
private String requestPackage;
|
private String bizPackage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否生成 provider api
|
||||||
|
*/
|
||||||
|
private boolean genApi;
|
||||||
|
|
||||||
// -------------------- 前端 --------------------
|
// -------------------- 前端 --------------------
|
||||||
|
|
||||||
@@ -53,13 +60,28 @@ public class GenTable {
|
|||||||
*/
|
*/
|
||||||
private List<Class<? extends Enum<?>>> enums;
|
private List<Class<? extends Enum<?>>> enums;
|
||||||
|
|
||||||
public GenTable(String tableName, String comment, String requestPackage) {
|
public GenTable(String tableName, String comment, String bizPackage) {
|
||||||
|
this(tableName, comment, bizPackage, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GenTable(String tableName, String comment, String bizPackage, boolean genApi) {
|
||||||
this.tableName = tableName;
|
this.tableName = tableName;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.requestPackage = requestPackage;
|
this.bizPackage = bizPackage;
|
||||||
|
this.genApi = genApi;
|
||||||
this.enums = new ArrayList<>();
|
this.enums = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否生成 api
|
||||||
|
*
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GenTable api() {
|
||||||
|
this.genApi = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成 vue 模板
|
* 生成 vue 模板
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
package com.orion.ops.module.infra.entity.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 菜单 业务对象
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023-7-18 10:18
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Schema(name = "SystemMenuDTO", description = "菜单 业务对象")
|
|
||||||
public class SystemMenuDTO implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "父id")
|
|
||||||
private Long parentId;
|
|
||||||
|
|
||||||
@Schema(description = "菜单名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "菜单权限")
|
|
||||||
private String permission;
|
|
||||||
|
|
||||||
@Schema(description = "菜单类型 1父菜单 2子菜单 3功能")
|
|
||||||
private Integer type;
|
|
||||||
|
|
||||||
@Schema(description = "排序")
|
|
||||||
private Integer sort;
|
|
||||||
|
|
||||||
@Schema(description = "是否可见 0不可见 1可见")
|
|
||||||
private Integer visible;
|
|
||||||
|
|
||||||
@Schema(description = "菜单状态 0停用 1启用")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Schema(description = "菜单缓存 0不缓存 1缓存")
|
|
||||||
private Integer cache;
|
|
||||||
|
|
||||||
@Schema(description = "菜单图标")
|
|
||||||
private String icon;
|
|
||||||
|
|
||||||
@Schema(description = "链接地址")
|
|
||||||
private String path;
|
|
||||||
|
|
||||||
@Schema(description = "组件名称")
|
|
||||||
private String component;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
@Schema(description = "修改时间")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
@Schema(description = "创建人")
|
|
||||||
private String creator;
|
|
||||||
|
|
||||||
@Schema(description = "修改人")
|
|
||||||
private String updater;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
package com.orion.ops.module.infra.entity.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 角色 业务对象
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023-7-16 01:19
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Schema(name = "SystemRoleDTO", description = "角色 业务对象")
|
|
||||||
public class SystemRoleDTO implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "角色名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "角色编码")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
@Schema(description = "状态 0停用 1启用")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
@Schema(description = "修改时间")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
@Schema(description = "创建人")
|
|
||||||
private String creator;
|
|
||||||
|
|
||||||
@Schema(description = "修改人")
|
|
||||||
private String updater;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
package com.orion.ops.module.infra.entity.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户 业务对象
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023-7-13 18:42
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Schema(name = "SystemUserDTO", description = "用户 业务对象")
|
|
||||||
public class SystemUserDTO implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "用户名")
|
|
||||||
private String username;
|
|
||||||
|
|
||||||
@Schema(description = "密码")
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
@Schema(description = "花名")
|
|
||||||
private String nickname;
|
|
||||||
|
|
||||||
@Schema(description = "头像地址")
|
|
||||||
private String avatar;
|
|
||||||
|
|
||||||
@Schema(description = "手机号")
|
|
||||||
private String mobile;
|
|
||||||
|
|
||||||
@Schema(description = "邮箱")
|
|
||||||
private String email;
|
|
||||||
|
|
||||||
@Schema(description = "用户状态 0停用 1启用 2锁定")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Schema(description = "最后登录时间")
|
|
||||||
private Date lastLoginTime;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
@Schema(description = "修改时间")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
@Schema(description = "创建人")
|
|
||||||
private String creator;
|
|
||||||
|
|
||||||
@Schema(description = "修改人")
|
|
||||||
private String updater;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package com.orion.ops.module.infra.convert;
|
|
||||||
|
|
||||||
import com.orion.ops.module.infra.entity.domain.SystemMenuDO;
|
|
||||||
import com.orion.ops.module.infra.entity.dto.SystemMenuDTO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 菜单 暴露服务转换器
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023-7-17 11:39
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SystemMenuProviderConvert {
|
|
||||||
|
|
||||||
SystemMenuProviderConvert MAPPER = Mappers.getMapper(SystemMenuProviderConvert.class);
|
|
||||||
|
|
||||||
SystemMenuDO to(SystemMenuDTO dto);
|
|
||||||
|
|
||||||
SystemMenuDTO to(SystemMenuDO domain);
|
|
||||||
|
|
||||||
List<SystemMenuDO> toDO(List<SystemMenuDTO> list);
|
|
||||||
|
|
||||||
List<SystemMenuDTO> toDTO(List<SystemMenuDO> list);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
package com.orion.ops.module.infra.convert;
|
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
import com.orion.ops.module.infra.entity.domain.*;
|
|
||||||
import com.orion.ops.module.infra.entity.vo.*;
|
|
||||||
import com.orion.ops.module.infra.entity.dto.*;
|
|
||||||
import com.orion.ops.module.infra.entity.request.*;
|
|
||||||
import com.orion.ops.module.infra.convert.*;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 角色 暴露服务转换器
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023-7-16 01:19
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SystemRoleProviderConvert {
|
|
||||||
|
|
||||||
SystemRoleProviderConvert MAPPER = Mappers.getMapper(SystemRoleProviderConvert.class);
|
|
||||||
|
|
||||||
SystemRoleDO to(SystemRoleDTO dto);
|
|
||||||
|
|
||||||
SystemRoleDTO to(SystemRoleDO domain);
|
|
||||||
|
|
||||||
List<SystemRoleDO> toDO(List<SystemRoleDTO> list);
|
|
||||||
|
|
||||||
List<SystemRoleDTO> toDTO(List<SystemRoleDO> list);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
package com.orion.ops.module.infra.convert;
|
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
import com.orion.ops.module.infra.entity.domain.*;
|
|
||||||
import com.orion.ops.module.infra.entity.vo.*;
|
|
||||||
import com.orion.ops.module.infra.entity.dto.*;
|
|
||||||
import com.orion.ops.module.infra.entity.request.*;
|
|
||||||
import com.orion.ops.module.infra.convert.*;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户 暴露服务转换器
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023-7-13 18:42
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SystemUserProviderConvert {
|
|
||||||
|
|
||||||
SystemUserProviderConvert MAPPER = Mappers.getMapper(SystemUserProviderConvert.class);
|
|
||||||
|
|
||||||
SystemUserDO to(SystemUserDTO dto);
|
|
||||||
|
|
||||||
SystemUserDTO to(SystemUserDO domain);
|
|
||||||
|
|
||||||
List<SystemUserDO> toDO(List<SystemUserDTO> list);
|
|
||||||
|
|
||||||
List<SystemUserDTO> toDTO(List<SystemUserDO> list);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -209,7 +209,7 @@ public class SystemMenuServiceImpl implements SystemMenuService {
|
|||||||
s.setVisible(visible);
|
s.setVisible(visible);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
log.info("SystemMenuService-updateSystemMenuStatus updateIdList: {}, effect: {}", JSON.toJSONString(updateIdList), effect);
|
log.info("SystemMenuService-updateSystemMenuStatus updateIdList: {}, effect: {}", updateIdList, effect);
|
||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ public class SystemMenuServiceImpl implements SystemMenuService {
|
|||||||
permissionService.getRoleMenuCache()
|
permissionService.getRoleMenuCache()
|
||||||
.values()
|
.values()
|
||||||
.forEach(roleMenus -> roleMenus.removeIf(s -> deletedIdList.contains(s.getId())));
|
.forEach(roleMenus -> roleMenus.removeIf(s -> deletedIdList.contains(s.getId())));
|
||||||
log.info("SystemMenuService-deleteSystemMenu deletedIdList: {}, effect: {}", JSON.toJSONString(deletedIdList), effect);
|
log.info("SystemMenuService-deleteSystemMenu deletedIdList: {}, effect: {}", deletedIdList, effect);
|
||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user