PositionCQuery.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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.bowintek.practice.mapper.cquery.PositionCQuery">
  4. <select id="getList" resultType="com.bowintek.practice.vo.PositionModel">
  5. select pos.* from cf_position pos
  6. where 1=1
  7. <if test="schoolYearID!='' and schoolYearID!=null">
  8. and pos.schoolYearID = #{schoolYearID}
  9. </if>
  10. <if test="majorGradeID!='' and majorGradeID!=null">
  11. and pos.majorGradeID = #{majorGradeID}
  12. </if>
  13. <if test="practiceBaseTypeID!='' and practiceBaseTypeID!=null">
  14. and base.PracticeBaseTypeID = #{practiceBaseTypeID}
  15. </if>
  16. <if test="name!='' and name!=null">
  17. and pos.name like Concat('%',#{name},'%')
  18. </if>
  19. <if test="practiceBaseName!='' and practiceBaseName!=null">
  20. and base.name like Concat('%',#{practiceBaseName},'%')
  21. </if>
  22. <if test="positionID!='' and positionID!=null">
  23. and pos.positionID = #{positionID}
  24. </if>
  25. <if test="isPostManage!=null and isPostManage">
  26. </if>
  27. <if test="baseStatus!=null and baseStatus!=''">
  28. and base.recordStatus = #{baseStatus}
  29. </if>
  30. <if test="positionIdList!=null and positionIdList!=''">
  31. and pos.positionID in(${positionIdList})
  32. </if>
  33. order by CreateTime desc
  34. </select>
  35. <insert id="batchInsertPosition">
  36. insert into cf_position(PositionID,MajorGradeID,PracticeBaseID,Name,Qty,Remark,RecordStatus,CreateBy,CreateTime,SchoolYearID,ArrangementID)
  37. values
  38. <foreach collection="dataList" item="item" separator=",">
  39. (#{item.positionID},#{item.majorGradeID},#{item.practiceBaseID},#{item.name},#{item.qty},#{item.remark},#{item.recordStatus},#{item.createBy},#{item.createTime},#{item.schoolYearID},#{item.arrangementID})
  40. </foreach>
  41. </insert>
  42. </mapper>