CmGclubMapper.xml.bak 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.caimei.modules.user.dao.CmGclubDao">
  4. <sql id="cmGclubColumns">
  5. a.gclubID AS "gclubID",
  6. a.name AS "name",
  7. a.contacts AS "contacts",
  8. a.cellphone AS "cellphone",
  9. a.telphone AS "telphone",
  10. a.post AS "post",
  11. a.address AS "address",
  12. a.scale AS "scale",
  13. a.empnum AS "empnum",
  14. a.mainpro AS "mainpro",
  15. a.remark AS "remark",
  16. a.image AS "image",
  17. a.regStatus AS "regStatus",
  18. a.addTime AS "addTime",
  19. a.loginTime AS "loginTime",
  20. a.provinceID AS "provinceID",
  21. a.cityID AS "cityID",
  22. a.townID AS "townID",
  23. a.agreement AS "agreement",
  24. a.flag AS "flag",
  25. a.userID AS "userID",
  26. a.clubstatus AS "clubstatus",
  27. a.BUSINESSLICENSEIMAGE AS "BUSINESSLICENSEIMAGE",
  28. a.LASTMODIFY AS "LASTMODIFY",
  29. a.inviterBindID AS "inviterBindID",
  30. a.inviterName AS "inviterName",
  31. a.headpic AS "headpic",
  32. a.mainServiceProviderID AS "mainServiceProviderID",
  33. a.scanTime AS "scanTime",
  34. a.checkTime AS "checkTime",
  35. a.spID AS "spID"
  36. </sql>
  37. <sql id="cmGclubJoins">
  38. </sql>
  39. <select id="get" resultType="CmGclub">
  40. SELECT
  41. <include refid="cmGclubColumns"/>
  42. FROM gclub a
  43. <include refid="cmGclubJoins"/>
  44. WHERE a.gclubID = #{id}
  45. </select>
  46. <select id="findList" resultType="CmGclub">
  47. SELECT
  48. <include refid="cmGclubColumns"/>
  49. FROM gclub a
  50. <include refid="cmGclubJoins"/>
  51. <where>
  52. <if test="gclubID != null and gclubID != ''">
  53. AND a.gclubID = #{id}
  54. </if>
  55. <if test="userID != null and userID != ''">
  56. AND a.userID = #{userID}
  57. </if>
  58. </where>
  59. <choose>
  60. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  61. ORDER BY ${page.orderBy}
  62. </when>
  63. <otherwise>
  64. </otherwise>
  65. </choose>
  66. </select>
  67. <select id="findAllList" resultType="CmGclub">
  68. SELECT
  69. <include refid="cmGclubColumns"/>
  70. FROM gclub a
  71. <include refid="cmGclubJoins"/>
  72. <where>
  73. </where>
  74. <choose>
  75. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  76. ORDER BY ${page.orderBy}
  77. </when>
  78. <otherwise>
  79. </otherwise>
  80. </choose>
  81. </select>
  82. <insert id="insert" parameterType="CmGclub" keyProperty="id" useGeneratedKeys="true">
  83. INSERT INTO gclub(
  84. name,
  85. contacts,
  86. cellphone,
  87. telphone,
  88. post,
  89. address,
  90. scale,
  91. empnum,
  92. mainpro,
  93. remark,
  94. image,
  95. regStatus,
  96. addTime,
  97. loginTime,
  98. provinceID,
  99. cityID,
  100. townID,
  101. agreement,
  102. flag,
  103. userID,
  104. clubstatus,
  105. BUSINESSLICENSEIMAGE,
  106. LASTMODIFY,
  107. inviterBindID,
  108. inviterName,
  109. headpic,
  110. mainServiceProviderID,
  111. scanTime,
  112. checkTime,
  113. spID
  114. ) VALUES (
  115. #{name},
  116. #{contacts},
  117. #{cellphone},
  118. #{telphone},
  119. #{post},
  120. #{address},
  121. #{scale},
  122. #{empnum},
  123. #{mainpro},
  124. #{remark},
  125. #{image},
  126. #{regStatus},
  127. #{addTime},
  128. #{loginTime},
  129. #{provinceID},
  130. #{cityID},
  131. #{townID},
  132. #{agreement},
  133. #{flag},
  134. #{userID},
  135. #{clubstatus},
  136. #{BUSINESSLICENSEIMAGE},
  137. #{LASTMODIFY},
  138. #{inviterBindID},
  139. #{inviterName},
  140. #{headpic},
  141. #{mainServiceProviderID},
  142. #{scanTime},
  143. #{checkTime},
  144. #{spID}
  145. )
  146. </insert>
  147. <update id="update">
  148. UPDATE gclub SET
  149. name = #{name},
  150. contacts = #{contacts},
  151. cellphone = #{cellphone},
  152. telphone = #{telphone},
  153. post = #{post},
  154. address = #{address},
  155. scale = #{scale},
  156. empnum = #{empnum},
  157. mainpro = #{mainpro},
  158. remark = #{remark},
  159. image = #{image},
  160. regStatus = #{regStatus},
  161. addTime = #{addTime},
  162. loginTime = #{loginTime},
  163. provinceID = #{provinceID},
  164. cityID = #{cityID},
  165. townID = #{townID},
  166. agreement = #{agreement},
  167. flag = #{flag},
  168. userID = #{userID},
  169. clubstatus = #{clubstatus},
  170. BUSINESSLICENSEIMAGE = #{BUSINESSLICENSEIMAGE},
  171. LASTMODIFY = #{LASTMODIFY},
  172. inviterBindID = #{inviterBindID},
  173. inviterName = #{inviterName},
  174. headpic = #{headpic},
  175. mainServiceProviderID = #{mainServiceProviderID},
  176. scanTime = #{scanTime},
  177. checkTime = #{checkTime},
  178. spID = #{spID}
  179. WHERE gclubID = #{id}
  180. </update>
  181. <delete id="delete">
  182. DELETE FROM gclub
  183. WHERE gclubID = #{id}
  184. </delete>
  185. <update id="updateByUserId">
  186. UPDATE gclub SET
  187. regStatus = #{regStatus},
  188. flag = #{flag},
  189. LASTMODIFY = #{LASTMODIFY},
  190. inviterBindID = #{inviterBindID},
  191. inviterName = #{inviterName},
  192. mainServiceProviderID = #{mainServiceProviderID},
  193. spID = #{spID}
  194. WHERE userID = #{userID}
  195. </update>
  196. </mapper>