TBArchivesSignInMapper.xml 1.2 KB

1234567891011121314151617181920212223242526272829
  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.daju.mix.dao.mapper.TBArchivesSignInMapper">
  4. <resultMap type="com.daju.mix.dao.entity.TBArchivesSignIn" id="TBArchivesSignInMap"/>
  5. <select id="selectId" resultType="String">
  6. SELECT id
  7. from t_b_archives_sign_in
  8. where id = (select max(id) from t_b_archives_sign_in)
  9. </select>
  10. <resultMap type="com.daju.mix.dto.AllElements" id="AllElements"/>
  11. <select id="allElementsBySignIn" resultMap="AllElements">
  12. select tbarsi.code id,
  13. cim_longitude longitude,
  14. cim_latitude latitude,
  15. height altitude,
  16. tbca.status warningState,
  17. tbca.content warningMessage,
  18. 12 type,
  19. expected_completion time,
  20. max(tbca.create_date)
  21. from t_b_archives_sign_in tbarsi
  22. left join t_b_car_alarm tbca on tbarsi.code = tbca.archive_id
  23. where tbarsi.type = 3
  24. group by tbarsi.id;
  25. </select>
  26. </mapper>