Commit 7c35a79c authored by ZhengJie's avatar ZhengJie
Browse files

[新增功能](el-admin v2.5): v2.5 beta

详情 https://www.ydyno.com/archives/1225.html
parent d35ffc9d
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service; package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.Role; import me.zhengjie.modules.system.domain.Role;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service; package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.User; import me.zhengjie.modules.system.domain.User;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
import me.zhengjie.domain.vo.EmailVo;
/**
* @author Zheng Jie
* @date 2018-12-26
*/
public interface VerifyService {
/**
* 发送验证码
* @param email /
* @param key /
* @return /
*/
EmailVo sendEmail(String email, String key);
/**
* 验证
* @param code /
* @param key /
*/
void validated(String key, String code);
}
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.validation.constraints.NotNull; import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List; import java.util.List;
/** /**
* @author Zheng Jie * @author Zheng Jie
* @date 2019-03-25 * @date 2019-03-25
*/ */
@Data @Getter
public class DeptDto implements Serializable { @Setter
public class DeptDto extends BaseDTO implements Serializable {
private Long id; private Long id;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<DeptDto> children;
private String name; private String name;
@NotNull
private Boolean enabled; private Boolean enabled;
private Long pid; private Long pid;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<DeptDto> children;
private Timestamp createTime;
public String getLabel() { public String getLabel() {
return name; return name;
} }
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp; import java.sql.Timestamp;
...@@ -12,17 +27,15 @@ import java.sql.Timestamp; ...@@ -12,17 +27,15 @@ import java.sql.Timestamp;
*/ */
@Getter @Getter
@Setter @Setter
public class DictDetailDto implements Serializable { public class DictDetailDto extends BaseDTO implements Serializable {
private Long id; private Long id;
private DictSmallDto dict;
private String label; private String label;
private String value; private String value;
private Integer sort; private Integer dictSort;
private DictSmallDto dict;
private Timestamp createTime;
} }
\ No newline at end of file
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List; import java.util.List;
/** /**
...@@ -13,15 +27,13 @@ import java.util.List; ...@@ -13,15 +27,13 @@ import java.util.List;
*/ */
@Getter @Getter
@Setter @Setter
public class DictDto implements Serializable { public class DictDto extends BaseDTO implements Serializable {
private Long id; private Long id;
private String name;
private String remark;
private List<DictDetailDto> dictDetails; private List<DictDetailDto> dictDetails;
private Timestamp createTime; private String name;
private String description;
} }
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Getter; import lombok.Getter;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp; import java.sql.Timestamp;
...@@ -14,22 +30,16 @@ import java.sql.Timestamp; ...@@ -14,22 +30,16 @@ import java.sql.Timestamp;
@Getter @Getter
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
public class JobDto implements Serializable { public class JobDto extends BaseDTO implements Serializable {
private Long id; private Long id;
private Long sort; private Integer jobSort;
private String name; private String name;
private Boolean enabled; private Boolean enabled;
private DeptDto dept;
private String deptSuperiorName;
private Timestamp createTime;
public JobDto(String name, Boolean enabled) { public JobDto(String name, Boolean enabled) {
this.name = name; this.name = name;
this.enabled = enabled; this.enabled = enabled;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
...@@ -5,7 +20,6 @@ import lombok.NoArgsConstructor; ...@@ -5,7 +20,6 @@ import lombok.NoArgsConstructor;
import me.zhengjie.annotation.Query; import me.zhengjie.annotation.Query;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @author Zheng Jie * @author Zheng Jie
...@@ -21,12 +35,6 @@ public class JobQueryCriteria { ...@@ -21,12 +35,6 @@ public class JobQueryCriteria {
@Query @Query
private Boolean enabled; private Boolean enabled;
@Query(propName = "id", joinName = "dept")
private Long deptId;
@Query(propName = "id", joinName = "dept", type = Query.Type.IN)
private Set<Long> deptIds;
@Query(type = Query.Type.BETWEEN) @Query(type = Query.Type.BETWEEN)
private List<Timestamp> createTime; private List<Timestamp> createTime;
} }
\ No newline at end of file
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Getter;
import lombok.Setter;
import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List; import java.util.List;
/** /**
* @author Zheng Jie * @author Zheng Jie
* @date 2018-12-17 * @date 2018-12-17
*/ */
@Data @Getter
public class MenuDto implements Serializable { @Setter
public class MenuDto extends BaseDTO implements Serializable {
private Long id; private Long id;
private List<MenuDto> children;
private Integer type; private Integer type;
private String permission; private String permission;
private String name; private String title;
private Long sort; private Integer menuSort;
private String path; private String path;
...@@ -37,8 +56,4 @@ public class MenuDto implements Serializable { ...@@ -37,8 +56,4 @@ public class MenuDto implements Serializable {
private String componentName; private String componentName;
private String icon; private String icon;
private List<MenuDto> children;
private Timestamp createTime;
} }
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
import me.zhengjie.annotation.Query; import me.zhengjie.annotation.Query;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
...@@ -13,7 +27,7 @@ import java.util.List; ...@@ -13,7 +27,7 @@ import java.util.List;
@Data @Data
public class MenuQueryCriteria { public class MenuQueryCriteria {
@Query(blurry = "name,path,component") @Query(blurry = "title,path,component")
private String blurry; private String blurry;
@Query(type = Query.Type.BETWEEN) @Query(type = Query.Type.BETWEEN)
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Getter;
import lombok.Setter;
import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Set; import java.util.Set;
/** /**
* @author Zheng Jie * @author Zheng Jie
* @date 2018-11-23 * @date 2018-11-23
*/ */
@Data @Getter
public class RoleDto implements Serializable { @Setter
public class RoleDto extends BaseDTO implements Serializable {
private Long id; private Long id;
private Set<MenuDto> menus;
private Set<DeptDto> depts;
private String name; private String name;
private String dataScope; private String dataScope;
private Integer level; private Integer level;
private String remark; private String description;
private String permission;
private Set<MenuDto> menus;
private Set<DeptDto> depts;
private Timestamp createTime;
} }
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import lombok.Data; import lombok.Data;
......
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty; import lombok.Getter;
import lombok.Data; import lombok.Setter;
import org.springframework.security.core.GrantedAuthority; import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Set; import java.util.Set;
/** /**
* @author Zheng Jie * @author Zheng Jie
* @date 2018-11-23 * @date 2018-11-23
*/ */
@Data @Getter
public class UserDto implements Serializable { @Setter
public class UserDto extends BaseDTO implements Serializable {
@ApiModelProperty(hidden = true)
private Long id; private Long id;
private String username; private Set<RoleSmallDto> roles;
private String nickName; private Set<JobSmallDto> jobs;
private String sex; private DeptSmallDto dept;
private String avatar; private Long deptId;
private String username;
private String nickName;
private String email; private String email;
private String phone; private String phone;
private Boolean enabled; private String gender;
@JsonIgnore
private String password;
private Date lastPasswordResetTime; private String avatarName;
@ApiModelProperty(hidden = true) private String avatarPath;
private Set<RoleSmallDto> roles;
@ApiModelProperty(hidden = true) @JsonIgnore
private JobSmallDto job; private String password;
private DeptSmallDto dept; private Boolean enabled;
private Long deptId; @JsonIgnore
private Boolean isAdmin = false;
private Timestamp createTime; private Date pwdResetTime;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment