OrderMapper.xml 827 B

1234567891011121314151617181920
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.qmrb.system.mapper.OrderMapper">
  4. <select id="getPageByUserId" parameterType="com.qmrb.system.pojo.query.PayOrderQuery"
  5. resultType="com.qmrb.system.pojo.vo.PayOrderVO">
  6. select
  7. po.*,
  8. br.car_park_id,
  9. br.car_number,
  10. br.in_time
  11. from pay_order po
  12. INNER JOIN barn_record br on po.good_id = br.id
  13. where br.car_number = (select plate_number
  14. from my_car_plate_number
  15. where user_id = #{queryParams.userId}
  16. order by create_time desc limit 1
  17. )
  18. </select>
  19. </mapper>