feat: 全量提交
This commit is contained in:
commit
de9157143a
128 files changed
+7493
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package com.youlai.system.converter;
|
||||
|
||||
import com.youlai.system.pojo.entity.SysDept;
|
||||
import com.youlai.system.pojo.form.DeptForm;
|
||||
import com.youlai.system.pojo.vo.dept.DeptVO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* 部门对象转换器
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/7/29
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface DeptConverter {
|
||||
|
||||
DeptForm entity2Form(SysDept entity);
|
||||
DeptVO entity2Vo(SysDept entity);
|
||||
|
||||
SysDept form2Entity(DeptForm deptForm);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.youlai.system.converter;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.youlai.system.pojo.entity.SysDictItem;
|
||||
import com.youlai.system.pojo.form.DictItemForm;
|
||||
import com.youlai.system.pojo.vo.dict.DictItemPageVO;
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* 字典数据项对象转换器
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/6/8
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface DictItemConverter {
|
||||
|
||||
Page<DictItemPageVO> entity2Page(Page<SysDictItem> page);
|
||||
|
||||
DictItemForm entity2Form(SysDictItem entity);
|
||||
|
||||
@InheritInverseConfiguration(name="entity2Form")
|
||||
SysDictItem form2Entity(DictItemForm entity);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.youlai.system.converter;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.youlai.system.pojo.entity.SysDictType;
|
||||
import com.youlai.system.pojo.form.DictTypeForm;
|
||||
import com.youlai.system.pojo.vo.dict.DictTypePageVO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* 字典类型对象转换器
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/6/8
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface DictTypeConverter {
|
||||
|
||||
Page<DictTypePageVO> entity2Page(Page<SysDictType> page);
|
||||
|
||||
DictTypeForm entity2Form(SysDictType entity);
|
||||
|
||||
SysDictType form2Entity(DictTypeForm entity);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.youlai.system.converter;
|
||||
|
||||
import com.youlai.system.pojo.entity.SysMenu;
|
||||
import com.youlai.system.pojo.po.RoutePO;
|
||||
import com.youlai.system.pojo.vo.menu.MenuVO;
|
||||
import com.youlai.system.pojo.vo.menu.RouteVO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 菜单对象转换器
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/7/29
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface MenuConverter {
|
||||
|
||||
MenuVO entity2VO(SysMenu entity);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.youlai.system.converter;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.youlai.system.common.model.Option;
|
||||
import com.youlai.system.pojo.entity.SysRole;
|
||||
import com.youlai.system.pojo.form.RoleForm;
|
||||
import com.youlai.system.pojo.vo.role.RolePageVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色对象转换器
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/5/29
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface RoleConverter {
|
||||
|
||||
Page<RolePageVO> entity2Page(Page<SysRole> page);
|
||||
|
||||
@Mappings({
|
||||
@Mapping(target = "value", source = "id"),
|
||||
@Mapping(target = "label", source = "name")
|
||||
})
|
||||
Option role2Option(SysRole role);
|
||||
|
||||
|
||||
List<Option> roles2Options(List<SysRole> roles);
|
||||
|
||||
SysRole form2Entity(RoleForm roleForm);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.youlai.system.converter;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.youlai.system.pojo.entity.SysUser;
|
||||
import com.youlai.system.pojo.form.UserForm;
|
||||
import com.youlai.system.pojo.po.UserFormPO;
|
||||
import com.youlai.system.pojo.po.UserPO;
|
||||
import com.youlai.system.pojo.vo.user.UserLoginVO;
|
||||
import com.youlai.system.pojo.vo.user.UserVO;
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
|
||||
/**
|
||||
* 用户对象转换器
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/6/8
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface UserConverter {
|
||||
|
||||
@Mappings({
|
||||
@Mapping(target = "genderLabel", expression = "java(com.youlai.system.common.base.IBaseEnum.getLabelByValue(po.getGender(), com.youlai.system.common.enums.GenderEnum.class))")
|
||||
})
|
||||
UserVO po2Vo(UserPO po);
|
||||
|
||||
Page<UserVO> po2Vo(Page<UserPO> po);
|
||||
|
||||
UserForm po2Form(UserFormPO po);
|
||||
|
||||
UserForm entity2Form(SysUser entity);
|
||||
|
||||
@InheritInverseConfiguration(name = "entity2Form")
|
||||
SysUser form2Entity(UserForm entity);
|
||||
|
||||
@Mappings({
|
||||
@Mapping(target = "userId", source = "id")
|
||||
})
|
||||
UserLoginVO entity2LoginUser(SysUser entity);
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user