mirror of https://gitee.com/stylefeng/roses
【HrPosition】【SysMenuButton】dto位置调整
parent
905c641248
commit
0770d68a51
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.roses.kernel.system.pojo.organization;
|
||||
package cn.stylefeng.roses.kernel.system.pojo;
|
||||
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
|
||||
import cn.stylefeng.roses.kernel.validator.validators.status.StatusValue;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.roses.kernel.system.pojo.menu;
|
||||
package cn.stylefeng.roses.kernel.system.pojo;
|
||||
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
|
||||
import cn.stylefeng.roses.kernel.validator.validators.unique.TableUniqueValue;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.roses.kernel.system.pojo.menu;
|
||||
package cn.stylefeng.roses.kernel.system.pojo;
|
||||
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
|
||||
import cn.stylefeng.roses.kernel.validator.validators.flag.FlagValue;
|
|
@ -9,7 +9,7 @@ import lombok.Data;
|
|||
* @date 2021/2/3 10:51
|
||||
*/
|
||||
@Data
|
||||
public class UserOrgResponse {
|
||||
public class UserOrgRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
|
@ -8,7 +8,7 @@ import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|||
import cn.stylefeng.roses.kernel.resource.api.annotation.PostResource;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.SysMenuButtonRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.SysMenuButtonRequest;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
|
|
@ -9,7 +9,7 @@ import cn.stylefeng.roses.kernel.resource.api.annotation.PostResource;
|
|||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.ztree.ZTreeNode;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.SysMenuRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.SysMenuRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.antd.AntdSysMenuResponse;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.layui.LayuiMenuAndButtonTreeResponse;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.role.request.SysRoleRequest;
|
||||
|
|
|
@ -2,7 +2,7 @@ package cn.stylefeng.roses.kernel.menu.modular.service;
|
|||
|
||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||
import cn.stylefeng.roses.kernel.menu.modular.entity.SysMenuButton;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.SysMenuButtonRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.SysMenuButtonRequest;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,7 @@ package cn.stylefeng.roses.kernel.menu.modular.service;
|
|||
|
||||
import cn.stylefeng.roses.kernel.menu.modular.entity.SysMenu;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.ztree.ZTreeNode;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.SysMenuRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.SysMenuRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.antd.AntdIndexMenuTreeNode;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.antd.AntdSysMenuResponse;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.layui.LayuiAppIndexMenus;
|
||||
|
|
|
@ -14,7 +14,7 @@ import cn.stylefeng.roses.kernel.menu.modular.service.SysMenuService;
|
|||
import cn.stylefeng.roses.kernel.rule.enums.YesOrNotEnum;
|
||||
import cn.stylefeng.roses.kernel.system.exception.SystemModularException;
|
||||
import cn.stylefeng.roses.kernel.system.exception.enums.SysMenuButtonExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.SysMenuButtonRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.SysMenuButtonRequest;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
|
|
@ -53,7 +53,7 @@ import cn.stylefeng.roses.kernel.system.constants.SymbolConstant;
|
|||
import cn.stylefeng.roses.kernel.system.exception.SystemModularException;
|
||||
import cn.stylefeng.roses.kernel.system.exception.enums.SysMenuExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.system.exception.enums.SysUserExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.SysMenuRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.SysMenuRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.antd.AntdIndexMenuTreeNode;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.antd.AntdSysMenuResponse;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.menu.layui.LayuiAppIndexMenus;
|
||||
|
|
|
@ -7,7 +7,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
|
|||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.system.modular.organization.service.HrPositionService;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.organization.HrPositionRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.HrPositionRequest;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
|
|
@ -2,7 +2,7 @@ package cn.stylefeng.roses.kernel.system.modular.organization.service;
|
|||
|
||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||
import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrPosition;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.organization.HrPositionRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.HrPositionRequest;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -14,7 +14,7 @@ import cn.stylefeng.roses.kernel.system.exception.enums.PositionExceptionEnum;
|
|||
import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrPosition;
|
||||
import cn.stylefeng.roses.kernel.system.modular.organization.mapper.HrPositionMapper;
|
||||
import cn.stylefeng.roses.kernel.system.modular.organization.service.HrPositionService;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.organization.HrPositionRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.HrPositionRequest;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
|
|
@ -2,7 +2,7 @@ package cn.stylefeng.roses.kernel.system.modular.user.service;
|
|||
|
||||
import cn.stylefeng.roses.kernel.system.UserOrgServiceApi;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.entity.SysUserOrg;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.UserOrgResponse;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.UserOrgRequest;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -22,7 +22,7 @@ public interface SysUserOrgService extends IService<SysUserOrg>, UserOrgServiceA
|
|||
* @author chenjinlong
|
||||
* @date 2021/1/26 12:52
|
||||
*/
|
||||
void add(UserOrgResponse userOrgResponse);
|
||||
void add(UserOrgRequest userOrgResponse);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
@ -42,7 +42,7 @@ public interface SysUserOrgService extends IService<SysUserOrg>, UserOrgServiceA
|
|||
* @author chenjinlong
|
||||
* @date 2021/1/26 12:52
|
||||
*/
|
||||
void del(UserOrgResponse userOrgResponse);
|
||||
void del(UserOrgRequest userOrgResponse);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
|
@ -60,7 +60,7 @@ public interface SysUserOrgService extends IService<SysUserOrg>, UserOrgServiceA
|
|||
* @author chenjinlong
|
||||
* @date 2021/1/26 12:52
|
||||
*/
|
||||
void edit(UserOrgResponse userOrgResponse);
|
||||
void edit(UserOrgRequest userOrgResponse);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
|
@ -80,7 +80,7 @@ public interface SysUserOrgService extends IService<SysUserOrg>, UserOrgServiceA
|
|||
* @author chenjinlong
|
||||
* @date 2021/1/26 12:52
|
||||
*/
|
||||
SysUserOrg detail(UserOrgResponse userOrgResponse);
|
||||
SysUserOrg detail(UserOrgRequest userOrgResponse);
|
||||
|
||||
/**
|
||||
* 查询-列表
|
||||
|
@ -89,7 +89,7 @@ public interface SysUserOrgService extends IService<SysUserOrg>, UserOrgServiceA
|
|||
* @author chenjinlong
|
||||
* @date 2021/1/26 12:52
|
||||
*/
|
||||
List<SysUserOrg> findList(UserOrgResponse userOrgResponse);
|
||||
List<SysUserOrg> findList(UserOrgRequest userOrgResponse);
|
||||
|
||||
|
||||
}
|
|
@ -7,7 +7,7 @@ import cn.stylefeng.roses.kernel.system.exception.enums.SysUserOrgExceptionEnum;
|
|||
import cn.stylefeng.roses.kernel.system.modular.user.entity.SysUserOrg;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.mapper.SysUserOrgMapper;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.service.SysUserOrgService;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.UserOrgResponse;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.UserOrgRequest;
|
||||
import cn.stylefeng.roses.kernel.system.pojo.user.SysUserOrgResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
@ -46,7 +46,7 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
|
||||
|
||||
@Override
|
||||
public void add(UserOrgResponse userOrgResponse) {
|
||||
public void add(UserOrgRequest userOrgResponse) {
|
||||
SysUserOrg sysUserOrg = new SysUserOrg();
|
||||
BeanUtil.copyProperties(userOrgResponse, sysUserOrg);
|
||||
this.save(sysUserOrg);
|
||||
|
@ -62,7 +62,7 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
}
|
||||
|
||||
@Override
|
||||
public void del(UserOrgResponse userOrgResponse) {
|
||||
public void del(UserOrgRequest userOrgResponse) {
|
||||
SysUserOrg sysUserOrg = this.querySysUserOrgById(userOrgResponse);
|
||||
this.removeById(sysUserOrg.getUserOrgId());
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
}
|
||||
|
||||
@Override
|
||||
public void edit(UserOrgResponse userOrgResponse) {
|
||||
public void edit(UserOrgRequest userOrgResponse) {
|
||||
SysUserOrg sysUserOrg = this.querySysUserOrgById(userOrgResponse);
|
||||
BeanUtil.copyProperties(userOrgResponse, sysUserOrg);
|
||||
this.updateById(sysUserOrg);
|
||||
|
@ -84,7 +84,7 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void edit(Long userId, Long orgId, Long positionId) {
|
||||
UserOrgResponse userOrgResponse = new UserOrgResponse();
|
||||
UserOrgRequest userOrgResponse = new UserOrgRequest();
|
||||
userOrgResponse.setUserId(userId);
|
||||
userOrgResponse.setOrgId(orgId);
|
||||
userOrgResponse.setPositionId(positionId);
|
||||
|
@ -97,13 +97,13 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
|
||||
|
||||
@Override
|
||||
public SysUserOrg detail(UserOrgResponse userOrgResponse) {
|
||||
public SysUserOrg detail(UserOrgRequest userOrgResponse) {
|
||||
LambdaQueryWrapper<SysUserOrg> queryWrapper = this.createWrapper(userOrgResponse);
|
||||
return this.getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUserOrg> findList(UserOrgResponse userOrgResponse) {
|
||||
public List<SysUserOrg> findList(UserOrgRequest userOrgResponse) {
|
||||
LambdaQueryWrapper<SysUserOrg> queryWrapper = this.createWrapper(userOrgResponse);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
* @author chenjinlong
|
||||
* @date 2021/1/26 13:28
|
||||
*/
|
||||
private SysUserOrg querySysUserOrgById(UserOrgResponse userOrgResponse) {
|
||||
private SysUserOrg querySysUserOrgById(UserOrgRequest userOrgResponse) {
|
||||
SysUserOrg sysUserOrg = this.getById(userOrgResponse.getUserOrgId());
|
||||
if (ObjectUtil.isEmpty(sysUserOrg)) {
|
||||
throw new SystemModularException(SysUserOrgExceptionEnum.USER_ORG_NOT_EXIST, sysUserOrg.getOrgId());
|
||||
|
@ -138,7 +138,7 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
* @author fengshuonan
|
||||
* @date 2021/1/24 22:03
|
||||
*/
|
||||
private LambdaQueryWrapper<SysUserOrg> createWrapper(UserOrgResponse userOrgResponse) {
|
||||
private LambdaQueryWrapper<SysUserOrg> createWrapper(UserOrgRequest userOrgResponse) {
|
||||
LambdaQueryWrapper<SysUserOrg> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ObjectUtil.isNotEmpty(userOrgResponse.getUserOrgId()), SysUserOrg::getUserOrgId, userOrgResponse.getUserOrgId());
|
||||
queryWrapper.eq(ObjectUtil.isNotEmpty(userOrgResponse.getUserId()), SysUserOrg::getUserId, userOrgResponse.getUserId());
|
||||
|
|
Loading…
Reference in New Issue