FeePrintSpecServiceDaoImplMapper.xml 3.5 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="feePrintSpecServiceDaoImpl">
  6. <!-- 保存打印说明信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeePrintSpecInfo" parameterType="Map">
  8. insert into fee_print_spec(
  9. print_id,content,spec_cd,community_id,qr_img,print_name
  10. ) values (
  11. #{printId},#{content},#{specCd},#{communityId},#{qrImg},#{printName}
  12. )
  13. </insert>
  14. <!-- 查询打印说明信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeePrintSpecInfo" parameterType="Map" resultType="Map">
  16. select t.print_id,t.print_id printId,t.content,t.spec_cd,t.spec_cd
  17. specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,
  18. t.qr_img,t.qr_img qrImg,t.print_name printName
  19. from fee_print_spec t
  20. where 1 =1
  21. <if test="printId !=null and printId != ''">
  22. and t.print_id= #{printId}
  23. </if>
  24. <if test="content !=null and content != ''">
  25. and t.content= #{content}
  26. </if>
  27. <if test="specCd !=null and specCd != ''">
  28. and t.spec_cd= #{specCd}
  29. </if>
  30. <if test="statusCd !=null and statusCd != ''">
  31. and t.status_cd= #{statusCd}
  32. </if>
  33. <if test="communityId !=null and communityId != ''">
  34. and t.community_id= #{communityId}
  35. </if>
  36. <if test="qrImg !=null and qrImg != ''">
  37. and t.qr_img= #{qrImg}
  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="updateFeePrintSpecInfo" parameterType="Map">
  46. update fee_print_spec t set t.status_cd = #{statusCd}
  47. <if test="newBId != null and newBId != ''">
  48. ,t.b_id = #{newBId}
  49. </if>
  50. <if test="content !=null">
  51. , t.content= #{content}
  52. </if>
  53. <if test="specCd !=null and specCd != ''">
  54. , t.spec_cd= #{specCd}
  55. </if>
  56. <if test="communityId !=null and communityId != ''">
  57. , t.community_id= #{communityId}
  58. </if>
  59. <if test="qrImg !=null">
  60. , t.qr_img= #{qrImg}
  61. </if>
  62. <if test="printName !=null and printName != ''">
  63. , t.print_name= #{printName}
  64. </if>
  65. where 1=1
  66. <if test="printId !=null and printId != ''">
  67. and t.print_id= #{printId}
  68. </if>
  69. </update>
  70. <!-- 查询打印说明数量 add by wuxw 2018-07-03 -->
  71. <select id="queryFeePrintSpecsCount" parameterType="Map" resultType="Map">
  72. select count(1) count
  73. from fee_print_spec t
  74. where 1 =1
  75. <if test="printId !=null and printId != ''">
  76. and t.print_id= #{printId}
  77. </if>
  78. <if test="content !=null and content != ''">
  79. and t.content= #{content}
  80. </if>
  81. <if test="specCd !=null and specCd != ''">
  82. and t.spec_cd= #{specCd}
  83. </if>
  84. <if test="statusCd !=null and statusCd != ''">
  85. and t.status_cd= #{statusCd}
  86. </if>
  87. <if test="communityId !=null and communityId != ''">
  88. and t.community_id= #{communityId}
  89. </if>
  90. <if test="qrImg !=null and qrImg != ''">
  91. and t.qr_img= #{qrImg}
  92. </if>
  93. </select>
  94. </mapper>