das接口新增
This commit is contained in:
parent
1b6df0decc
commit
f979d93e7f
@ -2,6 +2,8 @@ package com.das.modules.auth.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.das.common.constant.BaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -27,6 +29,7 @@ public class SysAuthority extends BaseEntity {
|
||||
* 用户ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,8 @@ package com.das.modules.auth.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.das.common.constant.BaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -28,6 +30,7 @@ public class SysMenu extends BaseEntity {
|
||||
|
||||
/** 菜单ID */
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id ;
|
||||
|
||||
/** 菜单名称 */
|
||||
|
@ -2,6 +2,8 @@ package com.das.modules.auth.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.das.common.constant.BaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -31,6 +33,7 @@ public class SysOrg extends BaseEntity {
|
||||
* 机构ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@ -86,7 +89,7 @@ public class SysOrg extends BaseEntity {
|
||||
* 上级机构id
|
||||
*/
|
||||
@TableField("parent_org_id")
|
||||
private Long parentOrgID;
|
||||
private Long parentOrgId;
|
||||
|
||||
/**
|
||||
* 乐观锁
|
||||
|
@ -2,6 +2,8 @@ package com.das.modules.auth.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.das.common.constant.BaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -27,6 +29,7 @@ public class SysRole extends BaseEntity {
|
||||
* 用户ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,8 @@ package com.das.modules.auth.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.das.common.constant.BaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@ -29,6 +31,7 @@ public class SysUser extends BaseEntity {
|
||||
* 用户ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,8 @@ import com.das.modules.auth.service.SysMenuService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class SysMenuServiceImpl implements SysMenuService {
|
||||
|
||||
@ -24,6 +26,9 @@ public class SysMenuServiceImpl implements SysMenuService {
|
||||
SysMenu sysMenu = new SysMenu();
|
||||
BeanCopyUtils.copy(sysMenuDto,sysMenu);
|
||||
sysMenu.setId(SequenceUtils.generateId());
|
||||
sysMenu.setRevision(1);
|
||||
sysMenu.setCreatedTime(new Date());
|
||||
sysMenu.setUpdatedTime(new Date());
|
||||
sysMenuMapper.insert(sysMenu);
|
||||
return sysMenu;
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ import com.das.modules.auth.service.SysOrgService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class SysOrgServiceImpl implements SysOrgService {
|
||||
@Autowired
|
||||
@ -22,6 +24,9 @@ public class SysOrgServiceImpl implements SysOrgService {
|
||||
SysOrg sysOrg = new SysOrg();
|
||||
BeanCopyUtils.copy(sysOrgDto,sysOrg);
|
||||
sysOrg.setId(SequenceUtils.generateId());
|
||||
sysOrg.setRevision(1);
|
||||
sysOrg.setCreatedTime(new Date());
|
||||
sysOrg.setUpdatedTime(new Date());
|
||||
sysOrgMapper.insert(sysOrg);
|
||||
return sysOrg;
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ import com.das.modules.auth.service.SysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class SysUserServiceImpl implements SysUserService {
|
||||
|
||||
@ -24,6 +26,9 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
SysUser sysUser = new SysUser();
|
||||
BeanCopyUtils.copy(sysUserDto,sysUser);
|
||||
sysUser.setId(SequenceUtils.generateId());
|
||||
sysUser.setRevision(1);
|
||||
sysUser.setCreatedTime(new Date());
|
||||
sysUser.setUpdatedTime(new Date());
|
||||
sysUserMapper.insert(sysUser);
|
||||
return sysUser;
|
||||
}
|
||||
|
@ -35,8 +35,8 @@
|
||||
<if test="sysOrg.county != null and sysOrg.county != ''">
|
||||
and county like concat('%',#{sysOrg.county},'%')
|
||||
</if>
|
||||
<if test="sysOrg.parentOrgID != null and sysOrg.parentOrgID != ''">
|
||||
and parent_org_iD = #{sysOrg.parentOrgID}
|
||||
<if test="sysOrg.parentOrgId != null and sysOrg.parentOrgId != ''">
|
||||
and parent_org_id = #{sysOrg.parentOrgId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user