SmsConfigServiceDaoImplMapper.xml 6.0 KB

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