diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopOpenIdMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopOpenIdMapper.java index 8e6a0f1..478c8d2 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopOpenIdMapper.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopOpenIdMapper.java @@ -45,7 +45,7 @@ public interface TbShopOpenIdMapper { @Select("select count(*) from tb_shop_open_id where shop_id=#{shopId} and status=1 and type=#{type};") int countStateByShopIdAndType(@Param("shopId") String shopId, @Param("type") int type); - @Select("select * from tb_shop_open_id where shop_id=#{shopId} and status=1 and (type=#{type} or type=-1);") + @Select("select * from tb_shop_open_id where shop_id=#{shopId} and status=1 and (type=#{type} or type=-1) group by open_id;") List selectStateByShopIdAndType(@Param("shopId") String shopId, @Param("type") int type); @Select("select * from tb_shop_open_id where shop_id=#{shopId} and open_id=#{openId};")