综合办公系统
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CmcPostSalaryMapper.xml 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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.oa.mapper.CmcPostSalaryMapper">
  6. <resultMap type="CmcPostSalary" id="CmcPostSalaryResult">
  7. <result property="salaryId" column="salary_id" />
  8. <result property="postLevel" column="post_level" />
  9. <result property="salaryLevel" column="salary_level" />
  10. <result property="salary" column="salary" />
  11. </resultMap>
  12. <sql id="selectCmcPostSalaryVo">
  13. select salary_id, post_level, salary_level, salary from cmc_post_salary
  14. </sql>
  15. <select id="selectCmcPostSalaryList" parameterType="CmcPostSalary" resultMap="CmcPostSalaryResult">
  16. <include refid="selectCmcPostSalaryVo"/>
  17. <where>
  18. <if test="postLevel != null and postLevel != ''"> and post_level = #{postLevel}</if>
  19. <if test="salaryLevel != null and salaryLevel != ''"> and salary_level = #{salaryLevel}</if>
  20. <if test="salary != null "> and salary = #{salary}</if>
  21. </where>
  22. </select>
  23. <select id="selectCmcPostSalaryBySalaryId" parameterType="Integer" resultMap="CmcPostSalaryResult">
  24. <include refid="selectCmcPostSalaryVo"/>
  25. where salary_id = #{salaryId}
  26. </select>
  27. <insert id="insertCmcPostSalary" parameterType="CmcPostSalary" useGeneratedKeys="true" keyProperty="salaryId">
  28. insert into cmc_post_salary
  29. <trim prefix="(" suffix=")" suffixOverrides=",">
  30. <if test="postLevel != null">post_level,</if>
  31. <if test="salaryLevel != null">salary_level,</if>
  32. <if test="salary != null">salary,</if>
  33. </trim>
  34. <trim prefix="values (" suffix=")" suffixOverrides=",">
  35. <if test="postLevel != null">#{postLevel},</if>
  36. <if test="salaryLevel != null">#{salaryLevel},</if>
  37. <if test="salary != null">#{salary},</if>
  38. </trim>
  39. </insert>
  40. <update id="updateCmcPostSalary" parameterType="CmcPostSalary">
  41. update cmc_post_salary
  42. <trim prefix="SET" suffixOverrides=",">
  43. <if test="postLevel != null">post_level = #{postLevel},</if>
  44. <if test="salaryLevel != null">salary_level = #{salaryLevel},</if>
  45. <if test="salary != null">salary = #{salary},</if>
  46. </trim>
  47. where salary_id = #{salaryId}
  48. </update>
  49. <delete id="deleteCmcPostSalaryBySalaryId" parameterType="Integer">
  50. delete from cmc_post_salary where salary_id = #{salaryId}
  51. </delete>
  52. <delete id="deleteCmcPostSalaryBySalaryIds" parameterType="String">
  53. delete from cmc_post_salary where salary_id in
  54. <foreach item="salaryId" collection="array" open="(" separator="," close=")">
  55. #{salaryId}
  56. </foreach>
  57. </delete>
  58. </mapper>