Commit 50750502 by 徐高华

活码门店查询

parent d2592832
...@@ -134,6 +134,17 @@ public interface HmQrcodeApiService { ...@@ -134,6 +134,17 @@ public interface HmQrcodeApiService {
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
* *
* @param basePageInfo 基本信息页 * @param basePageInfo 基本信息页
......
...@@ -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);
} }
...@@ -170,4 +170,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService { ...@@ -170,4 +170,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
return list; return list;
} }
@Override
public List<String> getHmStoreForWxa(String enterpriseId) {
return tabHaobanHmQrcodeMapper.getHmStoreForWxa(enterpriseId) ;
}
} }
...@@ -652,6 +652,18 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -652,6 +652,18 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
} }
@Override @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
public Page<HmClerkRelationDTO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId) { public Page<HmClerkRelationDTO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId) {
PageHelper.startPage(basePageInfo); PageHelper.startPage(basePageInfo);
List<HmClerkRelationBO> hmClerkByHmId = hmClerkRelationService.getHmClerkByHmId(hmId); List<HmClerkRelationBO> hmClerkByHmId = hmClerkRelationService.getHmClerkByHmId(hmId);
......
...@@ -313,16 +313,20 @@ ...@@ -313,16 +313,20 @@
<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,
COUNT(hm_id) as num COUNT(hm_id) as num
......
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