placeInfoMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  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. <!-- 命名,每一个映射对象不一样
  4. namespace:必须与对应的接口全类名一致
  5. -->
  6. <mapper namespace="com.iamberry.wechat.service.mapper.PlaceInfoMapper">
  7. <!-- palceInfo活动所有字段映射 -->
  8. <sql id="palceInfoAllField">
  9. PLACE_ID id,
  10. PLACE_SUPPER_ID supperId,
  11. PLACE_NAME name,
  12. PLACE_ADDR addr,
  13. PLACE_USERNAME userName,
  14. PLACE_TEL tel,
  15. PLACE_AMOUNT amount,
  16. PLACE_CREATE_DATE createDate,
  17. PLACE_STATUS status,
  18. PLACE_OPENID openid,
  19. PLACE_ROLE_ID roleId,
  20. PLACE_PID placePid ,
  21. PLACE_AREA areaName,
  22. PLACE_INIT_CODE initCode,
  23. PLACE_REMARK remark
  24. </sql>
  25. <!-- 商户申请修改信息页面 -->
  26. <sql id="applyLogsAllField">
  27. APPLY_ID applyID, APPLY_OPENID applyOpenID, APPLY_TO_PLACEID applyToPlaceID,
  28. APPLY_NAME applyName, APPLY_USERNAME applyUserName, APPLY_TEL applyTel,
  29. APPLY_AREA applyArea, APPLY_DATE applyDate, APPLY_STATUS applyStatus, APPLY_ADDR applyAddr
  30. </sql>
  31. <select id="getOnePlaceInfo" parameterType="integer" resultType="PlaceInfo">
  32. SELECT
  33. <include refid="palceInfoAllField"/>,
  34. PLACE_PIDS placeIds ,
  35. PLACE_HAS_QRCODE hasQrcode,
  36. PLACE_TEMPLATE_ID templateId,
  37. (select role_name from tb_iamberry_place_role where role_id=roleId ) as roleName,
  38. (select template_name from tb_iamberry_template where template_id=templateId) templateName
  39. FROM tb_iamberry_place_info WHERE place_id = #{appid} and PLACE_STATUS=1
  40. </select>
  41. <select id="getOnePlaceInfo2" parameterType="string" resultType="PlaceInfo">
  42. SELECT
  43. <include refid="palceInfoAllField"/>,
  44. PLACE_PIDS placeIds ,
  45. PLACE_HAS_QRCODE hasQrcode,
  46. PLACE_TEMPLATE_ID templateId,
  47. PLACE_INFO_STATUS placeInfoStus,
  48. ROLE_NAME roleName
  49. FROM TB_IAMBERRY_PLACE_INFO
  50. JOIN TB_IAMBERRY_PLACE_ROLE ON ROLE_ID = PLACE_ROLE_ID
  51. WHERE PLACE_OPENID=#{openid} AND PLACE_STATUS=1
  52. </select>
  53. <select id="getOnePlaceInfoByInitcode" resultType="PlaceInfo">
  54. SELECT
  55. <include refid="palceInfoAllField"/>,
  56. PLACE_PIDS placeIds ,
  57. PLACE_HAS_QRCODE hasQrcode,
  58. PLACE_TEMPLATE_ID templateId
  59. FROM tb_iamberry_place_info
  60. WHERE
  61. PLACE_STATUS=1
  62. <if test="initCode!=null and initCode!=''">
  63. and PLACE_INIT_CODE=#{initCode}
  64. </if>
  65. <if test="id!=null and id!=''">
  66. and PLACE_ID=${id}
  67. </if>
  68. <if test="name!=null and name!=''">
  69. and PLACE_Name=#{name}
  70. </if>
  71. </select>
  72. <select id="getPlaceInfosForDownLoad" resultType="PlaceInfo">
  73. select
  74. PLACE_ID id,
  75. PLACE_NAME name,
  76. PLACE_ADDR addr,
  77. PLACE_USERNAME userName,
  78. PLACE_TEL tel,
  79. PLACE_ROLE_ID roleId,
  80. PLACE_PID placePid ,
  81. PLACE_AREA areaName,
  82. PLACE_HAS_QRCODE hasQrcode,
  83. PLACE_INIT_CODE initCode,
  84. PLACE_REMARK remark
  85. FROM tb_iamberry_place_info
  86. WHERE
  87. PLACE_STATUS=1
  88. <if test="beginNum!=null and beginNum!=''">
  89. <![CDATA[ and PLACE_ID >= #{beginNum} ]]>
  90. </if>
  91. <if test="num!=null and num!=''">
  92. limit #{num}
  93. </if>
  94. </select>
  95. <select id="getUnderling" parameterType="PlaceInfo" resultType="string">
  96. select t.PLACE_OPENID openid
  97. from tb_iamberry_place_info t
  98. <where>
  99. t.PLACE_PID=(select PLACE_ID from tb_iamberry_place_info where PLACE_OPENID=#{openid})
  100. <if test="roleId>0" >
  101. and t.PLACE_ROLE_ID=${roleId}
  102. </if>
  103. and t.PLACE_OPENID is not null
  104. </where>
  105. </select>
  106. <select id="selectAll" resultType="PlaceInfo" parameterType="PlaceInfo">
  107. select
  108. <include refid="palceInfoAllField"/>,
  109. (select role_name from tb_iamberry_place_role where role_id=roleId ) as roleName,
  110. (SELECT Q.QRCODE_URL FROM TB_IAMBERRY_USER_QRCODE Q WHERE (Q.QRCODE_REPLACE_OPENID = id OR Q.QRCODE_REPLACE_OPENID = openid) AND Q.QRCODE_STATUS = 1 limit 1) qrcodeUrl
  111. from tb_iamberry_place_info
  112. <where>
  113. PLACE_STATUS=1
  114. <if test="name!=null and name!=''">
  115. and PLACE_NAME like CONCAT('%',#{name},'%')
  116. </if>
  117. <if test="userName!=null and userName!=''" >
  118. and PLACE_USERNAME like CONCAT('%',#{userName},'%')
  119. </if>
  120. <if test="roleId!=null and roleId!=''" >
  121. and PLACE_ROLE_ID=#{roleId}
  122. </if>
  123. <if test="tel!=null and tel!=''">
  124. AND PLACE_TEL LIKE CONCAT('%',#{tel},'%')
  125. </if>
  126. <if test="userNickname != null and userNickname != ''">
  127. AND PLACE_OPENID IN (SELECT T.USER_OPENID FROM TB_IAMBERRY_USER_USERINFO T WHERE T.USER_NICKNAME LIKE CONCAT('%',#{userNickname},'%'))
  128. </if>
  129. <if test="placePid!=null and placePid!=''" >
  130. and PLACE_PID=#{placePid}
  131. </if>
  132. <if test="supperId>0" >
  133. and PLACE_SUPPER_ID =#{supperId}
  134. </if>
  135. <if test="parentName!=null and parentName!=''" >
  136. and PLACE_PID in
  137. (select PLACE_ID from tb_iamberry_place_info where
  138. PLACE_NAME like CONCAT('%',#{parentName},'%')
  139. )
  140. </if>
  141. </where>
  142. order by place_create_date desc
  143. <if test="page!=null and page.recordBegin>0 and page.pageSize>0 ">
  144. limit ${page.recordBegin},${page.pageSize}
  145. </if>
  146. <if test="page!=null and page.recordBegin==0 and page.pageSize>0 ">
  147. limit ${page.pageSize}
  148. </if>
  149. </select>
  150. <!-- 根据条件获取placeId -->
  151. <select id="getPlaceId" resultType="PlaceInfo" parameterType="PlaceInfo">
  152. SELECT
  153. PLACE_ID id,
  154. PLACE_OPENID openid,
  155. (SELECT Q.QRCODE_URL FROM TB_IAMBERRY_USER_QRCODE Q WHERE (Q.QRCODE_REPLACE_OPENID = id OR Q.QRCODE_REPLACE_OPENID = openid) AND Q.QRCODE_STATUS = 1 limit 1) qrcodeUrl
  156. FROM
  157. TB_IAMBERRY_PLACE_INFO
  158. <where>
  159. PLACE_STATUS=1
  160. <if test="name!=null and name!=''">
  161. and PLACE_NAME like CONCAT('%',#{name},'%')
  162. </if>
  163. <if test="userName!=null and userName!=''" >
  164. and PLACE_USERNAME like CONCAT('%',#{userName},'%')
  165. </if>
  166. <if test="roleId!=null and roleId!=''" >
  167. and PLACE_ROLE_ID=#{roleId}
  168. </if>
  169. <if test="placePid!=null and placePid!=''" >
  170. and PLACE_PID=#{placePid}
  171. </if>
  172. <if test="supperId>0" >
  173. and PLACE_SUPPER_ID =#{supperId}
  174. </if>
  175. <if test="parentName!=null and parentName!=''" >
  176. and PLACE_PID in
  177. (select PLACE_ID from tb_iamberry_place_info where
  178. PLACE_NAME like CONCAT('%',#{parentName},'%')
  179. )
  180. </if>
  181. </where>
  182. order by place_create_date desc
  183. </select>
  184. <select id="getAllCount" resultType="integer">
  185. select count(PLACE_ID) from tb_iamberry_place_info
  186. <where>
  187. PLACE_STATUS=1
  188. <if test="name!=null and name!=''">
  189. and PLACE_NAME like CONCAT('%',#{name},'%')
  190. </if>
  191. <if test="userName!=null and userName!=''" >
  192. and PLACE_USERNAME like CONCAT('%',#{userName},'%')
  193. </if>
  194. <if test="supperId!=null and supperId!=''" >
  195. and PLACE_SUPPER_ID =${supperId}
  196. </if>
  197. <if test="roleId!=null and roleId!=''" >
  198. and PLACE_ROLE_Id=#{roleId}
  199. </if>
  200. <if test="placePid!=null and placePid!=''" >
  201. and PLACE_PID=#{placePid}
  202. </if>
  203. <if test="parentName!=null and parentName!=''" >
  204. and PLACE_PID in
  205. (select PLACE_ID from tb_iamberry_place_info where
  206. PLACE_NAME like CONCAT('%',#{parentName},'%')
  207. )
  208. </if>
  209. </where>
  210. </select>
  211. <select id="testNameExist" resultType="Integer">
  212. select count(PLACE_ID) from tb_iamberry_place_info
  213. where
  214. PLACE_NAME= #{name}
  215. and PLACE_STATUS=1
  216. </select>
  217. <insert id="insert" >
  218. insert into
  219. tb_iamberry_place_info(
  220. PLACE_SUPPER_ID ,
  221. PLACE_NAME ,
  222. PLACE_ADDR ,
  223. PLACE_USERNAME ,
  224. PLACE_TEL ,
  225. PLACE_AMOUNT ,
  226. PLACE_CREATE_DATE ,
  227. PLACE_STATUS ,
  228. PLACE_OPENID ,
  229. PLACE_ROLE_ID ,
  230. PLACE_PID ,
  231. PLACE_HAS_QRCODE ,
  232. PLACE_TEMPLATE_ID ,
  233. PLACE_AREA ,
  234. PLACE_INIT_CODE,
  235. PLACE_REMARK)
  236. values(#{supperId},#{name},#{addr},#{userName},#{tel},#{amount},
  237. #{createDate},#{status},#{openid},${roleId},${placePid},#{hasQrcode},#{templateId},#{areaName},
  238. #{initCode},#{remark})
  239. </insert>
  240. <!-- 插入对象,并返回带有主键的对象 -->
  241. <insert id="insertObj" useGeneratedKeys="true" keyProperty="id" >
  242. <selectKey keyProperty="id" resultType="int">
  243. select LAST_INSERT_ID()
  244. </selectKey>
  245. insert into
  246. tb_iamberry_place_info(
  247. PLACE_SUPPER_ID ,
  248. PLACE_NAME ,
  249. PLACE_ADDR ,
  250. PLACE_USERNAME ,
  251. PLACE_TEL ,
  252. PLACE_AMOUNT ,
  253. PLACE_CREATE_DATE ,
  254. PLACE_STATUS ,
  255. PLACE_OPENID ,
  256. PLACE_ROLE_ID ,
  257. PLACE_PID ,
  258. PLACE_HAS_QRCODE ,
  259. PLACE_TEMPLATE_ID ,
  260. PLACE_AREA ,
  261. PLACE_INIT_CODE,
  262. PLACE_REMARK,
  263. PLACE_INFO_STATUS)
  264. values(#{supperId},#{name},#{addr},#{userName},#{tel},#{amount},
  265. #{createDate},#{status},#{openid},${roleId},${placePid},#{hasQrcode},#{templateId},#{areaName},
  266. #{initCode},#{remark},#{placeInfoStus})
  267. </insert>
  268. <insert id="batchInsert" parameterType="ArrayList">
  269. insert into
  270. tb_iamberry_place_info(
  271. PLACE_SUPPER_ID ,
  272. PLACE_NAME ,
  273. PLACE_ADDR ,
  274. PLACE_USERNAME ,
  275. PLACE_TEL ,
  276. PLACE_AMOUNT ,
  277. PLACE_CREATE_DATE ,
  278. PLACE_STATUS ,
  279. PLACE_OPENID ,
  280. PLACE_TEMPLATE_ID ,
  281. PLACE_INIT_CODE)
  282. values
  283. <foreach collection="list" item="obj" index="index" separator="," >
  284. (#{supperId},#{name},#{addr},#{userName},#{tel},#{amount},
  285. #{createDate},#{status},#{openid},#{templateId}, #{initCode})
  286. </foreach>
  287. </insert>
  288. <update id="update" >
  289. update tb_iamberry_place_info
  290. <set>
  291. <if test="templateId!=null and templateId!=''">
  292. PLACE_TEMPLATE_ID =#{templateId},
  293. </if>
  294. <if test="name!=null and name!=''">
  295. PLACE_NAME =#{name},
  296. </if>
  297. <if test="addr!=null and addr!=''">
  298. PLACE_ADDR =#{addr},
  299. </if>
  300. <if test="userName!=null and userName!=''">
  301. PLACE_USERNAME =#{userName},
  302. </if>
  303. <if test="tel!=null and tel!=''">
  304. PLACE_TEL =#{tel},
  305. </if>
  306. <if test="amount!=null and amount!=''">
  307. PLACE_AMOUNT =#{amount},
  308. </if>
  309. <if test="status!=null and status!=''">
  310. PLACE_STATUS =#{status},
  311. </if>
  312. <if test="openid!=null and openid!=''">
  313. PLACE_OPENID =#{openid},
  314. </if>
  315. <if test="roleId!=null and roleId!=''">
  316. PLACE_ROLE_ID =#{roleId},
  317. </if>
  318. <if test="placePid!=null and placePid!=''">
  319. PLACE_PID =#{placePid},
  320. </if>
  321. <if test="placeIds!=null and placeIds!=''">
  322. PLACE_PIDS =#{placeIds},
  323. </if>
  324. <if test="areaName!=null and areaName!=''">
  325. PLACE_AREA =#{areaName},
  326. </if>
  327. <if test="hasQrcode!=null and hasQrcode!=''">
  328. PLACE_HAS_QRCODE =#{hasQrcode},
  329. </if>
  330. <if test="remark!=null and remark!=''">
  331. PLACE_REMARK =#{remark}
  332. </if>
  333. </set>
  334. where PLACE_ID = #{id}
  335. </update>
  336. <update id="batchUpdate" parameterType="java.util.List">
  337. <foreach collection="list" item="item" index="index" separator=";" open="" close="">
  338. update tb_iamberry_place_info
  339. <set>
  340. <if test="item.name!=null and item.name!=''">
  341. PLACE_NAME =#{item.name,jdbcType=VARCHAR},
  342. </if>
  343. <if test="item.addr!=null and item.addr!=''">
  344. PLACE_ADDR =#{item.addr,jdbcType=VARCHAR},
  345. </if>
  346. <if test="item.userName!=null and item.userName!=''">
  347. PLACE_USERNAME =#{item.userName,jdbcType=VARCHAR},
  348. </if>
  349. <if test="item.tel!=null and item.tel!=''">
  350. PLACE_TEL =#{item.tel,jdbcType=VARCHAR},
  351. </if>
  352. <if test="item.areaName!=null and item.areaName!=''">
  353. PLACE_AREA =#{item.areaName,jdbcType=VARCHAR},
  354. </if>
  355. <if test="item.hasQrcode!=null and item.hasQrcode!=''">
  356. PLACE_HAS_QRCODE =#{item.hasQrcode,jdbcType=INTEGER},
  357. </if>
  358. <if test="item.remark!=null and item.remark!=''">
  359. PLACE_REMARK =#{item.remark,jdbcType=VARCHAR}
  360. </if>
  361. </set>
  362. where PLACE_ID = #{item.id,jdbcType=INTEGER}
  363. </foreach>
  364. </update>
  365. <delete id="delete" parameterType="string">
  366. delete from tb_iamberry_place_info
  367. where PLACE_ID = #{appid}
  368. </delete>
  369. <!-- 根据code获取代理商信息 -->
  370. <select id="selectOnePlaceInfoByCode" parameterType="String" resultType="PlaceInfo">
  371. SELECT
  372. PLACE_ID id, PLACE_OPENID openid,
  373. (select r.role_name from tb_iamberry_place_role r where r.role_id=place_role_id ) as roleName
  374. FROM
  375. TB_IAMBERRY_PLACE_INFO
  376. WHERE
  377. PLACE_INIT_CODE = #{code}
  378. </select>
  379. <!-- 更新微代理的微信openid -->
  380. <update id="updateOpenidById" parameterType="PlaceInfo">
  381. UPDATE
  382. TB_IAMBERRY_PLACE_INFO
  383. SET
  384. PLACE_OPENID = #{openid}
  385. WHERE
  386. PLACE_ID = #{id}
  387. </update>
  388. <!-- 根据ID,获取顶级代理商ID -->
  389. <select id="selectPlaceInfobyId" parameterType="Integer" resultType="PlaceInfo">
  390. SELECT
  391. PLACE_ID id, PLACE_PIDS placeIds,PLACE_TEMPLATE_ID templateId, PLACE_OPENID openid
  392. FROM
  393. TB_IAMBERRY_PLACE_INFO
  394. WHERE
  395. PLACE_ID = #{appid}
  396. </select>
  397. <!-- 根据用户openid,获取对应的代理商ID -->
  398. <select id="selectPlaceIdByOpenId" parameterType="String" resultType="Integer">
  399. SELECT
  400. PLACE_ID id
  401. FROM
  402. TB_IAMBERRY_PLACE_INFO
  403. WHERE
  404. PLACE_OPENID = #{openid}
  405. </select>
  406. <!-- 根据代理商ID,获取完善信息的状态 -->
  407. <select id="selectPlaceInfoStatusByPlaceId" parameterType="Integer" resultType="Integer">
  408. SELECT
  409. PLACE_INFO_STATUS
  410. FROM
  411. TB_IAMBERRY_PLACE_INFO
  412. WHERE
  413. PLACE_ID = #{id}
  414. </select>
  415. <!-- 获取某一页的商户申请记录 -->
  416. <select id="selectApplyPlaceLogs" parameterType="PaperBean" resultType="ApplyPlaceLogs">
  417. SELECT
  418. <include refid="applyLogsAllField"/>
  419. FROM
  420. TB_IAMBERRY_PLACE_APPLY_LOGS
  421. ORDER BY
  422. APPLY_ID
  423. LIMIT
  424. #{minNum}, #{maxNum}
  425. </select>
  426. <!-- 获取待处理的总记录条数 -->
  427. <select id="getCount" resultType="int">
  428. SELECT
  429. COUNT(APPLY_ID)
  430. FROM
  431. TB_IAMBERRY_PLACE_APPLY_LOGS
  432. </select>
  433. <!-- 修改状态 -->
  434. <update id="updateApplyStatus" parameterType="ApplyPlaceLogs">
  435. UPDATE
  436. TB_IAMBERRY_PLACE_APPLY_LOGS
  437. SET
  438. APPLY_STATUS = #{applyStatus}
  439. WHERE
  440. APPLY_ID = #{applyID}
  441. </update>
  442. <!-- 获取某一个商户最近的申请记录 -->
  443. <select id="selectApplyLogsByPlaceID" parameterType="int" resultType="ApplyPlaceLogs">
  444. SELECT
  445. <include refid="applyLogsAllField"/>
  446. FROM
  447. TB_IAMBERRY_PLACE_APPLY_LOGS
  448. WHERE
  449. APPLY_TO_PLACEID = #{applyToPlaceID}
  450. ORDER BY
  451. APPLY_ID DESC
  452. LIMIT
  453. 0, 1
  454. </select>
  455. <!-- 获取某一个商户最近的申请记录 -->
  456. <select id="selectApplyLogsByOpenID" parameterType="String" resultType="ApplyPlaceLogs">
  457. SELECT
  458. <include refid="applyLogsAllField"/>
  459. FROM
  460. TB_IAMBERRY_PLACE_APPLY_LOGS
  461. WHERE
  462. APPLY_OPENID = #{applyOpenID}
  463. ORDER BY
  464. APPLY_ID DESC
  465. LIMIT
  466. 0, 1
  467. </select>
  468. <!-- 根据apply_id获取申请记录 -->
  469. <select id="selectApplyLogsByID" parameterType="int" resultType="ApplyPlaceLogs">
  470. SELECT
  471. <include refid="applyLogsAllField"/>
  472. FROM
  473. TB_IAMBERRY_PLACE_APPLY_LOGS
  474. WHERE
  475. APPLY_ID = #{applyID}
  476. </select>
  477. <!-- 修改代理商信息 -->
  478. <update id="updatePlaceInfo" parameterType="PlaceInfo">
  479. UPDATE
  480. TB_IAMBERRY_PLACE_INFO
  481. SET
  482. PLACE_NAME = #{name},
  483. PLACE_AREA = #{areaName},
  484. PLACE_USERNAME = #{userName},
  485. PLACE_TEL = #{tel},
  486. PLACE_INFO_STATUS = 2,
  487. PLACE_ADDR = #{addr}
  488. WHERE
  489. PLACE_ID = #{id}
  490. </update>
  491. <!-- 保存申请记录信息 -->
  492. <insert id="insertApplyLogs" parameterType="ApplyPlaceLogs">
  493. INSERT INTO
  494. TB_IAMBERRY_PLACE_APPLY_LOGS
  495. (
  496. APPLY_OPENID , APPLY_TO_PLACEID ,
  497. APPLY_NAME , APPLY_USERNAME , APPLY_TEL ,
  498. APPLY_AREA , APPLY_DATE, APPLY_STATUS, APPLY_ADDR
  499. )
  500. VALUES
  501. (
  502. #{applyOpenID}, #{applyToPlaceID}, #{applyName},
  503. #{applyUserName}, #{applyTel}, #{applyArea}, NOW(),
  504. 1, #{applyAddr}
  505. )
  506. </insert>
  507. <!-- 获取商户详情 -->
  508. <select id="selectPlaceInfoDetailByOpenId" resultType="PlaceInfo" parameterType="String">
  509. SELECT
  510. p.PLACE_ID id,
  511. u.USER_HEAD userHead,
  512. u.USER_NICKNAME userNickname,
  513. (select role_name from tb_iamberry_place_role where role_id=Place_role_id ) as roleName,
  514. p.PLACE_USERNAME userName,
  515. p.PLACE_TEL tel,
  516. p.PLACE_NAME name,
  517. p.PLACE_AREA areaName,
  518. p.PLACE_ADDR addr,
  519. p.PLACE_INFO_STATUS placeInfoStus
  520. FROM TB_IAMBERRY_PLACE_INFO p JOIN tb_iamberry_user_userinfo u ON p.place_openid=u.user_openid
  521. WHERE p.PLACE_OPENID = #{openid} and p.PLACE_STATUS=1
  522. </select>
  523. </mapper>