PositionMapper.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  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.ruoyi.web.work.mapper.PositionMapper">
  6. <select id="selectList" resultType="com.ruoyi.web.work.domain.Position">
  7. select * from tb_position
  8. <where>
  9. <if test="userId != null "> and user_id = #{userId}</if>
  10. <if test="type != null "> and type = #{type}</if>
  11. <if test="title != null and title != ''"> and title like concat('%', #{name}, '%')</if>
  12. </where>
  13. </select>
  14. <select id="manageList" resultType="com.ruoyi.web.work.domain.Position">
  15. select * from tb_position
  16. <where>
  17. <if test="userId != null "> and user_id = #{userId}</if>
  18. <if test="type != null "> and type = #{type}</if>
  19. <if test="audit != null "> and audit = #{audit}</if>
  20. <if test="title != null and title != ''"> and title like concat('%', #{name}, '%')</if>
  21. </where>
  22. </select>
  23. <select id="indexList" resultType="com.ruoyi.web.work.domain.Position">
  24. SELECT
  25. *
  26. FROM
  27. tb_position
  28. WHERE
  29. state = 0
  30. AND audit = 1
  31. AND type = #{type}
  32. <if test="title != null and title != ''"> and title like concat('%', #{name}, '%')</if>
  33. </select>
  34. </mapper>