Commit 56d7df26 by 徐高华

查询有活码的门店加wxEnterprise

parent 97a0f901
......@@ -152,7 +152,7 @@ public interface HmQrcodeApiService {
* @return
* @throws
*/
List<String> getHmStoreForWxa(String enterpriseId) ;
List<String> getHmStoreForWxa(String wxEnterpriseId ,String enterpriseId) ;
/**
* 根据导购信息获取hmid
......
......@@ -203,7 +203,7 @@ public interface TabHaobanHmQrcodeMapper {
List<HmQrcodeClerkBO> listCanAddClerk(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("enterpriseId")String enterpriseId , @Param("storeIdList")List<String> storeIdList);
List<String> getHmStoreForWxa(@Param("enterpriseId") String enterpriseId);
List<String> getHmStoreForWxa(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("enterpriseId") String enterpriseId);
List<String> listHmIdForIndex(HmQrcodeListQDTO qdto);
......
......@@ -183,7 +183,7 @@ public interface HmQrcodeService {
List<HmQrcodeClerkBO> listCanAddClerk(String wxEnterpriseId , String enterpriseId , String clerkId) ;
List<String> getHmStoreForWxa(String enterpriseId);
List<String> getHmStoreForWxa(String wxEnterpriseId ,String enterpriseId);
List<String> listHmIdForIndex(HmQrcodeListQDTO qdto);
......
......@@ -171,8 +171,8 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
@Override
public List<String> getHmStoreForWxa(String enterpriseId) {
return tabHaobanHmQrcodeMapper.getHmStoreForWxa(enterpriseId) ;
public List<String> getHmStoreForWxa(String wxEnterpriseId ,String enterpriseId) {
return tabHaobanHmQrcodeMapper.getHmStoreForWxa(wxEnterpriseId , enterpriseId) ;
}
@Override
......
......@@ -731,13 +731,13 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
@Override
public List<String> getHmStoreForWxa(String enterpriseId) {
String key = "HM:STORE:WXA" + enterpriseId;
public List<String> getHmStoreForWxa(String wxEnterpriseId ,String enterpriseId) {
String key = "HM:STORE:WXA" + enterpriseId + wxEnterpriseId;
Object cache = RedisUtil.getCache(key);
if (cache != null) {
return (List<String>) cache;
}
List<String> list = hmQrcodeService.getHmStoreForWxa(enterpriseId);
List<String> list = hmQrcodeService.getHmStoreForWxa(wxEnterpriseId ,enterpriseId);
RedisUtil.setCache(key, list, 10L, TimeUnit.MINUTES);
return list;
}
......
......@@ -315,19 +315,23 @@
select store_id storeId,
MIN(over_flag) overFlag
from tab_haoban_hm_qrcode
where
where 1
<if test="null != wxEnterpriseId">
wx_enterprise_id = #{wxEnterpriseId}
</if>
enterprise_id = #{enterpriseId} and status_flag = 1
and enterprise_id = #{enterpriseId} and status_flag = 1
and store_id is not null
GROUP BY store_id
</select>
<select id="getHmStoreForWxa" resultType="String">
select distinct(store_id)
from tab_haoban_hm_qrcode
where enterprise_id = #{enterpriseId} and status_flag = 1 and over_flag = 0 and store_id is not null
from tab_haoban_hm_qrcode
where 1
<if test="null != wxEnterpriseId">
wx_enterprise_id = #{wxEnterpriseId}
</if>
and enterprise_id = #{enterpriseId} and status_flag = 1 and over_flag = 0 and store_id is not null
</select>
<select id="listHmIdForIndex" resultType="String" parameterType="com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment