RegisterProtocolV1ServiceDaoImplMapper.xml 3.0 KB

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