Dynamic SQL of MyBatis

Disclaimer: The materials used in this column are written by VIP students of Kaige Academy. Students have the right to remain anonymous and have the right to final interpretation of the article. Kaige Academy aims to promote VIP students to learn from each other based on public notes.

Dynamic SQL of MyBatis

Operation of dynamic sql+ account amount
Generally, if it is a delete statement, we delete it according to the primary key, because the primary key is unique.

Sum() query
When we query the total statistics, it may return null, so you can't use the basic data type to receive, you should use the encapsulated type to receive data, if you use the basic type, a null pointer error will be reported

image

image

image

image

image

image

image

dynamic sql operation

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324464047&siteId=291194637