if in the business layer, within a transaction, there is an if judgment
read in the database first, judge according to the result if else, and then read / write to the database
and there are if else statements within the mysql database
if you are in the business tier, you need to send two sql requests
to the database and put them inside the database, then you only need to send the sql statement once
which is better?