Home > database >  Spring boot in the two fields in the database with mybatis characters together
Spring boot in the two fields in the database with mybatis characters together

Time:10-06

List two fields with HH and MM, excuse me how in the mapping file according to the id of the the result is that the HH + Chinese + MM combined to a new field? How to implement in XML resultMap? How do you write SQL?
Inside information is as follows:
Id name age money HH MM
001 zhang 25 130 8 13
In order to achieve the effect of is: according to the id, the query result is: 13 at 8 o 'clock

CodePudding user response:

In the class defines a field: MyTime, getMyTime return in HH + "points" + MM

CodePudding user response:

Hello World, 1/f, reference response:
in class defines a field: MyTime, getMyTime return in HH + "points" + MM

What to need to add it in the SQL? How do you write XML mapping file resultmap?

CodePudding user response:

Need not how change, select * from XXX will do

CodePudding user response:

The
Hello World reference 3 floor, response:
need not how change, select * from XXX can

I try, thank you
  • Related