FeePrintPageTemplateV1ServiceDaoImplMapper.xml 2.6 KB

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="feePrintPageTemplateV1ServiceDaoImpl">
  6. <!-- 保存收据模板信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeePrintPageTemplateInfo" parameterType="Map">
  8. insert into fee_print_page_template(
  9. name,template_id,url
  10. ) values (
  11. #{name},#{templateId},#{url}
  12. )
  13. </insert>
  14. <!-- 查询收据模板信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeePrintPageTemplateInfo" parameterType="Map" resultType="Map">
  16. select t.name,t.status_cd,t.status_cd statusCd,t.template_id,t.template_id templateId,t.url
  17. from fee_print_page_template t
  18. where 1 =1
  19. <if test="name !=null and name != ''">
  20. and t.name= #{name}
  21. </if>
  22. <if test="statusCd !=null and statusCd != ''">
  23. and t.status_cd= #{statusCd}
  24. </if>
  25. <if test="templateId !=null and templateId != ''">
  26. and t.template_id= #{templateId}
  27. </if>
  28. <if test="url !=null and url != ''">
  29. and t.url= #{url}
  30. </if>
  31. order by t.create_time desc
  32. <if test="page != -1 and page != null ">
  33. limit #{page}, #{row}
  34. </if>
  35. </select>
  36. <!-- 修改收据模板信息 add by wuxw 2018-07-03 -->
  37. <update id="updateFeePrintPageTemplateInfo" parameterType="Map">
  38. update fee_print_page_template t set t.status_cd = #{statusCd}
  39. <if test="newBId != null and newBId != ''">
  40. ,t.b_id = #{newBId}
  41. </if>
  42. <if test="name !=null and name != ''">
  43. , t.name= #{name}
  44. </if>
  45. <if test="url !=null and url != ''">
  46. , t.url= #{url}
  47. </if>
  48. where 1=1
  49. <if test="templateId !=null and templateId != ''">
  50. and t.template_id= #{templateId}
  51. </if>
  52. </update>
  53. <!-- 查询收据模板数量 add by wuxw 2018-07-03 -->
  54. <select id="queryFeePrintPageTemplatesCount" parameterType="Map" resultType="Map">
  55. select count(1) count
  56. from fee_print_page_template t
  57. where 1 =1
  58. <if test="name !=null and name != ''">
  59. and t.name= #{name}
  60. </if>
  61. <if test="statusCd !=null and statusCd != ''">
  62. and t.status_cd= #{statusCd}
  63. </if>
  64. <if test="templateId !=null and templateId != ''">
  65. and t.template_id= #{templateId}
  66. </if>
  67. <if test="url !=null and url != ''">
  68. and t.url= #{url}
  69. </if>
  70. </select>
  71. </mapper>