├── README.md
├── j-mybatis
├── multiple
│ ├── j-dynamic-base
│ │ ├── pom.xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── jachs
│ │ │ │ │ └── mybatis
│ │ │ │ │ └── dynamic
│ │ │ │ │ ├── JDynamicBaseApplication.java
│ │ │ │ │ ├── controller
│ │ │ │ │ ├── ComputerController.java
│ │ │ │ │ ├── ExamController.java
│ │ │ │ │ ├── PlayerController.java
│ │ │ │ │ ├── SoftwareController.java
│ │ │ │ │ └── VideogameController.java
│ │ │ │ │ ├── entity
│ │ │ │ │ ├── ComputerEntity.java
│ │ │ │ │ ├── ExamEntity.java
│ │ │ │ │ ├── PlayerEntity.java
│ │ │ │ │ ├── SoftwareEntity.java
│ │ │ │ │ └── VideogameEntity.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ ├── ComputerMapper.java
│ │ │ │ │ ├── ExamMapper.java
│ │ │ │ │ ├── PlayerMapper.java
│ │ │ │ │ ├── SoftwareMapper.java
│ │ │ │ │ └── VideogameMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ ├── IComputerService.java
│ │ │ │ │ ├── IExamService.java
│ │ │ │ │ ├── IPlayerService.java
│ │ │ │ │ ├── ISoftwareService.java
│ │ │ │ │ ├── IVideogameService.java
│ │ │ │ │ └── impl
│ │ │ │ │ ├── ComputerServiceImpl.java
│ │ │ │ │ ├── ExamServiceImpl.java
│ │ │ │ │ ├── PlayerServiceImpl.java
│ │ │ │ │ ├── SoftwareServiceImpl.java
│ │ │ │ │ └── VideogameServiceImpl.java
│ │ │ └── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── mapper
│ │ │ │ ├── ComputerMapper.xml
│ │ │ │ ├── ExamMapper.xml
│ │ │ │ ├── PlayerMapper.xml
│ │ │ │ ├── SoftwareMapper.xml
│ │ │ │ └── VideogameMapper.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jachs
│ │ │ └── mybatis
│ │ │ └── dynamic
│ │ │ ├── DsTest.java
│ │ │ └── SourcesTest.java
│ ├── j-multiple-base
│ │ ├── pom.xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── jachs
│ │ │ │ │ └── mybatis
│ │ │ │ │ └── multiple
│ │ │ │ │ ├── JMultipleBaseApplication.java
│ │ │ │ │ ├── d1
│ │ │ │ │ ├── Dbcp2Config.java
│ │ │ │ │ ├── controller
│ │ │ │ │ │ ├── ComputerController.java
│ │ │ │ │ │ └── SoftwareController.java
│ │ │ │ │ ├── entity
│ │ │ │ │ │ ├── ComputerEntity.java
│ │ │ │ │ │ └── SoftwareEntity.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ │ ├── ComputerMapper.java
│ │ │ │ │ │ └── SoftwareMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ │ ├── IComputerService.java
│ │ │ │ │ │ ├── ISoftwareService.java
│ │ │ │ │ │ └── impl
│ │ │ │ │ │ ├── ComputerServiceImpl.java
│ │ │ │ │ │ └── SoftwareServiceImpl.java
│ │ │ │ │ ├── d2
│ │ │ │ │ ├── C3p0Config.java
│ │ │ │ │ ├── controller
│ │ │ │ │ │ ├── StudentController.java
│ │ │ │ │ │ └── StudentcardController.java
│ │ │ │ │ ├── entity
│ │ │ │ │ │ ├── StudentEntity.java
│ │ │ │ │ │ └── StudentcardEntity.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ │ ├── StudentMapper.java
│ │ │ │ │ │ └── StudentcardMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ │ ├── IStudentService.java
│ │ │ │ │ │ ├── IStudentcardService.java
│ │ │ │ │ │ └── impl
│ │ │ │ │ │ ├── StudentServiceImpl.java
│ │ │ │ │ │ └── StudentcardServiceImpl.java
│ │ │ │ │ └── d3
│ │ │ │ │ ├── DruidConfig.java
│ │ │ │ │ ├── controller
│ │ │ │ │ ├── PlayerController.java
│ │ │ │ │ └── VideogameController.java
│ │ │ │ │ ├── entity
│ │ │ │ │ ├── PlayerEntity.java
│ │ │ │ │ └── VideogameEntity.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ ├── PlayerMapper.java
│ │ │ │ │ └── VideogameMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ ├── IPlayerService.java
│ │ │ │ │ ├── IVideogameService.java
│ │ │ │ │ └── impl
│ │ │ │ │ ├── PlayerServiceImpl.java
│ │ │ │ │ └── VideogameServiceImpl.java
│ │ │ └── resources
│ │ │ │ ├── application.properties
│ │ │ │ ├── d1.properties
│ │ │ │ ├── d2.properties
│ │ │ │ ├── d3.properties
│ │ │ │ └── mapper
│ │ │ │ ├── d1
│ │ │ │ ├── ComputerMapper.xml
│ │ │ │ └── SoftwareMapper.xml
│ │ │ │ ├── d2
│ │ │ │ ├── StudentMapper.xml
│ │ │ │ └── StudentcardMapper.xml
│ │ │ │ └── d3
│ │ │ │ ├── PlayerMapper.xml
│ │ │ │ └── VideogameMapper.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jachs
│ │ │ └── mybatis
│ │ │ └── multiple
│ │ │ └── data
│ │ │ ├── D1Test.java
│ │ │ └── SourcesTest.java
│ └── pom.xml
├── plus
│ ├── j-mybatis-annotation-plus-generator
│ │ ├── pom.xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── jachs
│ │ │ │ │ └── mybatis
│ │ │ │ │ └── Application.java
│ │ │ └── resources
│ │ │ │ ├── META-INF
│ │ │ │ └── mybatis
│ │ │ │ │ ├── ComputerMapper.xml
│ │ │ │ │ └── SoftwareMapper.xml
│ │ │ │ ├── application.properties
│ │ │ │ └── templates
│ │ │ │ ├── controller.java.btl
│ │ │ │ ├── controller.java.ftl
│ │ │ │ ├── controller.java.vm
│ │ │ │ ├── entity.java.btl
│ │ │ │ ├── entity.java.ftl
│ │ │ │ ├── entity.java.vm
│ │ │ │ ├── entity.kt.btl
│ │ │ │ ├── entity.kt.ftl
│ │ │ │ ├── entity.kt.vm
│ │ │ │ ├── mapper.java.btl
│ │ │ │ ├── mapper.java.ftl
│ │ │ │ ├── mapper.java.vm
│ │ │ │ ├── mapper.xml.btl
│ │ │ │ ├── mapper.xml.ftl
│ │ │ │ ├── mapper.xml.vm
│ │ │ │ ├── service.java.btl
│ │ │ │ ├── service.java.ftl
│ │ │ │ ├── service.java.vm
│ │ │ │ ├── serviceImpl.java.btl
│ │ │ │ ├── serviceImpl.java.ftl
│ │ │ │ └── serviceImpl.java.vm
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jachs
│ │ │ └── mybatis
│ │ │ └── dao
│ │ │ └── generator
│ │ │ ├── GeneratorDemo.java
│ │ │ └── GeneratorDemo1.java
│ ├── j-mybatis-annotation-plus
│ │ ├── pom.xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── jachs
│ │ │ │ │ └── mybatis
│ │ │ │ │ ├── Application.java
│ │ │ │ │ ├── MybatisPlusConfig.java
│ │ │ │ │ ├── domain
│ │ │ │ │ ├── Computer.java
│ │ │ │ │ └── Software.java
│ │ │ │ │ ├── dto
│ │ │ │ │ └── SoftwareDto.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ ├── ComputerMapper.java
│ │ │ │ │ └── SoftwareMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ ├── ComputerService.java
│ │ │ │ │ ├── SoftwareService.java
│ │ │ │ │ └── impl
│ │ │ │ │ ├── ComputerServiceImpl.java
│ │ │ │ │ └── SoftwareServiceImpl.java
│ │ │ └── resources
│ │ │ │ ├── META-INF
│ │ │ │ └── mybatis
│ │ │ │ │ ├── ComputerMapper.xml
│ │ │ │ │ └── SoftwareMapper.xml
│ │ │ │ ├── application.properties
│ │ │ │ └── templates
│ │ │ │ ├── controller.java.btl
│ │ │ │ ├── controller.java.ftl
│ │ │ │ ├── controller.java.vm
│ │ │ │ ├── entity.java.btl
│ │ │ │ ├── entity.java.ftl
│ │ │ │ ├── entity.java.vm
│ │ │ │ ├── entity.kt.btl
│ │ │ │ ├── entity.kt.ftl
│ │ │ │ ├── entity.kt.vm
│ │ │ │ ├── mapper.java.btl
│ │ │ │ ├── mapper.java.ftl
│ │ │ │ ├── mapper.java.vm
│ │ │ │ ├── mapper.xml.btl
│ │ │ │ ├── mapper.xml.ftl
│ │ │ │ ├── mapper.xml.vm
│ │ │ │ ├── service.java.btl
│ │ │ │ ├── service.java.ftl
│ │ │ │ ├── service.java.vm
│ │ │ │ ├── serviceImpl.java.btl
│ │ │ │ ├── serviceImpl.java.ftl
│ │ │ │ └── serviceImpl.java.vm
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jachs
│ │ │ └── mybatis
│ │ │ └── dao
│ │ │ └── generator
│ │ │ ├── MapperDemo.java
│ │ │ ├── add
│ │ │ └── ComputerAdd.java
│ │ │ └── query
│ │ │ └── wrapper
│ │ │ ├── ComputerMapperDemo.java
│ │ │ └── page
│ │ │ └── PageDemo.java
│ ├── j-mybatis-annotation
│ │ ├── pom.xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── jachs
│ │ │ │ │ └── mybatis
│ │ │ │ │ ├── Application.java
│ │ │ │ │ ├── dao
│ │ │ │ │ └── ComputerMapper.java
│ │ │ │ │ └── entity
│ │ │ │ │ ├── Computer.java
│ │ │ │ │ └── Soft_ware.java
│ │ │ └── resources
│ │ │ │ └── application.properties
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jachs
│ │ │ └── mybatis
│ │ │ └── dao
│ │ │ └── ComputerTest.java
│ ├── j-mybatis-cache
│ │ ├── pom.xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── jachs
│ │ │ │ │ └── mybatis
│ │ │ │ │ └── cache
│ │ │ │ │ ├── Application.java
│ │ │ │ │ ├── ApplicationContextUtils.java
│ │ │ │ │ ├── MybatisPlusRedisCache.java
│ │ │ │ │ ├── entity
│ │ │ │ │ ├── ComputerEntity.java
│ │ │ │ │ ├── SoftwareEntity.java
│ │ │ │ │ └── dto
│ │ │ │ │ │ └── CpDto.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ ├── ComputerMapper.java
│ │ │ │ │ └── SoftwareMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ ├── IComputerService.java
│ │ │ │ │ ├── ISoftwareService.java
│ │ │ │ │ └── impl
│ │ │ │ │ ├── ComputerServiceImpl.java
│ │ │ │ │ └── SoftwareServiceImpl.java
│ │ │ └── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── xml
│ │ │ │ ├── ComputerMapper.xml
│ │ │ │ └── SoftwareMapper.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jachs
│ │ │ └── mybatis
│ │ │ └── cache
│ │ │ ├── ComputerTest.java
│ │ │ ├── RedisTest.java
│ │ │ └── SoftwareTest.java
│ ├── j-mybatis-redis-cache
│ │ ├── pom.xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── jachs
│ │ │ │ │ └── mybatis
│ │ │ │ │ └── cache
│ │ │ │ │ ├── Application.java
│ │ │ │ │ ├── entity
│ │ │ │ │ ├── ComputerEntity.java
│ │ │ │ │ ├── SoftwareEntity.java
│ │ │ │ │ └── dto
│ │ │ │ │ │ └── CpDto.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ ├── ComputerMapper.java
│ │ │ │ │ └── SoftwareMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ ├── IComputerService.java
│ │ │ │ │ ├── ISoftwareService.java
│ │ │ │ │ └── impl
│ │ │ │ │ ├── ComputerServiceImpl.java
│ │ │ │ │ └── SoftwareServiceImpl.java
│ │ │ └── resources
│ │ │ │ ├── application.properties
│ │ │ │ ├── redis.properties
│ │ │ │ └── xml
│ │ │ │ ├── ComputerMapper.xml
│ │ │ │ └── SoftwareMapper.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jachs
│ │ │ └── mybatis
│ │ │ └── cache
│ │ │ ├── ComputerTest.java
│ │ │ └── SoftwareTest.java
│ ├── mybatis-plus-join-demo
│ │ ├── README.md
│ │ ├── join-demo
│ │ │ ├── README.md
│ │ │ ├── pom.xml
│ │ │ └── src
│ │ │ │ ├── main
│ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── github
│ │ │ │ │ │ └── yulichang
│ │ │ │ │ │ └── join
│ │ │ │ │ │ ├── Application.java
│ │ │ │ │ │ ├── config
│ │ │ │ │ │ └── MybatisPlusConfig.java
│ │ │ │ │ │ ├── dto
│ │ │ │ │ │ └── UserDTO.java
│ │ │ │ │ │ ├── entity
│ │ │ │ │ │ ├── AreaDO.java
│ │ │ │ │ │ ├── UserAddressDO.java
│ │ │ │ │ │ └── UserDO.java
│ │ │ │ │ │ ├── enums
│ │ │ │ │ │ └── Sex.java
│ │ │ │ │ │ └── mapper
│ │ │ │ │ │ ├── AreaMapper.java
│ │ │ │ │ │ ├── UserAddressMapper.java
│ │ │ │ │ │ └── UserMapper.java
│ │ │ │ └── resources
│ │ │ │ │ ├── application.yml
│ │ │ │ │ └── db
│ │ │ │ │ ├── data.sql
│ │ │ │ │ └── schema.sql
│ │ │ │ └── test
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── yulichang
│ │ │ │ └── join
│ │ │ │ └── JoinTest.java
│ │ └── mapping-demo
│ │ │ ├── README.md
│ │ │ ├── pom.xml
│ │ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── github
│ │ │ │ │ └── yulichang
│ │ │ │ │ └── mapping
│ │ │ │ │ ├── Application.java
│ │ │ │ │ ├── config
│ │ │ │ │ └── MybatisPlusConfig.java
│ │ │ │ │ ├── entity
│ │ │ │ │ ├── UserAddressDO.java
│ │ │ │ │ └── UserDO.java
│ │ │ │ │ ├── enums
│ │ │ │ │ └── Sex.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ ├── UserAddressMapper.java
│ │ │ │ │ └── UserMapper.java
│ │ │ │ │ └── service
│ │ │ │ │ ├── UserService.java
│ │ │ │ │ └── UserServiceImpl.java
│ │ │ └── resources
│ │ │ │ ├── application.yml
│ │ │ │ └── db
│ │ │ │ ├── data.sql
│ │ │ │ └── schema.sql
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── yulichang
│ │ │ └── mapping
│ │ │ └── MappingTest.java
│ └── pom.xml
└── xml
│ ├── j-mybatis-xml-file
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── jachs
│ │ │ │ └── mybatis
│ │ │ │ ├── Application.java
│ │ │ │ ├── dao
│ │ │ │ ├── ComputerMapper.java
│ │ │ │ └── SoftwareMapper.java
│ │ │ │ ├── dto
│ │ │ │ └── SoftWareDto.java
│ │ │ │ ├── entity
│ │ │ │ ├── Computer.java
│ │ │ │ └── Software.java
│ │ │ │ ├── vo
│ │ │ │ └── SoftWareVo.java
│ │ │ │ └── xml
│ │ │ │ ├── ComputerMapper.xml
│ │ │ │ └── SoftwareMapper.xml
│ │ └── resources
│ │ │ ├── application.properties
│ │ │ ├── forEach.png
│ │ │ └── readme
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── jachs
│ │ └── mybatisc
│ │ └── dao
│ │ ├── PagehelperDemo.java
│ │ ├── complex
│ │ ├── ForEachTest.java
│ │ └── SoftwareQueryDemo.java
│ │ ├── paser
│ │ ├── Demo1.java
│ │ ├── Demo2.java
│ │ └── util
│ │ │ ├── MyBatisSql.java
│ │ │ └── MyBatisSqlUtils.java
│ │ └── simple
│ │ ├── ComputerAddDemo.java
│ │ ├── SoftwareAddDemo.java
│ │ └── query
│ │ └── ComputerQueryDemo.java
│ ├── j-mybatis-xml-generator
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── jachs
│ │ │ ├── mybatis
│ │ │ └── MybatisGeneratorApp.java
│ │ │ └── springmybatis
│ │ │ ├── dao
│ │ │ ├── ComputerMapper.java
│ │ │ └── SoftwareMapper.java
│ │ │ ├── entity
│ │ │ ├── Computer.java
│ │ │ └── Software.java
│ │ │ └── xml
│ │ │ ├── ComputerMapper.xml
│ │ │ └── SoftwareMapper.xml
│ │ └── resources
│ │ └── generator.xml
│ └── pom.xml
├── spring-mybatis
├── pom.xml
├── spring-mybatis-plus
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── jachs
│ │ │ │ └── springmybatis
│ │ │ │ ├── entity
│ │ │ │ ├── ComputerEntity.java
│ │ │ │ └── SoftwareEntity.java
│ │ │ │ └── mapper
│ │ │ │ ├── ComputerMapper.java
│ │ │ │ └── SoftwareMapper.java
│ │ └── resources
│ │ │ ├── jdbc.properties
│ │ │ ├── spring.xml
│ │ │ └── xml
│ │ │ ├── ComputerMapper.xml
│ │ │ └── SoftwareMapper.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── jachs
│ │ └── springmybatis
│ │ └── ComputerMapperTest.java
└── spring-mybatis-xml
│ ├── pom.xml
│ └── src
│ ├── main
│ ├── java
│ │ └── com
│ │ │ └── jachs
│ │ │ └── springmybatis
│ │ │ ├── dao
│ │ │ ├── ComputerMapper.java
│ │ │ └── SoftwareMapper.java
│ │ │ └── entity
│ │ │ ├── Computer.java
│ │ │ └── Software.java
│ └── resources
│ │ ├── jdbc.properties
│ │ ├── spring.xml
│ │ └── xml
│ │ ├── ComputerMapper.xml
│ │ └── SoftwareMapper.xml
│ └── test
│ └── java
│ └── com
│ └── jachs
│ └── springmybatis
│ └── ComputerMapperTest.java
└── xml
├── pom.xml
└── src
├── main
└── java
│ ├── com
│ └── jachs
│ │ └── xml
│ │ ├── App.java
│ │ ├── configer
│ │ └── mybatis-config.xml
│ │ ├── entity
│ │ ├── Computer.java
│ │ ├── Exam.java
│ │ └── Software.java
│ │ ├── mapper
│ │ ├── ComputerMapper.java
│ │ └── SoftwareMapper.java
│ │ └── xml
│ │ ├── ComputerMapper.xml
│ │ ├── ExamMapper.xml
│ │ └── SoftwareMapper.xml
│ └── readme
└── test
└── java
└── com
└── jachs
└── xml
├── Annotation.java
├── Mapper1.java
└── Select1.java
/README.md:
--------------------------------------------------------------------------------
1 |
2 | [](https://www.murphysec.com/dr/ImX7znaHGomibLFW0P)
3 | [](https://github.com/ZhanChaoHan/github-readme-stats)
4 |
--------------------------------------------------------------------------------
/j-mybatis/multiple/j-dynamic-base/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/computerEntity") 18 | public class ComputerController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/controller/ExamController.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | *10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/examEntity") 18 | public class ExamController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/controller/PlayerController.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | *10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/playerEntity") 18 | public class PlayerController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/controller/SoftwareController.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | *10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/softwareEntity") 18 | public class SoftwareController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/controller/VideogameController.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | *10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/videogameEntity") 18 | public class VideogameController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/entity/ComputerEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import java.time.LocalDateTime; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | /** 12 | *13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-12 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("computer") 22 | public class ComputerEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId("computerId") 27 | private String computerId; 28 | 29 | @TableField("computerName") 30 | private String computerName; 31 | 32 | @TableField("computerPrice") 33 | private Long computerPrice; 34 | 35 | @TableField("madeTime") 36 | private LocalDateTime madeTime; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/entity/ExamEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | /** 11 | *12 | * 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-12 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @TableName("exam") 21 | public class ExamEntity implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId("examId") 26 | private Integer examId; 27 | 28 | @TableField("examName") 29 | private String examName; 30 | 31 | @TableField("score") 32 | private Object score; 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/entity/PlayerEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import java.io.Serializable; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | /** 12 | *13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-12 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("player") 22 | public class PlayerEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "pID", type = IdType.AUTO) 27 | private Long pID; 28 | 29 | @TableField("level") 30 | private Integer level; 31 | 32 | @TableField("playerUserName") 33 | private String playerUserName; 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/entity/SoftwareEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | /** 11 | *12 | * 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-12 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @TableName("software") 21 | public class SoftwareEntity implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId("softWareId") 26 | private String softWareId; 27 | 28 | @TableField("softWareName") 29 | private String softWareName; 30 | 31 | @TableField("cFKId") 32 | private String cFKId; 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/entity/VideogameEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import java.io.Serializable; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | /** 12 | *13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-12 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("videogame") 22 | public class VideogameEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "gameId", type = IdType.AUTO) 27 | private Long gameId; 28 | 29 | @TableField("gameName") 30 | private String gameName; 31 | 32 | @TableField("gamePrice") 33 | private Integer gamePrice; 34 | 35 | @TableField("pID") 36 | private Long pID; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-dynamic-base/src/main/java/com/jachs/mybatis/dynamic/mapper/ComputerMapper.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dynamic.mapper; 2 | 3 | import com.jachs.mybatis.dynamic.entity.ComputerEntity; 4 | 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import com.baomidou.dynamic.datasource.annotation.DS; 8 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 9 | 10 | /** 11 | *12 | * Mapper 接口 13 | *
14 | * 没有@DS 默认数据源11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface ExamMapper extends BaseMapper11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface PlayerMapper extends BaseMapper11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface SoftwareMapper extends BaseMapper11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface VideogameMapper extends BaseMapper8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IComputerService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IExamService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IPlayerService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface ISoftwareService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IVideogameService extends IService11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class ComputerServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class ExamServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class PlayerServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class SoftwareServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class VideogameServiceImpl extends ServiceImpl10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-11 15 | */ 16 | @Controller 17 | @RequestMapping("/computerEntity") 18 | public class ComputerController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d1/controller/SoftwareController.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d1.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | *10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-11 15 | */ 16 | @Controller 17 | @RequestMapping("/softwareEntity") 18 | public class SoftwareController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d1/entity/ComputerEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d1.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import java.time.LocalDateTime; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | /** 12 | *13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-11 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("computer") 22 | public class ComputerEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId("computerId") 27 | private String computerId; 28 | 29 | @TableField("computerName") 30 | private String computerName; 31 | 32 | @TableField("computerPrice") 33 | private Long computerPrice; 34 | 35 | @TableField("madeTime") 36 | private LocalDateTime madeTime; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d1/entity/SoftwareEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d1.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | /** 11 | *12 | * 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-11 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @TableName("software") 21 | public class SoftwareEntity implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId("softWareId") 26 | private String softWareId; 27 | 28 | @TableField("softWareName") 29 | private String softWareName; 30 | 31 | @TableField("cFKId") 32 | private String cFKId; 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d1/mapper/ComputerMapper.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d1.mapper; 2 | 3 | import com.jachs.mybatis.multiple.d1.entity.ComputerEntity; 4 | 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 8 | 9 | /** 10 | *11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-11 16 | */ 17 | @Mapper 18 | public interface ComputerMapper extends BaseMapper11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-11 16 | */ 17 | @Mapper 18 | public interface SoftwareMapper extends BaseMapper8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-11 13 | */ 14 | public interface IComputerService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-11 13 | */ 14 | public interface ISoftwareService extends IService11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-11 16 | */ 17 | @Service 18 | public class ComputerServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-11 16 | */ 17 | @Service 18 | public class SoftwareServiceImpl extends ServiceImpl10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/studentEntity") 18 | public class StudentController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d2/controller/StudentcardController.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d2.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | *10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/studentcardEntity") 18 | public class StudentcardController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d2/entity/StudentEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d2.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import java.time.LocalDateTime; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | /** 12 | *13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-12 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("student") 22 | public class StudentEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId("studentId") 27 | private String studentId; 28 | 29 | @TableField("dateOfBirth") 30 | private LocalDateTime dateOfBirth; 31 | 32 | @TableField("studentAge") 33 | private Integer studentAge; 34 | 35 | @TableField("studentName") 36 | private String studentName; 37 | 38 | @TableField("sCarId") 39 | private String sCarId; 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d2/entity/StudentcardEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d2.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | /** 11 | *12 | * 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-12 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @TableName("studentcard") 21 | public class StudentcardEntity implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId("cardId") 26 | private String cardId; 27 | 28 | @TableField("cardMonery") 29 | private Long cardMonery; 30 | 31 | @TableField("cardName") 32 | private String cardName; 33 | 34 | @TableField("cardType") 35 | private String cardType; 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d2/mapper/StudentMapper.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d2.mapper; 2 | 3 | import com.jachs.mybatis.multiple.d2.entity.StudentEntity; 4 | 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 8 | 9 | /** 10 | *11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface StudentMapper extends BaseMapper11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface StudentcardMapper extends BaseMapper8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IStudentService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IStudentcardService extends IService11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class StudentServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class StudentcardServiceImpl extends ServiceImpl10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/playerEntity") 18 | public class PlayerController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d3/controller/VideogameController.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d3.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | *10 | * 前端控制器 11 | *
12 | * 13 | * @author zhanchaohan 14 | * @since 2022-07-12 15 | */ 16 | @Controller 17 | @RequestMapping("/videogameEntity") 18 | public class VideogameController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d3/entity/PlayerEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d3.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import java.io.Serializable; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | /** 12 | *13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-12 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("player") 22 | public class PlayerEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "pID", type = IdType.AUTO) 27 | private Long pID; 28 | 29 | @TableField("level") 30 | private Integer level; 31 | 32 | @TableField("playerUserName") 33 | private String playerUserName; 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d3/entity/VideogameEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d3.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import java.io.Serializable; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | /** 12 | *13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-12 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("videogame") 22 | public class VideogameEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "gameId", type = IdType.AUTO) 27 | private Long gameId; 28 | 29 | @TableField("gameName") 30 | private String gameName; 31 | 32 | @TableField("gamePrice") 33 | private Integer gamePrice; 34 | 35 | @TableField("pID") 36 | private Long pID; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /j-mybatis/multiple/j-multiple-base/src/main/java/com/jachs/mybatis/multiple/d3/mapper/PlayerMapper.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.multiple.d3.mapper; 2 | 3 | import com.jachs.mybatis.multiple.d3.entity.PlayerEntity; 4 | 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 8 | 9 | /** 10 | *11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface PlayerMapper extends BaseMapper11 | * Mapper 接口 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Mapper 18 | public interface VideogameMapper extends BaseMapper8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IPlayerService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-07-12 13 | */ 14 | public interface IVideogameService extends IService11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class PlayerServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-12 16 | */ 17 | @Service 18 | public class VideogameServiceImpl extends ServiceImpl17 | * ${table.comment!} 前端控制器 18 | *
19 | * 20 | * @author ${author} 21 | * @since ${date} 22 | */ 23 | <% if(restControllerStyle){ %> 24 | @RestController 25 | <% }else{ %> 26 | @Controller 27 | <% } %> 28 | @RequestMapping("<% if(isNotEmpty(package.ModuleName)){ %>/${package.ModuleName}<% } %>/<% if(isNotEmpty(controllerMappingHyphenStyle)){ %>${controllerMappingHyphen}<% }else{ %>${table.entityPath}<% } %>") 29 | <% if(kotlin){ %> 30 | class ${table.controllerName}<% if(isNotEmpty(superControllerClass)){ %> : ${superControllerClass}()<% } %> 31 | <% }else{ %> 32 | <% if(isNotEmpty(superControllerClass)){ %> 33 | public class ${table.controllerName} extends ${superControllerClass} { 34 | <% }else{ %> 35 | public class ${table.controllerName} { 36 | <% } %> 37 | 38 | } 39 | <% } %> 40 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/controller.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Controller}; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | <#if restControllerStyle> 7 | import org.springframework.web.bind.annotation.RestController; 8 | <#else> 9 | import org.springframework.stereotype.Controller; 10 | #if> 11 | <#if superControllerClassPackage??> 12 | import ${superControllerClassPackage}; 13 | #if> 14 | 15 | /** 16 | *17 | * ${table.comment!} 前端控制器 18 | *
19 | * 20 | * @author ${author} 21 | * @since ${date} 22 | */ 23 | <#if restControllerStyle> 24 | @RestController 25 | <#else> 26 | @Controller 27 | #if> 28 | @RequestMapping("<#if package.ModuleName?? && package.ModuleName != "">/${package.ModuleName}#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}#if>") 29 | <#if kotlin> 30 | class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()#if> 31 | <#else> 32 | <#if superControllerClass??> 33 | public class ${table.controllerName} extends ${superControllerClass} { 34 | <#else> 35 | public class ${table.controllerName} { 36 | #if> 37 | 38 | } 39 | #if> 40 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/controller.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.Controller}; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | #if(${restControllerStyle}) 7 | import org.springframework.web.bind.annotation.RestController; 8 | #else 9 | import org.springframework.stereotype.Controller; 10 | #end 11 | #if(${superControllerClassPackage}) 12 | import ${superControllerClassPackage}; 13 | #end 14 | 15 | /** 16 | *17 | * $!{table.comment} 前端控制器 18 | *
19 | * 20 | * @author ${author} 21 | * @since ${date} 22 | */ 23 | #if(${restControllerStyle}) 24 | @RestController 25 | #else 26 | @Controller 27 | #end 28 | @RequestMapping("#if(${package.ModuleName})/${package.ModuleName}#end/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end") 29 | #if(${kotlin}) 30 | class ${table.controllerName}#if(${superControllerClass}) : ${superControllerClass}()#end 31 | 32 | #else 33 | #if(${superControllerClass}) 34 | public class ${table.controllerName} extends ${superControllerClass} { 35 | #else 36 | public class ${table.controllerName} { 37 | #end 38 | 39 | } 40 | 41 | #end -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/mapper.java.btl: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | 6 | /** 7 | *8 | * ${table.comment!} Mapper 接口 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <% if(kotlin){ %> 15 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 16 | <% }else{ %> 17 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 18 | 19 | } 20 | <% } %> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/mapper.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | 6 | /** 7 | *8 | * ${table.comment!} Mapper 接口 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <#if kotlin> 15 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 16 | <#else> 17 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 18 | 19 | } 20 | #if> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/mapper.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | 6 | /** 7 | *8 | * $!{table.comment} Mapper 接口 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | #if(${kotlin}) 15 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 16 | #else 17 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 18 | 19 | } 20 | #end 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/mapper.xml.btl: -------------------------------------------------------------------------------- 1 | 2 | 3 |8 | * ${table.comment!} 服务类 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <% if(kotlin){ %> 15 | interface ${table.serviceName} : ${superServiceClass}<${entity}> 16 | <% }else{ %> 17 | public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { 18 | 19 | } 20 | <% } %> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/service.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Service}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superServiceClassPackage}; 5 | 6 | /** 7 | *8 | * ${table.comment!} 服务类 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <#if kotlin> 15 | interface ${table.serviceName} : ${superServiceClass}<${entity}> 16 | <#else> 17 | public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { 18 | 19 | } 20 | #if> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/service.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.Service}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superServiceClassPackage}; 5 | 6 | /** 7 | *8 | * $!{table.comment} 服务类 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | #if(${kotlin}) 15 | interface ${table.serviceName} : ${superServiceClass}<${entity}> 16 | #else 17 | public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { 18 | 19 | } 20 | #end 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/serviceImpl.java.btl: -------------------------------------------------------------------------------- 1 | package ${package.ServiceImpl}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${package.Mapper}.${table.mapperName}; 5 | import ${package.Service}.${table.serviceName}; 6 | import ${superServiceImplClassPackage}; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *11 | * ${table.comment!} 服务实现类 12 | *
13 | * 14 | * @author ${author} 15 | * @since ${date} 16 | */ 17 | @Service 18 | <% if(kotlin){ %> 19 | open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { 20 | 21 | } 22 | <% }else{ %> 23 | public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { 24 | 25 | } 26 | <% } %> 27 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/serviceImpl.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.ServiceImpl}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${package.Mapper}.${table.mapperName}; 5 | import ${package.Service}.${table.serviceName}; 6 | import ${superServiceImplClassPackage}; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *11 | * ${table.comment!} 服务实现类 12 | *
13 | * 14 | * @author ${author} 15 | * @since ${date} 16 | */ 17 | @Service 18 | <#if kotlin> 19 | open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { 20 | 21 | } 22 | <#else> 23 | public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { 24 | 25 | } 26 | #if> 27 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus-generator/src/main/resources/templates/serviceImpl.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.ServiceImpl}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${package.Mapper}.${table.mapperName}; 5 | import ${package.Service}.${table.serviceName}; 6 | import ${superServiceImplClassPackage}; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *11 | * $!{table.comment} 服务实现类 12 | *
13 | * 14 | * @author ${author} 15 | * @since ${date} 16 | */ 17 | @Service 18 | #if(${kotlin}) 19 | open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { 20 | 21 | } 22 | #else 23 | public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { 24 | 25 | } 26 | #end 27 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/pom.xml: -------------------------------------------------------------------------------- 1 | 2 |15 | * Mapper 接口 16 | *
17 | * 18 | * @author zhanchaohan 19 | * @since 2022-04-06 20 | */ 21 | public interface ComputerMapper extends MPJBaseMapper8 | * Mapper 接口 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-04-06 13 | */ 14 | public interface SoftwareMapper extends BaseMapper8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-04-06 13 | */ 14 | public interface ComputerService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author zhanchaohan 12 | * @since 2022-04-06 13 | */ 14 | public interface SoftwareService extends IService11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-04-06 16 | */ 17 | @Service 18 | public class ComputerServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-04-06 16 | */ 17 | @Service 18 | public class SoftwareServiceImpl extends ServiceImpl17 | * ${table.comment!} 前端控制器 18 | *
19 | * 20 | * @author ${author} 21 | * @since ${date} 22 | */ 23 | <% if(restControllerStyle){ %> 24 | @RestController 25 | <% }else{ %> 26 | @Controller 27 | <% } %> 28 | @RequestMapping("<% if(isNotEmpty(package.ModuleName)){ %>/${package.ModuleName}<% } %>/<% if(isNotEmpty(controllerMappingHyphenStyle)){ %>${controllerMappingHyphen}<% }else{ %>${table.entityPath}<% } %>") 29 | <% if(kotlin){ %> 30 | class ${table.controllerName}<% if(isNotEmpty(superControllerClass)){ %> : ${superControllerClass}()<% } %> 31 | <% }else{ %> 32 | <% if(isNotEmpty(superControllerClass)){ %> 33 | public class ${table.controllerName} extends ${superControllerClass} { 34 | <% }else{ %> 35 | public class ${table.controllerName} { 36 | <% } %> 37 | 38 | } 39 | <% } %> 40 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/controller.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Controller}; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | <#if restControllerStyle> 7 | import org.springframework.web.bind.annotation.RestController; 8 | <#else> 9 | import org.springframework.stereotype.Controller; 10 | #if> 11 | <#if superControllerClassPackage??> 12 | import ${superControllerClassPackage}; 13 | #if> 14 | 15 | /** 16 | *17 | * ${table.comment!} 前端控制器 18 | *
19 | * 20 | * @author ${author} 21 | * @since ${date} 22 | */ 23 | <#if restControllerStyle> 24 | @RestController 25 | <#else> 26 | @Controller 27 | #if> 28 | @RequestMapping("<#if package.ModuleName?? && package.ModuleName != "">/${package.ModuleName}#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}#if>") 29 | <#if kotlin> 30 | class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()#if> 31 | <#else> 32 | <#if superControllerClass??> 33 | public class ${table.controllerName} extends ${superControllerClass} { 34 | <#else> 35 | public class ${table.controllerName} { 36 | #if> 37 | 38 | } 39 | #if> 40 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/controller.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.Controller}; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | #if(${restControllerStyle}) 7 | import org.springframework.web.bind.annotation.RestController; 8 | #else 9 | import org.springframework.stereotype.Controller; 10 | #end 11 | #if(${superControllerClassPackage}) 12 | import ${superControllerClassPackage}; 13 | #end 14 | 15 | /** 16 | *17 | * $!{table.comment} 前端控制器 18 | *
19 | * 20 | * @author ${author} 21 | * @since ${date} 22 | */ 23 | #if(${restControllerStyle}) 24 | @RestController 25 | #else 26 | @Controller 27 | #end 28 | @RequestMapping("#if(${package.ModuleName})/${package.ModuleName}#end/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end") 29 | #if(${kotlin}) 30 | class ${table.controllerName}#if(${superControllerClass}) : ${superControllerClass}()#end 31 | 32 | #else 33 | #if(${superControllerClass}) 34 | public class ${table.controllerName} extends ${superControllerClass} { 35 | #else 36 | public class ${table.controllerName} { 37 | #end 38 | 39 | } 40 | 41 | #end -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/mapper.java.btl: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | 6 | /** 7 | *8 | * ${table.comment!} Mapper 接口 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <% if(kotlin){ %> 15 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 16 | <% }else{ %> 17 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 18 | 19 | } 20 | <% } %> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/mapper.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | 6 | /** 7 | *8 | * ${table.comment!} Mapper 接口 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <#if kotlin> 15 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 16 | <#else> 17 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 18 | 19 | } 20 | #if> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/mapper.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | 6 | /** 7 | *8 | * $!{table.comment} Mapper 接口 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | #if(${kotlin}) 15 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 16 | #else 17 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 18 | 19 | } 20 | #end 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/mapper.xml.btl: -------------------------------------------------------------------------------- 1 | 2 | 3 |8 | * ${table.comment!} 服务类 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <% if(kotlin){ %> 15 | interface ${table.serviceName} : ${superServiceClass}<${entity}> 16 | <% }else{ %> 17 | public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { 18 | 19 | } 20 | <% } %> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/service.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Service}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superServiceClassPackage}; 5 | 6 | /** 7 | *8 | * ${table.comment!} 服务类 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | <#if kotlin> 15 | interface ${table.serviceName} : ${superServiceClass}<${entity}> 16 | <#else> 17 | public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { 18 | 19 | } 20 | #if> 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/service.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.Service}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superServiceClassPackage}; 5 | 6 | /** 7 | *8 | * $!{table.comment} 服务类 9 | *
10 | * 11 | * @author ${author} 12 | * @since ${date} 13 | */ 14 | #if(${kotlin}) 15 | interface ${table.serviceName} : ${superServiceClass}<${entity}> 16 | #else 17 | public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { 18 | 19 | } 20 | #end 21 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/serviceImpl.java.btl: -------------------------------------------------------------------------------- 1 | package ${package.ServiceImpl}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${package.Mapper}.${table.mapperName}; 5 | import ${package.Service}.${table.serviceName}; 6 | import ${superServiceImplClassPackage}; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *11 | * ${table.comment!} 服务实现类 12 | *
13 | * 14 | * @author ${author} 15 | * @since ${date} 16 | */ 17 | @Service 18 | <% if(kotlin){ %> 19 | open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { 20 | 21 | } 22 | <% }else{ %> 23 | public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { 24 | 25 | } 26 | <% } %> 27 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/serviceImpl.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.ServiceImpl}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${package.Mapper}.${table.mapperName}; 5 | import ${package.Service}.${table.serviceName}; 6 | import ${superServiceImplClassPackage}; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *11 | * ${table.comment!} 服务实现类 12 | *
13 | * 14 | * @author ${author} 15 | * @since ${date} 16 | */ 17 | @Service 18 | <#if kotlin> 19 | open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { 20 | 21 | } 22 | <#else> 23 | public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { 24 | 25 | } 26 | #if> 27 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/main/resources/templates/serviceImpl.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.ServiceImpl}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${package.Mapper}.${table.mapperName}; 5 | import ${package.Service}.${table.serviceName}; 6 | import ${superServiceImplClassPackage}; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *11 | * $!{table.comment} 服务实现类 12 | *
13 | * 14 | * @author ${author} 15 | * @since ${date} 16 | */ 17 | @Service 18 | #if(${kotlin}) 19 | open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { 20 | 21 | } 22 | #else 23 | public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { 24 | 25 | } 26 | #end 27 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-annotation-plus/src/test/java/com/jachs/mybatis/dao/generator/MapperDemo.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.dao.generator; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.jupiter.api.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import com.jachs.mybatis.Application; 10 | import com.jachs.mybatis.domain.Computer; 11 | import com.jachs.mybatis.service.ComputerService; 12 | 13 | /*** 14 | * 15 | * @author zhanchaohan 16 | * 17 | */ 18 | @SpringBootTest(classes = Application.class) 19 | public class MapperDemo { 20 | @Autowired 21 | private ComputerService computerService; 22 | 23 | @Test 24 | public void test1() { 25 | List13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-19 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("computer") 22 | public class ComputerEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId("computerId") 27 | private String computerId; 28 | 29 | @TableField("computerName") 30 | private String computerName; 31 | 32 | @TableField("computerPrice") 33 | private Long computerPrice; 34 | 35 | @TableField("madeTime") 36 | private LocalDateTime madeTime; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-cache/src/main/java/com/jachs/mybatis/cache/entity/SoftwareEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.cache.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | /** 11 | *12 | * 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-19 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @TableName("software") 21 | public class SoftwareEntity implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId("softWareId") 26 | private String softWareId; 27 | 28 | @TableField("softWareName") 29 | private String softWareName; 30 | 31 | @TableField("cFKId") 32 | private String cFKId; 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-cache/src/main/java/com/jachs/mybatis/cache/entity/dto/CpDto.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.cache.entity.dto; 2 | 3 | import java.util.Date; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | /*** 10 | * 11 | * @author zhanchaohan 12 | * 13 | */ 14 | @Data 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class CpDto { 18 | private String computerId; 19 | private String computerName; 20 | private Long computerPrice; 21 | private Date madeTime; 22 | 23 | private String softWareName; 24 | } 25 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-cache/src/main/java/com/jachs/mybatis/cache/mapper/ComputerMapper.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.cache.mapper; 2 | 3 | import com.jachs.mybatis.cache.MybatisPlusRedisCache; 4 | import com.jachs.mybatis.cache.entity.ComputerEntity; 5 | import com.jachs.mybatis.cache.entity.dto.CpDto; 6 | 7 | import java.util.List; 8 | 9 | import org.apache.ibatis.annotations.CacheNamespace; 10 | import org.apache.ibatis.annotations.Mapper; 11 | import org.apache.ibatis.annotations.Param; 12 | import org.apache.ibatis.annotations.Property; 13 | 14 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 15 | 16 | /** 17 | *18 | * Mapper 接口 19 | *
20 | * 21 | * @author zhanchaohan 22 | * @since 2022-07-19 23 | */ 24 | @Mapper 25 | @CacheNamespace(implementation= MybatisPlusRedisCache.class, 26 | eviction=MybatisPlusRedisCache.class,properties = { @Property(name = "timeout", value = "60000") }) 27 | public interface ComputerMapper extends BaseMapper14 | * Mapper 接口 15 | *
16 | * 17 | * @author zhanchaohan 18 | * @since 2022-07-19 19 | */ 20 | @Mapper 21 | public interface SoftwareMapper extends BaseMapper12 | * 服务类 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-19 17 | */ 18 | public interface IComputerService extends IService11 | * 服务类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-19 16 | */ 17 | public interface ISoftwareService extends IService15 | * 服务实现类 16 | *
17 | * 18 | * @author zhanchaohan 19 | * @since 2022-07-19 20 | */ 21 | @Service 22 | public class ComputerServiceImpl extends ServiceImpl14 | * 服务实现类 15 | *
16 | * 17 | * @author zhanchaohan 18 | * @since 2022-07-19 19 | */ 20 | @Service 21 | public class SoftwareServiceImpl extends ServiceImpl13 | * 14 | *
15 | * 16 | * @author zhanchaohan 17 | * @since 2022-07-19 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @TableName("computer") 22 | public class ComputerEntity implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId("computerId") 27 | private String computerId; 28 | 29 | @TableField("computerName") 30 | private String computerName; 31 | 32 | @TableField("computerPrice") 33 | private Long computerPrice; 34 | 35 | @TableField("madeTime") 36 | private LocalDateTime madeTime; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-redis-cache/src/main/java/com/jachs/mybatis/cache/entity/SoftwareEntity.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.cache.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import java.io.Serializable; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | /** 11 | *12 | * 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-19 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @TableName("software") 21 | public class SoftwareEntity implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId("softWareId") 26 | private String softWareId; 27 | 28 | @TableField("softWareName") 29 | private String softWareName; 30 | 31 | @TableField("cFKId") 32 | private String cFKId; 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-redis-cache/src/main/java/com/jachs/mybatis/cache/entity/dto/CpDto.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.cache.entity.dto; 2 | 3 | import java.util.Date; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | /*** 10 | * 11 | * @author zhanchaohan 12 | * 13 | */ 14 | @Data 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class CpDto { 18 | private String computerId; 19 | private String computerName; 20 | private Long computerPrice; 21 | private Date madeTime; 22 | 23 | private String softWareName; 24 | } 25 | -------------------------------------------------------------------------------- /j-mybatis/plus/j-mybatis-redis-cache/src/main/java/com/jachs/mybatis/cache/mapper/ComputerMapper.java: -------------------------------------------------------------------------------- 1 | package com.jachs.mybatis.cache.mapper; 2 | 3 | import com.jachs.mybatis.cache.entity.ComputerEntity; 4 | import com.jachs.mybatis.cache.entity.dto.CpDto; 5 | 6 | import java.util.List; 7 | 8 | import org.apache.ibatis.annotations.CacheNamespace; 9 | import org.apache.ibatis.annotations.Mapper; 10 | import org.apache.ibatis.annotations.Param; 11 | import org.apache.ibatis.annotations.Property; 12 | 13 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 14 | 15 | /** 16 | *17 | * Mapper 接口 18 | *
19 | * 20 | * @author zhanchaohan 21 | * @since 2022-07-19 22 | */ 23 | @Mapper 24 | @CacheNamespace(implementation = org.mybatis.caches.redis.RedisCache.class ,properties = { @Property(name = "timeout", value = "3") }) 25 | public interface ComputerMapper extends BaseMapper14 | * Mapper 接口 15 | *
16 | * 17 | * @author zhanchaohan 18 | * @since 2022-07-19 19 | */ 20 | @Mapper 21 | public interface SoftwareMapper extends BaseMapper12 | * 服务类 13 | *
14 | * 15 | * @author zhanchaohan 16 | * @since 2022-07-19 17 | */ 18 | public interface IComputerService extends IService11 | * 服务类 12 | *
13 | * 14 | * @author zhanchaohan 15 | * @since 2022-07-19 16 | */ 17 | public interface ISoftwareService extends IService15 | * 服务实现类 16 | *
17 | * 18 | * @author zhanchaohan 19 | * @since 2022-07-19 20 | */ 21 | @Service 22 | public class ComputerServiceImpl extends ServiceImpl14 | * 服务实现类 15 | *
16 | * 17 | * @author zhanchaohan 18 | * @since 2022-07-19 19 | */ 20 | @Service 21 | public class SoftwareServiceImpl extends ServiceImpl