AlumniClubApplyMapper.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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.template.mapper.AlumniClubApplyMapper">
  4. <resultMap type="com.template.model.vo.ApplyClubVo" id="ClubDataApplyMap">
  5. <result property="id" column="id"/>
  6. <result property="applyName" column="apply_name"/>
  7. <result property="collegeName" column="college_name"/>
  8. <result property="periodName" column="period_name"/>
  9. <result property="majorName" column="major_name"/>
  10. <result property="className" column="class_name"/>
  11. <result property="name" column="name"/>
  12. <result property="applyUserName" column="apply_user_name"/>
  13. <result property="isPass" column="is_pass"/>
  14. <result property="passTime" column="pass_time"/>
  15. <result property="createTime" column="create_time"/>
  16. <result property="passValue" column="pass_value"/>
  17. </resultMap>
  18. <select id="queryClubApplys" resultType="com.template.model.vo.ApplyClubVo" resultMap="ClubDataApplyMap">
  19. select aca.id,au.name as apply_name,au.college_name,aca.apply_user_name,au.period_name,au.major_name,au.class_name,aca.name,aca.is_pass,aca.update_time as pass_time,aca.create_time,aca.pass_value
  20. from alumni_club_apply aca
  21. inner join alumni_user au on au.deleted = 0 and au.id = aca.create_user
  22. <if test="userName != null and userName != ''">
  23. and au.name like '%' #{userName} '%'
  24. </if>
  25. <if test="collegeId != null and collegeId != 0">
  26. and au.college_id = #{collegeId}
  27. </if>
  28. <if test="periodId != null and periodId != 0">
  29. and au.period_id = #{periodId}
  30. </if>
  31. <if test="majorId != null and majorId != 0">
  32. and au.major_id = #{majorId}
  33. </if>
  34. <if test="classId != null and classId != 0">
  35. and au.class_id = #{classId}
  36. </if>
  37. where aca.deleted= 0
  38. <if test="name != null and name != ''">
  39. and aca.name like '%' #{name} '%'
  40. </if>
  41. <if test="isPass != null and isPass != 0">
  42. and aca.is_pass = #{isPass}
  43. </if>
  44. <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
  45. and aca.create_time BETWEEN #{startTime} AND #{endTime}
  46. </if>
  47. <if test="userId != null and userId != 0">
  48. and FIND_IN_SET(${userId},aca.apply_user)
  49. </if>
  50. </select>
  51. <select id="queryClubExcelApplys" resultType="com.template.model.vo.ApplyClubVo" resultMap="ClubDataApplyMap">
  52. select aca.id,au.name as apply_name,au.college_name,aca.apply_user_name,au.period_name,au.major_name,au.class_name,aca.name,aca.is_pass,aca.update_time as pass_time,aca.create_time,aca.pass_value
  53. from alumni_club_apply aca
  54. inner join alumni_user au on au.deleted = 0 and au.id = aca.create_user
  55. <if test="userName != null and userName != ''">
  56. and au.name like '%' #{userName} '%'
  57. </if>
  58. <if test="collegeId != null and collegeId != 0">
  59. and au.college_id = #{collegeId}
  60. </if>
  61. <if test="periodId != null and periodId != 0">
  62. and au.period_id = #{periodId}
  63. </if>
  64. <if test="majorId != null and majorId != 0">
  65. and au.major_id = #{majorId}
  66. </if>
  67. <if test="classId != null and classId != 0">
  68. and au.class_id = #{classId}
  69. </if>
  70. where aca.deleted= 0
  71. <if test="name != null and name != ''">
  72. and aca.name like '%' #{name} '%'
  73. </if>
  74. <if test="isPass != null and isPass != 0">
  75. and aca.is_pass = #{isPass}
  76. </if>
  77. <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
  78. and aca.create_time BETWEEN #{startTime} AND #{endTime}
  79. </if>
  80. <if test="userId != null and userId != 0">
  81. and FIND_IN_SET(${userId},aca.apply_user)
  82. </if>
  83. </select>
  84. <select id="queryMyClubApplys" resultType="com.template.model.vo.ApplyClubVo" resultMap="ClubDataApplyMap">
  85. select aca.club_id as id,au.name as apply_name,au.college_name,au.period_name,au.major_name,au.class_name,aca.name,aca.is_pass,aca.update_time as pass_time,aca.create_time,aca.pass_value
  86. from alumni_club_apply aca
  87. inner join alumni_user au on au.deleted = 0 and au.id = aca.create_user
  88. where aca.deleted= 0
  89. <if test="name != null and name != ''">
  90. and aca.name like '%' #{name} '%'
  91. </if>
  92. <if test="userId != null and userId != 0">
  93. and aca.create_user = #{userId}
  94. </if>
  95. </select>
  96. <select id="queryApproveClubApplys" resultType="com.template.model.vo.ApplyClubVo" resultMap="ClubDataApplyMap">
  97. select aca.id,au.name as apply_name,au.college_name,au.period_name,au.major_name,au.class_name,aca.name,aca.is_pass,aca.update_time as pass_time,aca.create_time,aca.pass_value
  98. from alumni_club_apply aca
  99. inner join alumni_user au on au.deleted = 0 and au.id = aca.create_user
  100. where aca.deleted= 0 and aca.is_pass = 1
  101. <if test="name != null and name != ''">
  102. and aca.name like '%' #{name} '%'
  103. </if>
  104. <if test="userId != null and userId != 0">
  105. and FIND_IN_SET(${userId},aca.apply_user)
  106. </if>
  107. order by aca.create_time desc
  108. </select>
  109. </mapper>