parent
6bddebafff
commit
3a23ca72e6
@ -0,0 +1,48 @@
|
|||||||
|
package cn.iocoder.mall.managementweb.controller.permission.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.common.framework.validator.InEnum;
|
||||||
|
import cn.iocoder.mall.systemservice.enums.permission.ResourceTypeEnum;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel("资源树节点 VO")
|
||||||
|
@Data
|
||||||
|
public class ResourceTreeNodeVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "资源编号", required = true, example = "1")
|
||||||
|
@NotNull(message = "资源编号不能为空")
|
||||||
|
private Integer id;
|
||||||
|
@ApiModelProperty(value = "菜单名", required = true, example = "商品管理")
|
||||||
|
@NotEmpty(message = "菜单名不能为空")
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty(value = "权限标识", example = "resource:add")
|
||||||
|
private String permission;
|
||||||
|
@ApiModelProperty(value = "资源类型", required = true, example = "1")
|
||||||
|
@NotNull(message = "资源类型不能为空")
|
||||||
|
@InEnum(value = ResourceTypeEnum.class, message = "资源类型必须是 {value}")
|
||||||
|
private Integer type;
|
||||||
|
@ApiModelProperty(value = "排序", required = true, example = "1")
|
||||||
|
@NotNull(message = "排序不能为空")
|
||||||
|
private Integer sort;
|
||||||
|
@ApiModelProperty(value = "父级资源编号", required = true, example = "1", notes = "如果无父资源,则值为 0")
|
||||||
|
@NotNull(message = "父级资源编号不能为空")
|
||||||
|
private Integer pid;
|
||||||
|
@ApiModelProperty(value = "前端路由", example = "/resource/list")
|
||||||
|
private String route;
|
||||||
|
@ApiModelProperty(value = "菜单图标", example = "add")
|
||||||
|
private String icon;
|
||||||
|
@ApiModelProperty(value = "添加时间", required = true)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子节点
|
||||||
|
*/
|
||||||
|
private List<ResourceTreeNodeVO> children;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,28 +0,0 @@
|
|||||||
package cn.iocoder.mall.system.rest.convert.authorization;
|
|
||||||
|
|
||||||
import cn.iocoder.common.framework.vo.PageResult;
|
|
||||||
import cn.iocoder.mall.system.biz.bo.authorization.RoleBO;
|
|
||||||
import cn.iocoder.mall.system.biz.dto.authorization.RoleAddDTO;
|
|
||||||
import cn.iocoder.mall.system.biz.dto.authorization.RolePageDTO;
|
|
||||||
import cn.iocoder.mall.system.biz.dto.authorization.RoleUpdateDTO;
|
|
||||||
import cn.iocoder.mall.system.rest.request.authorization.AdminsRoleAddRequest;
|
|
||||||
import cn.iocoder.mall.system.rest.request.authorization.AdminsRolePageRequest;
|
|
||||||
import cn.iocoder.mall.system.rest.request.authorization.AdminsRoleUpdateRequest;
|
|
||||||
import cn.iocoder.mall.system.rest.response.authorization.AdminsRolePageResponse;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface AdminsRoleConvert {
|
|
||||||
|
|
||||||
AdminsRoleConvert INSTANCE = Mappers.getMapper(AdminsRoleConvert.class);
|
|
||||||
|
|
||||||
RoleAddDTO convert(AdminsRoleAddRequest bean);
|
|
||||||
|
|
||||||
RoleUpdateDTO convert(AdminsRoleUpdateRequest bean);
|
|
||||||
|
|
||||||
RolePageDTO convert(AdminsRolePageRequest bean);
|
|
||||||
|
|
||||||
PageResult<AdminsRolePageResponse> convertPage(PageResult<RoleBO> bean);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package cn.iocoder.mall.system.rest.convert.oauth2;
|
|
||||||
|
|
||||||
import cn.iocoder.mall.system.biz.bo.admin.AdminBO;
|
|
||||||
import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AuthenticateBO;
|
|
||||||
import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2UsernameAuthenticateDTO;
|
|
||||||
import cn.iocoder.mall.system.rest.request.oauth2.AdminsOAuth2UsernameAuthenticateRequest;
|
|
||||||
import cn.iocoder.mall.system.rest.response.oauth2.AdminsOAuth2AuthenticateResponse;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mapping;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface AdminsOAuth2Convert {
|
|
||||||
|
|
||||||
AdminsOAuth2Convert INSTANCE = Mappers.getMapper(AdminsOAuth2Convert.class);
|
|
||||||
|
|
||||||
OAuth2UsernameAuthenticateDTO convert(AdminsOAuth2UsernameAuthenticateRequest bean);
|
|
||||||
|
|
||||||
@Mapping(source = "adminBO", target = "admin")
|
|
||||||
@Mapping(source = "accessTokenBO.accessToken", target = "token.accessToken")
|
|
||||||
@Mapping(source = "accessTokenBO.refreshToken", target = "token.refreshToken")
|
|
||||||
@Mapping(source = "accessTokenBO.expiresTime", target = "token.expiresTime")
|
|
||||||
AdminsOAuth2AuthenticateResponse convert(AdminBO adminBO, OAuth2AuthenticateBO accessTokenBO);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package cn.iocoder.mall.system.rest.convert.oauth2;
|
|
||||||
|
|
||||||
import cn.iocoder.mall.system.biz.bo.user.UserAuthenticateBO;
|
|
||||||
import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2MobileCodeAuthenticateDTO;
|
|
||||||
import cn.iocoder.mall.system.rest.request.oauth2.UsersOAuth2MobileCodeAuthenticateRequest;
|
|
||||||
import cn.iocoder.mall.system.rest.response.user.UsersOAuth2AuthenticateResponse;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface UsersOAuth2Convert {
|
|
||||||
|
|
||||||
UsersOAuth2Convert INSTANCE = Mappers.getMapper(UsersOAuth2Convert.class);
|
|
||||||
|
|
||||||
OAuth2MobileCodeAuthenticateDTO convert(UsersOAuth2MobileCodeAuthenticateRequest bean);
|
|
||||||
|
|
||||||
UsersOAuth2AuthenticateResponse convert(UserAuthenticateBO bean);
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in new issue