|
|
|
@@ -25,16 +25,18 @@ |
|
|
|
<result column="point_type" jdbcType="INTEGER" property="pointType"/> |
|
|
|
<result column="comments" jdbcType="VARCHAR" property="comments"/> |
|
|
|
<result column="email" property="email"/> |
|
|
|
<result column="is_del" jdbcType="INTEGER" property="isDel"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`tenant_id`,`shop_number`,`build_area`,`operation_area`,`building`, |
|
|
|
`floor`,`status`,`x`,`y`,`addr`,`baidu_poi`,`longitude`,`latitude`,`create_date`, |
|
|
|
`update_date`,`img_url`,`manager`,`manager_phone`,`type`,`point_type`,`comments`,email |
|
|
|
`update_date`,`img_url`,`manager`,`manager_phone`,`type`,`point_type`,`comments`,email,`is_del` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where 1 = 1 |
|
|
|
where is_del=0 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and `id` = #{id} |
|
|
|
@@ -132,6 +134,7 @@ |
|
|
|
<if test=" null != email "> |
|
|
|
and `email` = #{email} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != ids "> |
|
|
|
and id in |
|
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
@@ -160,7 +163,7 @@ |
|
|
|
left join wx_merchant m on ms.merchant_id=m.id |
|
|
|
left join wx_mall_building b on s.building=b.id |
|
|
|
left join wx_mall_floor f on s.floor=f.id |
|
|
|
where 1 = 1 |
|
|
|
where is_del=0 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and s.`id` = #{id} |
|
|
|
@@ -322,7 +325,7 @@ |
|
|
|
left join wx_mall_floor f on s.floor=f.id |
|
|
|
left join wx_business bus on m.business_id = bus.id |
|
|
|
left join wx_brand brand on m.brand = brand.id |
|
|
|
where 1 = 1 |
|
|
|
where s.is_del=0 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and s.`id` = #{id} |
|
|
|
@@ -442,12 +445,12 @@ |
|
|
|
from wx_merchant_shop ms inner join wx_merchant m on ms.merchant_id=m.id |
|
|
|
inner join wx_shop s on ms.shop_id=s.id |
|
|
|
inner join wx_rent_contract c on ms.merchant_id=c.merchant_id |
|
|
|
where ms.tenant_id=#{tenantId} and ms.shop_id=#{shopId} and ms.is_del=0 |
|
|
|
where ms.tenant_id=#{tenantId} and ms.shop_id=#{shopId} and ms.is_del=0 and s.is_del=0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryShopLeftInfo" resultType="hashmap" parameterType="hashmap"> |
|
|
|
select count(id) shopcount,IFNULL(sum(build_area),0) area from wx_shop |
|
|
|
where tenant_id=#{tenantId} and status=#{status} |
|
|
|
where tenant_id=#{tenantId} and status=#{status} and is_del=0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="listShopFromContract" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap"> |
|
|
|
@@ -460,7 +463,7 @@ |
|
|
|
left join wx_merchant m on ms.merchant_id=m.id |
|
|
|
left join wx_mall_building b on s.building=b.id |
|
|
|
left join wx_mall_floor f on s.floor=f.id |
|
|
|
where 1=1 and ms.is_del=0 |
|
|
|
where s.is_del=0 and ms.is_del=0 |
|
|
|
and s.tenant_id=#{tenantId} |
|
|
|
<if test=" null != status"> |
|
|
|
and s.`status` = #{status} |
|
|
|
@@ -483,7 +486,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
<select id="hasShopNumber" parameterType="com.iformall.domain.po.WxShop" resultType="Integer"> |
|
|
|
select count(*) from wx_shop where tenant_id=#{tenantId} and shop_number=#{shopNumber} and `type`=#{type} |
|
|
|
select count(*) from wx_shop where tenant_id=#{tenantId} and shop_number=#{shopNumber} and `type`=#{type} and |
|
|
|
is_del=0 |
|
|
|
<if test=" null != id"> |
|
|
|
and id != #{id} |
|
|
|
</if> |
|
|
|
|