SmsConfigServiceDaoImplMapper.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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="smsConfigServiceDaoImpl">
  6. <!-- 保存短信配置信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveSmsConfigInfo" parameterType="Map">
  8. insert into sms_config(
  9. access_key_id,sms_busi,sign_name,template_code,store_id,access_secret,sms_id,obj_id,sms_type,log_switch,region,remarks
  10. ) values (
  11. #{accessKeyId},#{smsBusi},#{signName},#{templateCode},#{storeId},#{accessSecret},#{smsId},#{objId},#{smsType},#{logSwitch},#{region},#{remarks}
  12. )
  13. </insert>
  14. <!-- 查询短信配置信息 add by wuxw 2018-07-03 -->
  15. <select id="getSmsConfigInfo" parameterType="Map" resultType="Map">
  16. select t.access_key_id,t.access_key_id accessKeyId,t.sms_busi,t.sms_busi smsBusi,t.sign_name,t.sign_name signName,t.status_cd,t.status_cd statusCd,t.template_code,t.template_code templateCode,t.store_id,t.store_id storeId,t.access_secret,t.access_secret accessSecret,t.sms_id,t.sms_id smsId,t.obj_id,t.obj_id objId,t.sms_type,t.sms_type smsType,t.log_switch,t.log_switch logSwitch,t.region,t.remarks
  17. from sms_config t
  18. where 1 =1
  19. <if test="accessKeyId !=null and accessKeyId != ''">
  20. and t.access_key_id= #{accessKeyId}
  21. </if>
  22. <if test="smsBusi !=null and smsBusi != ''">
  23. and t.sms_busi= #{smsBusi}
  24. </if>
  25. <if test="signName !=null and signName != ''">
  26. and t.sign_name= #{signName}
  27. </if>
  28. <if test="statusCd !=null and statusCd != ''">
  29. and t.status_cd= #{statusCd}
  30. </if>
  31. <if test="templateCode !=null and templateCode != ''">
  32. and t.template_code= #{templateCode}
  33. </if>
  34. <if test="storeId !=null and storeId != ''">
  35. and t.store_id= #{storeId}
  36. </if>
  37. <if test="accessSecret !=null and accessSecret != ''">
  38. and t.access_secret= #{accessSecret}
  39. </if>
  40. <if test="smsId !=null and smsId != ''">
  41. and t.sms_id= #{smsId}
  42. </if>
  43. <if test="objId !=null and objId != ''">
  44. and t.obj_id= #{objId}
  45. </if>
  46. <if test="smsType !=null and smsType != ''">
  47. and t.sms_type= #{smsType}
  48. </if>
  49. <if test="logSwitch !=null and logSwitch != ''">
  50. and t.log_switch= #{logSwitch}
  51. </if>
  52. <if test="region !=null and region != ''">
  53. and t.region= #{region}
  54. </if>
  55. <if test="remarks !=null and remarks != ''">
  56. and t.remarks= #{remarks}
  57. </if>
  58. order by t.create_time desc
  59. <if test="page != -1 and page != null ">
  60. limit #{page}, #{row}
  61. </if>
  62. </select>
  63. <!-- 修改短信配置信息 add by wuxw 2018-07-03 -->
  64. <update id="updateSmsConfigInfo" parameterType="Map">
  65. update sms_config t set t.status_cd = #{statusCd}
  66. <if test="newBId != null and newBId != ''">
  67. ,t.b_id = #{newBId}
  68. </if>
  69. <if test="accessKeyId !=null and accessKeyId != ''">
  70. , t.access_key_id= #{accessKeyId}
  71. </if>
  72. <if test="smsBusi !=null and smsBusi != ''">
  73. , t.sms_busi= #{smsBusi}
  74. </if>
  75. <if test="signName !=null and signName != ''">
  76. , t.sign_name= #{signName}
  77. </if>
  78. <if test="templateCode !=null and templateCode != ''">
  79. , t.template_code= #{templateCode}
  80. </if>
  81. <if test="storeId !=null and storeId != ''">
  82. , t.store_id= #{storeId}
  83. </if>
  84. <if test="accessSecret !=null and accessSecret != ''">
  85. , t.access_secret= #{accessSecret}
  86. </if>
  87. <if test="objId !=null and objId != ''">
  88. , t.obj_id= #{objId}
  89. </if>
  90. <if test="smsType !=null and smsType != ''">
  91. , t.sms_type= #{smsType}
  92. </if>
  93. <if test="logSwitch !=null and logSwitch != ''">
  94. , t.log_switch= #{logSwitch}
  95. </if>
  96. <if test="region !=null and region != ''">
  97. , t.region= #{region}
  98. </if>
  99. <if test="remarks !=null and remarks != ''">
  100. , t.remarks= #{remarks}
  101. </if>
  102. where 1=1 <if test="smsId !=null and smsId != ''">
  103. and t.sms_id= #{smsId}
  104. </if>
  105. </update>
  106. <!-- 查询短信配置数量 add by wuxw 2018-07-03 -->
  107. <select id="querySmsConfigsCount" parameterType="Map" resultType="Map">
  108. select count(1) count
  109. from sms_config t
  110. where 1 =1
  111. <if test="accessKeyId !=null and accessKeyId != ''">
  112. and t.access_key_id= #{accessKeyId}
  113. </if>
  114. <if test="smsBusi !=null and smsBusi != ''">
  115. and t.sms_busi= #{smsBusi}
  116. </if>
  117. <if test="signName !=null and signName != ''">
  118. and t.sign_name= #{signName}
  119. </if>
  120. <if test="statusCd !=null and statusCd != ''">
  121. and t.status_cd= #{statusCd}
  122. </if>
  123. <if test="templateCode !=null and templateCode != ''">
  124. and t.template_code= #{templateCode}
  125. </if>
  126. <if test="storeId !=null and storeId != ''">
  127. and t.store_id= #{storeId}
  128. </if>
  129. <if test="accessSecret !=null and accessSecret != ''">
  130. and t.access_secret= #{accessSecret}
  131. </if>
  132. <if test="smsId !=null and smsId != ''">
  133. and t.sms_id= #{smsId}
  134. </if>
  135. <if test="objId !=null and objId != ''">
  136. and t.obj_id= #{objId}
  137. </if>
  138. <if test="smsType !=null and smsType != ''">
  139. and t.sms_type= #{smsType}
  140. </if>
  141. <if test="logSwitch !=null and logSwitch != ''">
  142. and t.log_switch= #{logSwitch}
  143. </if>
  144. <if test="region !=null and region != ''">
  145. and t.region= #{region}
  146. </if>
  147. <if test="remarks !=null and remarks != ''">
  148. and t.remarks= #{remarks}
  149. </if>
  150. </select>
  151. </mapper>