MappingDomainV1ServiceDaoImplMapper.xml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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="mappingDomainV1ServiceDaoImpl">
  6. <!-- 保存配置项信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveMappingDomainInfo" parameterType="Map">
  8. insert into c_mapping_domain(
  9. domain,remark,id,seq,domain_name
  10. ) values (
  11. #{domain},#{remark},#{id},#{seq},#{domainName}
  12. )
  13. </insert>
  14. <!-- 查询配置项信息 add by wuxw 2018-07-03 -->
  15. <select id="getMappingDomainInfo" parameterType="Map" resultType="Map">
  16. select t.domain,t.remark,t.status_cd,t.status_cd statusCd,t.id,t.seq,t.domain_name domainName
  17. from c_mapping_domain t
  18. where 1 =1
  19. <if test="domain !=null and domain != ''">
  20. and t.domain= #{domain}
  21. </if>
  22. <if test="domainName !=null and domainName != ''">
  23. and t.domain_name = #{domainName}
  24. </if>
  25. <if test="domainNameLike !=null and domainNameLike != ''">
  26. and t.domain_name like concat('%',#{domainNameLike},'%')
  27. </if>
  28. <if test="remark !=null and remark != ''">
  29. and t.remark= #{remark}
  30. </if>
  31. <if test="statusCd !=null and statusCd != ''">
  32. and t.status_cd= #{statusCd}
  33. </if>
  34. <if test="id !=null and id != ''">
  35. and t.id= #{id}
  36. </if>
  37. <if test="seq !=null and seq != ''">
  38. and t.seq= #{seq}
  39. </if>
  40. order by t.create_time desc
  41. <if test="page != -1 and page != null ">
  42. limit #{page}, #{row}
  43. </if>
  44. </select>
  45. <!-- 修改配置项信息 add by wuxw 2018-07-03 -->
  46. <update id="updateMappingDomainInfo" parameterType="Map">
  47. update c_mapping_domain t set t.status_cd = #{statusCd}
  48. <if test="newBId != null and newBId != ''">
  49. ,t.b_id = #{newBId}
  50. </if>
  51. <if test="domain !=null and domain != ''">
  52. , t.domain= #{domain}
  53. </if>
  54. <if test="domainName !=null and domainName != ''">
  55. , t.domain_name= #{domainName}
  56. </if>
  57. <if test="remark !=null and remark != ''">
  58. , t.remark= #{remark}
  59. </if>
  60. <if test="seq !=null and seq != ''">
  61. , t.seq= #{seq}
  62. </if>
  63. where 1=1
  64. <if test="id !=null and id != ''">
  65. and t.id= #{id}
  66. </if>
  67. </update>
  68. <!-- 查询配置项数量 add by wuxw 2018-07-03 -->
  69. <select id="queryMappingDomainsCount" parameterType="Map" resultType="Map">
  70. select count(1) count
  71. from c_mapping_domain t
  72. where 1 =1
  73. <if test="domain !=null and domain != ''">
  74. and t.domain= #{domain}
  75. </if>
  76. <if test="domainName !=null and domainName != ''">
  77. and t.domain_name = #{domainName}
  78. </if>
  79. <if test="domainNameLike !=null and domainNameLike != ''">
  80. and t.domain_name like concat('%',#{domainNameLike},'%')
  81. </if>
  82. <if test="remark !=null and remark != ''">
  83. and t.remark= #{remark}
  84. </if>
  85. <if test="statusCd !=null and statusCd != ''">
  86. and t.status_cd= #{statusCd}
  87. </if>
  88. <if test="id !=null and id != ''">
  89. and t.id= #{id}
  90. </if>
  91. <if test="seq !=null and seq != ''">
  92. and t.seq= #{seq}
  93. </if>
  94. </select>
  95. </mapper>