Commit 50750502 by 徐高华

活码门店查询

parent d2592832
...@@ -132,6 +132,17 @@ public interface HmQrcodeApiService { ...@@ -132,6 +132,17 @@ public interface HmQrcodeApiService {
* @date 2022-07-08 15:07:15 * @date 2022-07-08 15:07:15
*/ */
List<HmQrcodeStoreDTO> getHmStoreByEnterpriseId(String enterpriseId); List<HmQrcodeStoreDTO> getHmStoreByEnterpriseId(String enterpriseId);
/**
*
* @Title: getHmStoreForWxa
* @Description: 返回小程序有活码的门店列表
* @author xugh
* @param enterpriseId
* @return
* @throws
*/
List<String> getHmStoreForWxa(String enterpriseId) ;
/** /**
* 根据导购信息获取hmid * 根据导购信息获取hmid
......
...@@ -202,5 +202,7 @@ public interface TabHaobanHmQrcodeMapper { ...@@ -202,5 +202,7 @@ public interface TabHaobanHmQrcodeMapper {
int getCanAddCount(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("enterpriseId")String enterpriseId , @Param("storeIdList")List<String> storeIdList) ; int getCanAddCount(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("enterpriseId")String enterpriseId , @Param("storeIdList")List<String> storeIdList) ;
List<HmQrcodeClerkBO> listCanAddClerk(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("enterpriseId")String enterpriseId , @Param("storeIdList")List<String> storeIdList); List<HmQrcodeClerkBO> listCanAddClerk(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("enterpriseId")String enterpriseId , @Param("storeIdList")List<String> storeIdList);
List<String> getHmStoreForWxa(@Param("enterpriseId") String enterpriseId);
} }
...@@ -180,4 +180,6 @@ public interface HmQrcodeService { ...@@ -180,4 +180,6 @@ public interface HmQrcodeService {
List<HmQrcodeClerkBO> listCanAddClerk(String wxEnterpriseId , String enterpriseId , String clerkId) ; List<HmQrcodeClerkBO> listCanAddClerk(String wxEnterpriseId , String enterpriseId , String clerkId) ;
List<String> getHmStoreForWxa(String enterpriseId);
} }
...@@ -169,5 +169,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService { ...@@ -169,5 +169,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
authStoreIdList); authStoreIdList);
return list; return list;
} }
@Override
public List<String> getHmStoreForWxa(String enterpriseId) {
return tabHaobanHmQrcodeMapper.getHmStoreForWxa(enterpriseId) ;
}
} }
...@@ -650,6 +650,18 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -650,6 +650,18 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
RedisUtil.setCache(key, hmQrcodeStoreDTOS, 10L, TimeUnit.MINUTES); RedisUtil.setCache(key, hmQrcodeStoreDTOS, 10L, TimeUnit.MINUTES);
return hmQrcodeStoreDTOS; return hmQrcodeStoreDTOS;
} }
@Override
public List<String> getHmStoreForWxa(String enterpriseId) {
String key = "HM:STORE:WXA" + enterpriseId;
Object cache = RedisUtil.getCache(key);
if (cache != null) {
return (List<String>) cache;
}
List<String> list = hmQrcodeService.getHmStoreForWxa(enterpriseId);
RedisUtil.setCache(key, list, 10L, TimeUnit.MINUTES);
return list;
}
@Override @Override
public Page<HmClerkRelationDTO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId) { public Page<HmClerkRelationDTO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId) {
......
...@@ -313,15 +313,19 @@ ...@@ -313,15 +313,19 @@
<select id="getHmStoreByEnterpriseId" resultMap="TabHaobanHmQrcodeMap"> <select id="getHmStoreByEnterpriseId" resultMap="TabHaobanHmQrcodeMap">
select store_id storeId, select store_id storeId,
store_name storeName,
store_code storeCode,
enterprise_id enterpriseId,
MIN(over_flag) overFlag MIN(over_flag) overFlag
from tab_haoban_hm_qrcode from tab_haoban_hm_qrcode
where status_flag in (1, 3) where enterprise_id = #{enterpriseId} and status_flag in = 1
and enterprise_id = #{enterpriseId} and store_id is not null
GROUP BY store_id GROUP BY store_id
</select> </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
</select>
<select id="getGroupIdNumByEnterpriseId" resultType="com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO"> <select id="getGroupIdNumByEnterpriseId" resultType="com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO">
select hm_group_id as hmGroupId, select hm_group_id as hmGroupId,
......
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