综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SysFormMapper.xml 3.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.system.mapper.SysFormMapper">
  6. <resultMap type="SysForm" id="SysFormResult">
  7. <result property="formId" column="form_id" />
  8. <result property="formName" column="form_name" />
  9. <result property="formContent" column="form_content" />
  10. <result property="createTime" column="create_time" />
  11. <result property="updateTime" column="update_time" />
  12. <result property="createBy" column="create_by" />
  13. <result property="updateBy" column="update_by" />
  14. <result property="remark" column="remark" />
  15. </resultMap>
  16. <sql id="selectSysFormVo">
  17. select form_id, form_name, form_content, create_time, update_time, create_by, update_by, remark from sys_form
  18. </sql>
  19. <select id="selectSysFormList" parameterType="SysForm" resultMap="SysFormResult">
  20. <include refid="selectSysFormVo"/>
  21. <where>
  22. <if test="formName != null and formName != ''"> and form_name like concat('%', #{formName}, '%')</if>
  23. <if test="formContent != null and formContent != ''"> and form_content = #{formContent}</if>
  24. </where>
  25. order by create_time desc
  26. </select>
  27. <select id="selectSysFormById" parameterType="Long" resultMap="SysFormResult">
  28. <include refid="selectSysFormVo"/>
  29. where form_id = #{formId}
  30. </select>
  31. <insert id="insertSysForm" parameterType="SysForm" useGeneratedKeys="true" keyProperty="formId">
  32. insert into sys_form
  33. <trim prefix="(" suffix=")" suffixOverrides=",">
  34. <if test="formName != null">form_name,</if>
  35. <if test="formContent != null">form_content,</if>
  36. <if test="createTime != null">create_time,</if>
  37. <if test="updateTime != null">update_time,</if>
  38. <if test="createBy != null">create_by,</if>
  39. <if test="updateBy != null">update_by,</if>
  40. <if test="remark != null">remark,</if>
  41. </trim>
  42. <trim prefix="values (" suffix=")" suffixOverrides=",">
  43. <if test="formName != null">#{formName},</if>
  44. <if test="formContent != null">#{formContent},</if>
  45. <if test="createTime != null">#{createTime},</if>
  46. <if test="updateTime != null">#{updateTime},</if>
  47. <if test="createBy != null">#{createBy},</if>
  48. <if test="updateBy != null">#{updateBy},</if>
  49. <if test="remark != null">#{remark},</if>
  50. </trim>
  51. </insert>
  52. <update id="updateSysForm" parameterType="SysForm">
  53. update sys_form
  54. <trim prefix="SET" suffixOverrides=",">
  55. <if test="formName != null">form_name = #{formName},</if>
  56. <if test="formContent != null">form_content = #{formContent},</if>
  57. <if test="createTime != null">create_time = #{createTime},</if>
  58. <if test="updateTime != null">update_time = #{updateTime},</if>
  59. <if test="createBy != null">create_by = #{createBy},</if>
  60. <if test="updateBy != null">update_by = #{updateBy},</if>
  61. <if test="remark != null">remark = #{remark},</if>
  62. </trim>
  63. where form_id = #{formId}
  64. </update>
  65. <delete id="deleteSysFormById" parameterType="Long">
  66. delete from sys_form where form_id = #{formId}
  67. </delete>
  68. <delete id="deleteSysFormByIds" parameterType="String">
  69. delete from sys_form where form_id in
  70. <foreach item="formId" collection="array" open="(" separator="," close=")">
  71. #{formId}
  72. </foreach>
  73. </delete>
  74. </mapper>