当前位置:网站首页>Internship: business process introduction

Internship: business process introduction

2022-06-28 00:25:00 ahyo

One . What is? AbstractWrapper
QueryWrapper(LambdaQueryWrapper) and UpdateWrapper(LambdaUpdateWrapper) Parent class of
Used to generate sql Of where Conditions , entity Properties are also used to generate sql Of where Conditions
Be careful : entity Generated where Conditions and Use each api Generated where The condition has no associated behavior

Wrapper:
Wrapper : Conditionally construct abstract classes , Top parent class , Provided in an abstract class 4 A way
AbstractWrapper : Used to encapsulate query conditions , Generate sql Of where Conditions
AbstractLambdaWrapper : Lambda Grammar use Wrapper Unified processing and parsing lambda obtain column.
LambdaQueryWrapper : You can see that the name is used for Lambda Query used by syntax Wrapper
LambdaUpdateWrapper : Lambda Update package Wrapper
QueryWrapper : Entity Object encapsulates the operation class , Not with lambda grammar
UpdateWrapper : Update Conditional encapsulation , be used for Entity Object update operation

Besides , understand MyBatis The use of is not enough Enterprises use more MyBaits-plus, So I went to the official documents to check the usage of relevant classes and methods .

Mybatis-plus Tool class ——SimpleQuery Tool class
explain :

Yes selectList The result of the query is Stream Stream has some encapsulation , So that it can return some specified results , It's simple api Call to
The corresponding entity has been injected into the project BaseMapper
Please refer to : The test case (opens new window)

 For the following parameters peeks, The type of Consumer..., You can stack operations all the way back, such as :List<Long> ids = SimpleQuery.list(Wrappers.lambdaQuery(), Entity::getId, System.out::println, user -> userNames.add(user.getName()));

Be familiar with the business process of the company :
1、 Familiar with database table structure and project code , First write an interface by yourself
2、 According to the interface document Interface adjustment
Then I learned from my further practice that ——swagger and MyBatis-plus You need to learn to understand .

Table structure Is the field name and its data type It has nothing to do with the availability of data .

原网站

版权声明
本文为[ahyo]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/179/202206272150180671.html