choose
Format:
<choose>
<when test=condition 1>
the code executed;
</when>
<when test=condition 2>
the code executed;
</when>
......
<otherwise>
the code executed;
</when>
</otherwise>
</choose>
Note: until the condition is established, other judgments will not be implemented
————————————————
First, check whether there is a record in the database according to the value of a certain field, update it if it exists, and insert it if it does not.
ON DUPLICATE key update
————————————————————————————————