WfTextbookClaimMapper.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.textbook.mapper.WfTextbookClaimMapper">
  6. <select id="getPage" parameterType="com.xjrsoft.module.textbook.dto.WfTextbookClaimPageDto"
  7. resultType="com.xjrsoft.module.textbook.vo.WfTextbookClaimPageVo">
  8. SELECT
  9. t.*,
  10. t1.name as applicantUserIdCN,
  11. t2.name as classIdCN,
  12. t3.name as baseSemesterIdCN,
  13. t4.name as studentUserIdCN,
  14. t5.name as claimTypeCN,
  15. t6.user_id,
  16. t7.name as claimUserIdCN
  17. FROM wf_textbook_claim t
  18. LEFT JOIN xjr_user t1 ON (t1.id = t.applicant_user_id)
  19. LEFT JOIN base_class t2 ON (t2.id = t.class_id)
  20. LEFT JOIN base_semester t3 ON (t3.id = t.base_semester_id)
  21. LEFT JOIN xjr_user t4 ON (t4.id = t.student_user_id)
  22. LEFT JOIN xjr_dictionary_detail t5 ON (t5.code = t.claim_type)
  23. LEFT JOIN textbook_claim_user t6 ON (t6.wf_textbook_claim_id = t.id)
  24. LEFT JOIN xjr_user t7 ON (t7.id = t6.user_id)
  25. WHERE t.delete_mark = 0 and t6.user_id = #{dto.userId}
  26. order by t.create_date desc;
  27. </select>
  28. <select id="infoDistribute" parameterType="java.lang.Long"
  29. resultType="com.xjrsoft.module.textbook.vo.WfTextbookClaimVo">
  30. SELECT
  31. t.*,
  32. t1.name as applicantUserIdCN,
  33. t2.name as classIdCN,
  34. t3.name as baseSemesterIdCN,
  35. t4.name as studentUserIdCN,
  36. t5.name as claimTypeCN,
  37. t7.name as claimUserIdCN
  38. FROM wf_textbook_claim t
  39. LEFT JOIN xjr_user t1 ON (t1.id = t.applicant_user_id)
  40. LEFT JOIN base_class t2 ON (t2.id = t.class_id)
  41. LEFT JOIN base_semester t3 ON (t3.id = t.base_semester_id)
  42. LEFT JOIN xjr_user t4 ON (t4.id = t.student_user_id)
  43. LEFT JOIN xjr_dictionary_detail t5 ON (t5.code = t.claim_type)
  44. LEFT JOIN textbook_claim_user t6 ON (t6.id = t.claim_user_id)
  45. LEFT JOIN xjr_user t7 ON (t7.id = t6.user_id)
  46. WHERE t.delete_mark = 0 and t.id = #{id}
  47. order by t.id;
  48. </select>
  49. </mapper>