Sfoglia il codice sorgente

[SQL][修改][为wx_shop表添加索引]

release_toaliyun_real
gongbiao 6 anni fa
parent
commit
89073cf8f6
2 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. +1
    -0
      mallinkAdmin/src/main/resources/db/migration/V201907151402__G_ALTER_SHOP.sql
  2. +7
    -1
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 1
- 0
mallinkAdmin/src/main/resources/db/migration/V201907151402__G_ALTER_SHOP.sql Vedi File

@@ -0,0 +1 @@
alter table wx_shop add index b_f(building,floor);

+ 7
- 1
mallinkService/src/main/resources/mapper/WxShopMapper.xml Vedi File

@@ -572,9 +572,15 @@
DATE_FORMAT(w.create_date,'%Y/%m') xTime
</if>
,count(distinct w.shop_id) xCount
from wx_merchant_shop w
from wx_merchant_shop w left join wx_shop s on w.shop_id=s.id
where w.is_del=0
and w.tenant_id = #{tenantId}
<if test="building!=null">
and s.building=#{building}
</if>
<if test="floor!=null">
and s.floor=#{floor}
</if>
group by xTime
order by xTime
</select>


Caricamento…
Annulla
Salva