Browse Source

去掉common依赖

master
lzh 2 years ago
parent
commit
1d43d06145
  1. 64
      .gitignore
  2. 21
      demo-system/demo-system-biz/pom.xml
  3. 8
      demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/dto/Dto.java
  4. 77
      demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/query/PagerQuery.java
  5. 13
      demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/query/Query.java
  6. 100
      demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/vo/PagerVo.java
  7. 28
      demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/vo/Vo.java
  8. 1
      demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user/SysUserService.java

64
.gitignore

@ -0,0 +1,64 @@
# 此为注释– 将被Git 忽略
# /结尾表示是目录,忽略目录和目录下的所有件
# /开头表示根目录,否则是.gitignore的相对目录
# !开头表示反选
**/.idea/
**/target/
*.iml
*.ipr
*.iws
*.log
.svn/
.project
rebel.xml
.rebel-remote.xml.*
**/target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
.DS_Store
HELP.md
## target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
**/node_modules/
**/logs/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
/supervise-uniapp/.hbuilderx/
/supervise-uniapp/unpackage/

21
demo-system/demo-system-biz/pom.xml

@ -33,16 +33,25 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.yxt.demo</groupId>
<artifactId>demo-common-core</artifactId>
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.yxt.demo</groupId>-->
<!-- <artifactId>demo-common-core</artifactId>-->
<!-- <version>0.0.1</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.1</version>
</dependency><dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.16</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.5</version>
</dependency>
<!-- mysql驱动 -->
<dependency>

8
demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/dto/Dto.java

@ -0,0 +1,8 @@
package com.yxt.demo.common.core.dto;
import com.yxt.demo.common.core.vo.Vo;
public interface Dto extends Vo {
}

77
demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/query/PagerQuery.java

@ -0,0 +1,77 @@
package com.yxt.demo.common.core.query;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @author dimengzhe
* @date 2021/9/3 16:41
* @description
*/
public class PagerQuery<T extends Query> implements Serializable {
@ApiModelProperty(value = "当前页号", example = "1")
private long current = 1L;
@ApiModelProperty(value = "每页记录数", example = "10")
private long size = 10L;
@ApiModelProperty(value = "标识符")
private Integer identifier;
@ApiModelProperty("查询条件的项")
private T params;
public PagerQuery() {
}
public PagerQuery(long current) {
this.current = current;
}
public PagerQuery(long current, long size) {
this.size = size;
this.current = current;
}
public long getSize() {
return size;
}
public PagerQuery setSize(long size) {
this.size = size;
return this;
}
public long getCurrent() {
return current;
}
public PagerQuery setCurrent(long current) {
this.current = current;
return this;
}
public T getParams() {
return params;
}
public PagerQuery setParams(T params) {
this.params = params;
return this;
}
public Integer getIdentifier() {
return identifier;
}
public void setIdentifier(Integer identifier) {
this.identifier = identifier;
}
public void fromPagerQuery(PagerQuery s_query) {
this.setCurrent(s_query.getCurrent()).setSize(s_query.getSize()).setParams(params.fromMap(s_query.getParams().toMap()));
}
}

13
demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/query/Query.java

@ -0,0 +1,13 @@
package com.yxt.demo.common.core.query;
import com.yxt.demo.common.core.vo.Vo;
/**
* @author dimengzhe
* @date 2021/9/3 16:41
* @description
*/
public interface Query extends Vo {
}

100
demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/vo/PagerVo.java

@ -0,0 +1,100 @@
package com.yxt.demo.common.core.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Collections;
import java.util.List;
/**
* @author dimengzhe
* @date 2021/9/3 16:24
* @description
*/
@ApiModel(description = "返回的分页结果")
public class PagerVo<T> implements Serializable {
@ApiModelProperty("总页数")
private long pages = 1L;
@ApiModelProperty("总记录数")
private long total = 0L;
@ApiModelProperty("每页记录数")
private long size = 15L;
@ApiModelProperty("当前页号")
private long current = 1L;
@ApiModelProperty(value = "标识符")
private Integer identifier;
@ApiModelProperty("当前页的数据")
private List<T> records = Collections.emptyList();
public PagerVo() {
this.pages = 1L;
this.total = 0L;
this.size = 10L;
this.current = 1L;
this.records = Collections.emptyList();
}
public PagerVo(long current) {
this.pages = 1L;
this.total = 0L;
this.size = 10L;
this.current = current;
this.records = Collections.emptyList();
}
public long getPages() {
return pages;
}
public PagerVo<T> setPages(long pages) {
this.pages = pages;
return this;
}
public long getTotal() {
return total;
}
public PagerVo<T> setTotal(long total) {
this.total = total;
return this;
}
public long getSize() {
return size;
}
public PagerVo<T> setSize(long size) {
this.size = size;
return this;
}
public long getCurrent() {
return current;
}
public PagerVo<T> setCurrent(long current) {
this.current = current;
return this;
}
public List<T> getRecords() {
return records;
}
public PagerVo<T> setRecords(List<T> records) {
this.records = records;
return this;
}
public Integer getIdentifier() {
return identifier;
}
public void setIdentifier(Integer identifier) {
this.identifier = identifier;
}
}

28
demo-system/demo-system-biz/src/main/java/com/yxt/demo/common/core/vo/Vo.java

@ -0,0 +1,28 @@
package com.yxt.demo.common.core.vo;
import cn.hutool.core.bean.BeanUtil;
import javax.swing.text.html.parser.Entity;
import java.io.Serializable;
import java.util.Map;
/**
* @author dimengzhe
* @date 2021/9/3 16:21
* @description
*/
public interface Vo extends Serializable {
default Map<String, Object> toMap() {
return BeanUtil.beanToMap(this);
}
default <V extends Vo> V fromMap(Map<String, Object> map) {
return (V) BeanUtil.fillBeanWithMap(map, this, false);
}
default <E extends Entity> void fromEntity(E e) {
BeanUtil.copyProperties(e, this);
}
}

1
demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user/SysUserService.java

@ -9,7 +9,6 @@ import com.yxt.demo.system.api.sys_user.SysUser;
import com.yxt.demo.system.api.sys_user.SysUserDto;
import com.yxt.demo.system.api.sys_user.SysUserLoginQuery;
import com.yxt.demo.system.biz.sys_info.SysInfoService;
import jdk.nashorn.internal.ir.IfNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

Loading…
Cancel
Save