EnumMenuItemMapper.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.predict.mapper.EnumMenuItemMapper">
  6. <resultMap type="EnumMenuItem" id="EnumMenuItemResult">
  7. <result property="menuNo" column="menu_no"/>
  8. <result property="itemNo" column="item_no"/>
  9. <result property="itemName" column="item_name"/>
  10. <result property="itemVal" column="item_val"/>
  11. </resultMap>
  12. <sql id="selectEnumMenuItemVo">
  13. select menu_no, item_no, item_name, item_val from enum_menu_item
  14. </sql>
  15. <select id="selectEnumMenuItemList" parameterType="EnumMenuItem" resultMap="EnumMenuItemResult">
  16. <include refid="selectEnumMenuItemVo"/>
  17. <where>
  18. <if test="menuNo != null ">and menu_no = #{menuNo}</if>
  19. <if test="itemNo != null ">and item_no = #{itemNo}</if>
  20. <if test="itemName != null and itemName != ''">and item_name like concat(concat('%', #{itemName}), '%')
  21. </if>
  22. <if test="itemVal != null ">and item_val = #{itemVal}</if>
  23. </where>
  24. </select>
  25. <select id="selectEnumMenuItemById" parameterType="Long" resultMap="EnumMenuItemResult">
  26. <include refid="selectEnumMenuItemVo"/>
  27. where item_no = #{itemNo}
  28. </select>
  29. <select id="selectEnumMenuItemByMenuNo" parameterType="Long" resultMap="EnumMenuItemResult">
  30. <include refid="selectEnumMenuItemVo"/>
  31. where menu_no = #{menuNo} and item_no = #{itemNo}
  32. </select>
  33. <select id="selectEnumMenuItemByMenuNoList" parameterType="Long" resultMap="EnumMenuItemResult">
  34. <include refid="selectEnumMenuItemVo"/>
  35. where menu_no = #{menuNo}
  36. </select>
  37. </mapper>