NewsMapper.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.minpay.db.table.own.mapper.NewsMapper">
  4. <select id="newsManageQuery" resultType="hashmap" parameterType="java.util.Map">
  5. SELECT AIF_ID "id",
  6. AIF_TITLE "title",
  7. AIF_CONTENT "content",
  8. AIF_MODULE "module",
  9. AIF_STATUS "status",
  10. AIF_IMG_SHOW "imgShow",
  11. AIF_CREATEUSER "createuser",
  12. AIF_CREATETIME "createtime",
  13. AIF_MODIFYUSER "modifyuser",
  14. AIF_MODIFYTIME "modifytime"
  15. FROM tp_article_inf a
  16. WHERE AIF_STATUS = '0'
  17. and AIF_MODULE = '04'
  18. <if test="titleId != null and titleId != ''">
  19. and AIF_TITLE like concat('%',#{titleId,jdbcType=VARCHAR},'%')
  20. </if>
  21. <if test="strDate !=null and strDate != ''">
  22. and substr(AIF_CREATETIME,1,8) between substr((#{strDate, jdbcType=VARCHAR}),1,8)
  23. and substr((#{strDate, jdbcType=VARCHAR}),12,19)
  24. </if>
  25. </select>
  26. <select id="queryOtherNews" resultType="hashmap" parameterType="java.util.Map">
  27. SELECT AIF_ID "id",
  28. AIF_TITLE "title",
  29. AIF_CONTENT "content",
  30. AIF_MODULE "module",
  31. AIF_STATUS "status",
  32. AIF_IMG_SHOW "imgShow",
  33. b.FRS_FILE_URL "imgUrl",
  34. AIF_CREATEUSER "createuser",
  35. AIF_CREATETIME "createtime",
  36. AIF_MODIFYUSER "modifyuser",
  37. AIF_MODIFYTIME "modifytime"
  38. FROM tp_article_inf a, pub_file_resources b
  39. WHERE AIF_STATUS = '0'
  40. and a.AIF_IMG_URL = b.FRS_NO
  41. and AIF_MODULE in ('00', '01', '02')
  42. <if test="titleId != null and titleId != ''">
  43. and AIF_TITLE like concat('%',#{titleId,jdbcType=VARCHAR},'%')
  44. </if>
  45. <if test="strDate !=null and strDate != ''">
  46. and substr(AIF_CREATETIME,1,8) between substr((#{strDate, jdbcType=VARCHAR}),1,8)
  47. and substr((#{strDate, jdbcType=VARCHAR}),12,19)
  48. </if>
  49. </select>
  50. </mapper>