FeePrintPageV1ServiceDaoImplMapper.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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="feePrintPageV1ServiceDaoImpl">
  6. <!-- 保存收据模板信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeePrintPageInfo" parameterType="Map">
  8. insert into fee_print_page(
  9. page_url,state,page_id,community_id,page_name
  10. ) values (
  11. #{pageUrl},#{state},#{pageId},#{communityId},#{pageName}
  12. )
  13. </insert>
  14. <!-- 查询收据模板信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeePrintPageInfo" parameterType="Map" resultType="Map">
  16. select t.page_url,t.page_url pageUrl,t.status_cd,t.status_cd statusCd,t.state,t.page_id,t.page_id
  17. pageId,t.community_id,t.community_id communityId,t.page_name,t.page_name pageName,pt.name templateName,pt.url
  18. from fee_print_page t
  19. LEFT JOIN fee_print_page_template pt on t.page_url = pt.template_id and pt.status_cd = '0'
  20. where 1 =1
  21. <if test="pageUrl !=null and pageUrl != ''">
  22. and t.page_url= #{pageUrl}
  23. </if>
  24. <if test="statusCd !=null and statusCd != ''">
  25. and t.status_cd= #{statusCd}
  26. </if>
  27. <if test="state !=null and state != ''">
  28. and t.state= #{state}
  29. </if>
  30. <if test="pageId !=null and pageId != ''">
  31. and t.page_id= #{pageId}
  32. </if>
  33. <if test="communityId !=null and communityId != ''">
  34. and t.community_id= #{communityId}
  35. </if>
  36. <if test="pageName !=null and pageName != ''">
  37. and t.page_name= #{pageName}
  38. </if>
  39. order by t.create_time desc
  40. <if test="page != -1 and page != null ">
  41. limit #{page}, #{row}
  42. </if>
  43. </select>
  44. <!-- 修改收据模板信息 add by wuxw 2018-07-03 -->
  45. <update id="updateFeePrintPageInfo" parameterType="Map">
  46. update fee_print_page t set t.status_cd = #{statusCd}
  47. <if test="newBId != null and newBId != ''">
  48. ,t.b_id = #{newBId}
  49. </if>
  50. <if test="pageUrl !=null and pageUrl != ''">
  51. , t.page_url= #{pageUrl}
  52. </if>
  53. <if test="state !=null and state != ''">
  54. , t.state= #{state}
  55. </if>
  56. <if test="pageName !=null and pageName != ''">
  57. , t.page_name= #{pageName}
  58. </if>
  59. where 1=1
  60. <if test="queryStatusCd !=null and queryStatusCd != ''">
  61. and t.status_cd= #{queryStatusCd}
  62. </if>
  63. <if test="pageId !=null and pageId != ''">
  64. and t.page_id= #{pageId}
  65. </if>
  66. <if test="communityId !=null and communityId != ''">
  67. and t.community_id= #{communityId}
  68. </if>
  69. </update>
  70. <!-- 查询收据模板数量 add by wuxw 2018-07-03 -->
  71. <select id="queryFeePrintPagesCount" parameterType="Map" resultType="Map">
  72. select count(1) count
  73. from fee_print_page t
  74. where 1 =1
  75. <if test="pageUrl !=null and pageUrl != ''">
  76. and t.page_url= #{pageUrl}
  77. </if>
  78. <if test="statusCd !=null and statusCd != ''">
  79. and t.status_cd= #{statusCd}
  80. </if>
  81. <if test="state !=null and state != ''">
  82. and t.state= #{state}
  83. </if>
  84. <if test="pageId !=null and pageId != ''">
  85. and t.page_id= #{pageId}
  86. </if>
  87. <if test="communityId !=null and communityId != ''">
  88. and t.community_id= #{communityId}
  89. </if>
  90. <if test="pageName !=null and pageName != ''">
  91. and t.page_name= #{pageName}
  92. </if>
  93. </select>
  94. </mapper>