commons

A project commons lib

License

License

GroupId

GroupId

cn.sourcespro
ArtifactId

ArtifactId

commons
Last Version

Last Version

0.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

commons
A project commons lib
Project URL

Project URL

https://github.com/sourcespro/commons
Source Code Management

Source Code Management

https://github.com/sourcespro/commons

Download commons

How to add to project

<!-- https://jarcasting.com/artifacts/cn.sourcespro/commons/ -->
<dependency>
    <groupId>cn.sourcespro</groupId>
    <artifactId>commons</artifactId>
    <version>0.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/cn.sourcespro/commons/
implementation 'cn.sourcespro:commons:0.0.4'
// https://jarcasting.com/artifacts/cn.sourcespro/commons/
implementation ("cn.sourcespro:commons:0.0.4")
'cn.sourcespro:commons:jar:0.0.4'
<dependency org="cn.sourcespro" name="commons" rev="0.0.4">
  <artifact name="commons" type="jar" />
</dependency>
@Grapes(
@Grab(group='cn.sourcespro', module='commons', version='0.0.4')
)
libraryDependencies += "cn.sourcespro" % "commons" % "0.0.4"
[cn.sourcespro/commons "0.0.4"]

Dependencies

compile (3)

Group / Artifact Type Version
com.baomidou : mybatis-plus-boot-starter jar 3.0.1
org.springframework.boot : spring-boot-starter-web jar 1.5.4.RELEASE
org.springframework.boot : spring-boot-starter-aop jar 1.5.4.RELEASE

Project Modules

There are no modules declared in this project.

1、use the left and right tree structure

create an Entity extends BaseTree

public class Tree extends BaseTree {
    private String name;
    ……
}

use the tree plug-in

@Bean
public LRTreeInterceptor treeInterceptor(){
    logger.info("Initialize the left and right tree structure mybatis plug-in");
    return new LRTreeInterceptor();
}

The TreeMapper.java is probably like this.
insert method, This plug-in intercepts the Entity extends of BaseTree. delete method, This plug-in intercepts the @LRTreeDelete.

@Mapper
public interface TreeMapper {

    int insert(Tree record);

    int updateById(Tree record);

    Tree findById(Long id);

    List<Tree> findByPid(Long pid);

    List<Tree> findByLftAndRgt(@Param("lft") Integer lft, @Param("rgt") Integer rgt);

    @LRTreeDelete
    int deleteById(Long id);
}

Versions

Version
0.0.4
0.0.3
0.0.2
0.0.1.RELEASE
0.0.1