Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

664 righe
24 KiB

  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.iformall.mapper.WxShopMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxShop">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
  8. <result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/>
  9. <result column="build_area" jdbcType="VARCHAR" property="buildArea"/>
  10. <result column="operation_area" jdbcType="VARCHAR" property="operationArea"/>
  11. <result column="building" jdbcType="BIGINT" property="building"/>
  12. <result column="floor" jdbcType="BIGINT" property="floor"/>
  13. <result column="building_name" jdbcType="VARCHAR" property="buildingName"/>
  14. <result column="floor_name" jdbcType="VARCHAR" property="floorName"/>
  15. <result column="status" jdbcType="INTEGER" property="status"/>
  16. <result column="x" jdbcType="DECIMAL" property="x"/>
  17. <result column="y" jdbcType="DECIMAL" property="y"/>
  18. <result column="sid" jdbcType="VARCHAR" property="sid"/>
  19. <result column="addr" jdbcType="VARCHAR" property="addr"/>
  20. <result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/>
  21. <result column="longitude" jdbcType="DECIMAL" property="longitude"/>
  22. <result column="latitude" jdbcType="DECIMAL" property="latitude"/>
  23. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  24. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  25. <result column="img_url" jdbcType="VARCHAR" property="imgUrl"/>
  26. <result column="manager" jdbcType="VARCHAR" property="manager"/>
  27. <result column="manager_phone" jdbcType="VARCHAR" property="managerPhone"/>
  28. <result column="type" jdbcType="INTEGER" property="type"/>
  29. <result column="point_type" jdbcType="INTEGER" property="pointType"/>
  30. <result column="comments" jdbcType="VARCHAR" property="comments"/>
  31. <result column="is_del" jdbcType="INTEGER" property="isDel"/>
  32. <result column="freeDay" property="freeDay"/>
  33. <result column="rent" property="rent"/>
  34. <result column="rent_unit" property="rentUnit"/>
  35. <result column="business_id" property="businessId"/>
  36. </resultMap>
  37. <sql id="allColumns">
  38. `id`,`tenant_id`,`parent_tenant_id`,`shop_number`,`build_area`,`operation_area`,`building`,`floor`,`status`,`x`,`y`,`sid`,`addr`,
  39. `baidu_poi`,`longitude`,`latitude`,`create_date`,`update_date`,`img_url`,`manager`,`manager_phone`,
  40. `type`,`point_type`,`comments`,`is_del`,DATEDIFF(now(),create_date) freeDay,rent,rent_unit,business_id
  41. </sql>
  42. <sql id="dynamicWhereConditions">
  43. where is_del=0
  44. <if test=" null != id ">
  45. and `id` = #{id}
  46. </if>
  47. <if test=" null != tenantId and '' != tenantId">
  48. and `tenant_id` = #{tenantId}
  49. </if>
  50. <if test=" null != parentTenantId and '' != parentTenantId">
  51. and `parent_tenant_id` = #{parentTenantId}
  52. </if>
  53. <if test=" null != shopNumber and ''!=shopNumber">
  54. and `shop_number` like concat('%', #{shopNumber},'%')
  55. </if>
  56. <if test=" null != buildArea ">
  57. and `build_area` like concat('%', #{buildArea},'%')
  58. </if>
  59. <if test=" null != operationArea ">
  60. and `operation_area` like concat('%', #{operationArea},'%')
  61. </if>
  62. <if test=" null != building ">
  63. and `building` like concat('%', #{building},'%')
  64. </if>
  65. <if test=" null != floor ">
  66. and `floor` = #{floor}
  67. </if>
  68. <if test=" null != status ">
  69. and `status` = #{status}
  70. </if>
  71. <if test=" null != x ">
  72. and `x` = #{x}
  73. </if>
  74. <if test=" null != y ">
  75. and `y` = #{y}
  76. </if>
  77. <if test=" null != sid ">
  78. and `sid` = #{sid}
  79. </if>
  80. <if test=" null != addr ">
  81. and `addr` like concat('%', #{addr},'%')
  82. </if>
  83. <if test=" null != baiduPoi ">
  84. and `baidu_poi` like concat('%', #{baiduPoi},'%')
  85. </if>
  86. <if test=" null != longitude ">
  87. and `longitude` = #{longitude}
  88. </if>
  89. <if test=" null != latitude ">
  90. and `latitude` = #{latitude}
  91. </if>
  92. <if test=" null != createDate ">
  93. and `create_date` = #{createDate}
  94. </if>
  95. <if test=" null != updateDate ">
  96. and `update_date` = #{updateDate}
  97. </if>
  98. <if test=" null != manager ">
  99. and `manager` = #{manager}
  100. </if>
  101. <if test=" null != managerPhone ">
  102. and `manager_phone` = #{managerPhone}
  103. </if>
  104. <if test=" null != type ">
  105. and `type` = #{type}
  106. </if>
  107. <if test=" null != pointType ">
  108. and `point_type` = #{pointType}
  109. </if>
  110. <if test=" null != floorForRule and '' != floorForRule ">
  111. and `floor` in (${floorForRule})
  112. </if>
  113. <if test=" null != ids ">
  114. and id in
  115. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  116. #{idItem}
  117. </foreach>
  118. </if>
  119. <if test=" null != sortColumns">order by ${sortColumns}</if>
  120. </sql>
  121. <select id="findList" parameterType="com.iformall.domain.po.WxShop" resultMap="BaseResultMap">
  122. select
  123. <include refid="allColumns"/>
  124. from wx_shop
  125. <include refid="dynamicWhereConditions"/>
  126. </select>
  127. <select id="findCount" parameterType="com.iformall.domain.po.WxShop" resultType="java.lang.Long">
  128. select count(id)
  129. from wx_shop
  130. <include refid="dynamicWhereConditions"/>
  131. </select>
  132. <select id="findIdList" parameterType="com.iformall.domain.po.WxShop" resultType="Long">
  133. select id
  134. from wx_shop
  135. <include refid="dynamicWhereConditions"/>
  136. </select>
  137. <select id="findAreaSum" parameterType="com.iformall.domain.po.WxShop" resultType="Long">
  138. select ifnull(sum(build_area),0)
  139. from wx_shop
  140. <include refid="dynamicWhereConditions"/>
  141. </select>
  142. <select id="selectBatchByIds" resultMap="BaseResultMap">
  143. select
  144. s.`id`,s.`tenant_id`,s.`parent_tenant_id`,s.`shop_number`,s.`build_area`,s.`operation_area`,s.building,s.floor,s.`status`,s.`x`,s.`y`,s.`sid`,s.`addr`,
  145. s.`baidu_poi`,s.`longitude`,s.`latitude`,s.`create_date`,s.`update_date`,s.`img_url`,s.`manager`,s.`manager_phone`,
  146. s.`type`,s.`point_type`,s.`comments`,s.`is_del`,DATEDIFF(now(),s.create_date) freeDay,s.rent,s.rent_unit,s.business_id
  147. from wx_shop s
  148. where s.is_del=0
  149. <if test=" null != ids ">
  150. and s.id in
  151. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  152. #{idItem}
  153. </foreach>
  154. </if>
  155. </select>
  156. <select id="findListMap" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap">
  157. select s.id id, s.tenant_id tenantId, s.parent_tenant_id parentTenantId, s.shop_number shopNumber,CONVERT(s.build_area,DECIMAL(10,2)) buildArea,
  158. s.img_url imgUrl,CONVERT(s.operation_area,DECIMAL(10,2)) operationArea,s.status,s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,
  159. s.business_id as businessId,s.create_date create_date,s.rent,s.rent_unit,s.building as buildingId,s.floor as floorId,s.manager,s.manager_phone managerPhone
  160. from wx_shop s
  161. where s.is_del=0
  162. <if test=" null != type ">
  163. and s.`type` = #{type}
  164. </if>
  165. <if test=" null != tenantId and '' != tenantId">
  166. and s.`tenant_id` = #{tenantId}
  167. </if>
  168. <if test=" null != parentTenantId and '' != parentTenantId">
  169. and s.`parent_tenant_id` = #{parentTenantId}
  170. </if>
  171. <if test=" null != status">
  172. and s.`status` = #{status}
  173. </if>
  174. <if test=" null != building ">
  175. and s.`building`= #{building}
  176. </if>
  177. <if test=" null != floor ">
  178. and s.`floor` = #{floor}
  179. </if>
  180. <if test=" null != id ">
  181. and s.`id` = #{id}
  182. </if>
  183. <if test=" null != shopNumber and ''!=shopNumber">
  184. and s.`shop_number` like concat('%', #{shopNumber},'%')
  185. </if>
  186. <if test=" null != buildArea ">
  187. and s.`build_area` like concat('%', #{buildArea},'%')
  188. </if>
  189. <if test=" null != operationArea ">
  190. and s.`operation_area` like concat('%', #{operationArea},'%')
  191. </if>
  192. <if test=" null != x ">
  193. and s.`x` = #{x}
  194. </if>
  195. <if test=" null != y ">
  196. and s.`y` = #{y}
  197. </if>
  198. <if test=" null != sid ">
  199. and s.`sid` = #{sid}
  200. </if>
  201. <if test=" null != addr ">
  202. and s.`addr` like concat('%', #{addr},'%')
  203. </if>
  204. <if test=" null != baiduPoi ">
  205. and s.`baidu_poi` like concat('%', #{baiduPoi},'%')
  206. </if>
  207. <if test=" null != longitude ">
  208. and s.`longitude` = #{longitude}
  209. </if>
  210. <if test=" null != latitude ">
  211. and s.`latitude` = #{latitude}
  212. </if>
  213. <if test=" null != createDate ">
  214. and s.`create_date` = #{createDate}
  215. </if>
  216. <if test=" null != updateDate ">
  217. and s.`update_date` = #{updateDate}
  218. </if>
  219. <if test=" null != manager ">
  220. and s.`manager` = #{manager}
  221. </if>
  222. <if test=" null != managerPhone ">
  223. and s.`manager_phone` = #{managerPhone}
  224. </if>
  225. <if test=" null != pointType ">
  226. and s.`point_type` = #{pointType}
  227. </if>
  228. <if test=" null != floorForRule and '' != floorForRule ">
  229. and s.`floor` in (${floorForRule})
  230. </if>
  231. <if test=" null != businessForRule and '' != businessForRule ">
  232. and s.`business_id` in (${businessForRule})
  233. </if>
  234. <if test=" null != ids ">
  235. and s.id in
  236. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  237. #{idItem}
  238. </foreach>
  239. </if>
  240. <if test=" null != sortColumns">order by ${sortColumns}</if>
  241. </select>
  242. <select id="notRentListMapAsPage" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap">
  243. select s.id as id, s.tenant_id tenantId, s.parent_tenant_id parentTenantId, s.shop_number shopNumber,s.build_area buildArea,
  244. s.img_url imgUrl,s.operation_area operationArea,s.status,s.manager,s.manager_phone managerPhone,s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,
  245. s.create_date as createDate,s.building as buildingId,s.floor as floorId
  246. from wx_shop s
  247. where s.is_del=0
  248. <if test=" null != id ">
  249. and s.`id` = #{id}
  250. </if>
  251. <if test=" null != tenantId and '' != tenantId">
  252. and s.`tenant_id` = #{tenantId}
  253. </if>
  254. <if test=" null != parentTenantId and '' != parentTenantId">
  255. and s.`parent_tenant_id` = #{parentTenantId}
  256. </if>
  257. <if test=" null != shopNumber and ''!=shopNumber">
  258. and s.`shop_number` like concat('%', #{shopNumber},'%')
  259. </if>
  260. <if test=" null != status">
  261. and s.`status` = #{status}
  262. </if>
  263. <if test=" null != type ">
  264. and s.`type` = #{type}
  265. </if>
  266. <if test=" null != pointType ">
  267. and s.`point_type` = #{pointType}
  268. </if>
  269. <if test=" null != floorForRule and '' != floorForRule ">
  270. and s.`floor` in (${floorForRule})
  271. </if>
  272. <if test=" null != businessForRule and '' != businessForRule ">
  273. and s.`business_id` in (${businessForRule})
  274. </if>
  275. <if test="null != sortColumn">
  276. order by ${sortColumn} ${sortOrder}
  277. </if>
  278. <if test="null == sortColumn">
  279. <if test=" null != sortColumns">order by ${sortColumns}</if>
  280. </if>
  281. </select>
  282. <select id="findListWithMerchantMap" parameterType="com.iformall.domain.vo.WxShopVo" resultMap="BaseResultMap">
  283. select
  284. s.id as id,s.shop_number,s.build_area,s.img_url,s.operation_area,s.status,s.manager,s.manager_phone,s.addr,s.type,s.point_type,
  285. s.create_date,s.building,s.floor
  286. from wx_shop s
  287. where s.is_del=0
  288. <if test=" null != id ">
  289. and s.`id` = #{id}
  290. </if>
  291. <if test=" null != tenantId and '' != tenantId">
  292. and s.`tenant_id` = #{tenantId}
  293. </if>
  294. <if test=" null != parentTenantId and '' != parentTenantId">
  295. and s.`parent_tenant_id` = #{parentTenantId}
  296. </if>
  297. <if test=" null != shopNumber and ''!=shopNumber">
  298. and s.`shop_number` like concat('%', #{shopNumber},'%')
  299. </if>
  300. <if test=" null != buildArea ">
  301. and s.`build_area` like concat('%', #{buildArea},'%')
  302. </if>
  303. <if test=" null != operationArea ">
  304. and s.`operation_area` like concat('%', #{operationArea},'%')
  305. </if>
  306. <if test=" null != building ">
  307. and s.`building`= #{building}
  308. </if>
  309. <if test=" null != floor ">
  310. and s.`floor` = #{floor}
  311. </if>
  312. <if test=" null != status">
  313. and s.`status` = #{status}
  314. </if>
  315. <if test=" null != x ">
  316. and s.`x` = #{x}
  317. </if>
  318. <if test=" null != y ">
  319. and s.`y` = #{y}
  320. </if>
  321. <if test=" null != sid ">
  322. and s.`sid` = #{sid}
  323. </if>
  324. <if test=" null != addr ">
  325. and s.`addr` like concat('%', #{addr},'%')
  326. </if>
  327. <if test=" null != baiduPoi ">
  328. and s.`baidu_poi` like concat('%', #{baiduPoi},'%')
  329. </if>
  330. <if test=" null != longitude ">
  331. and s.`longitude` = #{longitude}
  332. </if>
  333. <if test=" null != latitude ">
  334. and s.`latitude` = #{latitude}
  335. </if>
  336. <if test=" null != createDate ">
  337. and s.`create_date` = #{createDate}
  338. </if>
  339. <if test=" null != updateDate ">
  340. and s.`update_date` = #{updateDate}
  341. </if>
  342. <if test=" null != manager ">
  343. and s.`manager` = #{manager}
  344. </if>
  345. <if test=" null != managerPhone ">
  346. and s.`manager_phone` = #{managerPhone}
  347. </if>
  348. <if test=" null != type ">
  349. and s.`type` = #{type}
  350. </if>
  351. <if test=" null != pointType ">
  352. and s.`point_type` = #{pointType}
  353. </if>
  354. <if test="null != businessId">
  355. and s.business_id = #{businessId}
  356. </if>
  357. <if test=" null != floorForRule and '' != floorForRule ">
  358. and s.`floor` in (${floorForRule})
  359. </if>
  360. <if test=" null != businessForRule and '' != businessForRule ">
  361. and s.`business_id` in (${businessForRule})
  362. </if>
  363. <if test=" null != ids ">
  364. and s.id in
  365. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  366. #{idItem}
  367. </foreach>
  368. </if>
  369. <if test=" null != sortColumns">order by ${sortColumns}</if>
  370. </select>
  371. <select id="getShopList" resultType="hashmap" parameterType="hashmap">
  372. select id,shop_number shopNumber from wx_shop
  373. where shop_number = #{shopNumber} and is_del=0
  374. <if test=" null != tenantId and '' != tenantId">
  375. and `tenant_id` = #{tenantId}
  376. </if>
  377. <if test=" null != parentTenantId and '' != parentTenantId">
  378. and `parent_tenant_id` = #{parentTenantId}
  379. </if>
  380. </select>
  381. <select id="getMerchantShopByShopId" resultType="hashmap" parameterType="hashmap">
  382. select
  383. s.id,s.build_area buildArea,s.operation_area operationArea,s.shop_number shopNumber, s.manager, s.manager_phone managerPhone
  384. from wx_shop s
  385. where s.id = #{id} and s.is_del=0
  386. </select>
  387. <select id="queryShopLeftInfo" resultType="hashmap" parameterType="hashmap">
  388. select count(id) shopcount,IFNULL(sum(build_area),0) area from wx_shop
  389. where status=#{status} and is_del=0
  390. <if test=" null != tenantId and '' != tenantId">
  391. and `tenant_id` = #{tenantId}
  392. </if>
  393. <if test=" null != parentTenantId and '' != parentTenantId">
  394. and `parent_tenant_id` = #{parentTenantId}
  395. </if>
  396. </select>
  397. <select id="listShopFromContract" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap">
  398. select s.id id,s.shop_number shopNumber,s.build_area buildArea,s.building as buildingId,s.floor as floorId,
  399. s.img_url imgUrl,s.operation_area operationArea,s.manager,s.manager_phone managerPhone,s.status,s.create_date
  400. from wx_shop s
  401. where s.is_del=0
  402. <if test=" null != tenantId and '' != tenantId">
  403. and s.`tenant_id` = #{tenantId}
  404. </if>
  405. <if test=" null != parentTenantId and '' != parentTenantId">
  406. and s.`parent_tenant_id` = #{parentTenantId}
  407. </if>
  408. <if test=" null != status">
  409. and s.`status` = #{status}
  410. </if>
  411. <if test="null != notInIdList and null!=status and status==1 and type!=null and type==2">
  412. and s.id not in(
  413. <foreach collection="notInIdList" index="index" item="notInIdItem" open="(" separator="," close=")">
  414. #{notInIdItem}
  415. </foreach>
  416. )
  417. </if>
  418. <if test=" null != type ">
  419. and s.`type` = #{type}
  420. </if>
  421. <if test=" null != pointType ">
  422. and s.`point_type` = #{pointType}
  423. </if>
  424. <if test=" null != shopNumber and '' != shopNumber ">
  425. and s.shop_number = #{shopNumber}
  426. </if>
  427. <if test=" null != building and '' != building ">
  428. and b.building_name like concat('%', #{building},'%')
  429. </if>
  430. <if test=" null != merchantName and ''!=merchantName ">
  431. and m.`name` like concat('%', #{merchantName},'%')
  432. </if>
  433. <if test=" null != sortColumns">order by ${sortColumns}</if>
  434. </select>
  435. <select id="hasShopNumber" parameterType="com.iformall.domain.po.WxShop" resultType="Integer">
  436. select count(1) from wx_shop where shop_number=#{shopNumber} and `type`=#{type}
  437. and is_del=0
  438. <if test=" null != tenantId and '' != tenantId">
  439. and `tenant_id` = #{tenantId}
  440. </if>
  441. <if test=" null != parentTenantId and '' != parentTenantId">
  442. and `parent_tenant_id` = #{parentTenantId}
  443. </if>
  444. <if test=" null != id">
  445. and id != #{id}
  446. </if>
  447. </select>
  448. <select id="hasShopSid" parameterType="com.iformall.domain.po.WxShop" resultType="Integer">
  449. select count(1) from wx_shop where sid=#{sid}
  450. and is_del=0
  451. <if test=" null != tenantId and '' != tenantId">
  452. and `tenant_id` = #{tenantId}
  453. </if>
  454. <if test=" null != parentTenantId and '' != parentTenantId">
  455. and `parent_tenant_id` = #{parentTenantId}
  456. </if>
  457. <if test=" null != id">
  458. and id != #{id}
  459. </if>
  460. </select>
  461. <resultMap id="rentRate" type="com.iformall.domain.vo.WxShopRentRateVo">
  462. <result column="xTime" property="xTime"/>
  463. <result column="rate" property="rate"/>
  464. </resultMap>
  465. <select id="getCountByWxShop" parameterType="com.iformall.domain.po.WxShop" resultType="Long">
  466. select count(1) from wx_shop w where w.is_del=0
  467. <if test=" null != tenantId and '' != tenantId">
  468. and `tenant_id` = #{tenantId}
  469. </if>
  470. <if test=" null != parentTenantId and '' != parentTenantId">
  471. and `parent_tenant_id` = #{parentTenantId}
  472. </if>
  473. <if test="null != type">
  474. and `type`=#{type}
  475. </if>
  476. <if test="null != status">
  477. and status = #{status}
  478. </if>
  479. <if test="null != building">
  480. and building = #{building}
  481. </if>
  482. <if test="null != floor">
  483. and floor = #{floor}
  484. </if>
  485. <if test="null != startdate">
  486. and `create_date` >= #{startdate}
  487. </if>
  488. <if test="null != enddate">
  489. and `create_date` &lt;= #{enddate}
  490. </if>
  491. <if test="null != businessId and businessId!=0">
  492. and business_id = #{businessId}
  493. </if>
  494. </select>
  495. <update id="updateUnRentByIds" parameterType="Long">
  496. update wx_shop set status = 0
  497. where id in
  498. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  499. #{idItem}
  500. </foreach>
  501. </update>
  502. <select id="detailById" parameterType="Long" resultType="hashmap">
  503. select s.id id, s.tenant_id tenantId, s.parent_tenant_id parentTenantId, s.shop_number shopNumber,CONVERT(s.build_area,DECIMAL(10,2)) buildArea,
  504. s.img_url imgUrl,CONVERT(s.operation_area,DECIMAL(10,2)) operationArea,
  505. s.status,s.manager,s.manager_phone managerPhone,
  506. s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,s.rent,s.rent_unit,s.business_id as businessId,s.create_date,
  507. s.building as buildingId,s.floor as floorId
  508. from wx_shop s where s.`id` = #{id}
  509. </select>
  510. <select id="detailBySid" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap">
  511. select
  512. s.id id, s.tenant_id tenantId, s.parent_tenant_id parentTenantId, s.shop_number shopNumber,
  513. CONVERT(s.build_area,DECIMAL(10,2)) buildArea,
  514. s.img_url imgUrl,CONVERT(s.operation_area,DECIMAL(10,2)) operationArea,
  515. s.status,s.manager,s.manager_phone managerPhone,s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,s.rent,s.rent_unit,
  516. s.business_id as businessId,s.create_date,s.building as buildingId,s.floor as floorId
  517. from wx_shop s where s.`is_del` = 0 and s.`sid` = #{sid}
  518. <if test=" null != tenantId and '' != tenantId">
  519. and s.`tenant_id` = #{tenantId}
  520. </if>
  521. <if test=" null != parentTenantId and '' != parentTenantId">
  522. and s.`parent_tenant_id` = #{parentTenantId}
  523. </if>
  524. </select>
  525. <select id="newFindShopVoList" parameterType="java.util.Map" resultType="com.iformall.domain.vo.WxShopVo">
  526. select id,shop_number shopNumber,img_url imgUrl,addr,building,floor,baidu_poi baiduPoi,manager_phone linkPhone,manager linkPerson
  527. from wx_shop
  528. where is_del=0
  529. <if test=" null != tenantId and '' != tenantId">
  530. and `tenant_id` = #{tenantId}
  531. </if>
  532. <if test=" null != shopIds ">
  533. and id in
  534. <foreach collection="shopIds" index="index" item="idItem" open="(" separator="," close=")">
  535. #{idItem}
  536. </foreach>
  537. </if>
  538. </select>
  539. <select id="countShopByStatus" resultType="com.iformall.domain.dto.cockpit.CountShopByStatusDTO">
  540. SELECT
  541. `status` AS status, COUNT(id) AS shopCount
  542. FROM
  543. wx_shop
  544. WHERE
  545. is_del = 0
  546. AND tenant_id IN
  547. <foreach collection="tenantIds" index="index" item="tenantId" open="(" separator="," close=")">
  548. #{tenantId}
  549. </foreach>
  550. GROUP BY
  551. `status`;
  552. </select>
  553. </mapper>