Commit 1806e680 by 徐高华

有活码门店列表查询带上wxEnterpriseId

parent 3ce6ca1e
......@@ -19,6 +19,8 @@ public class HmLinkWxaDTO implements Serializable {
private Long pageId ;
private Long hmId ;
private String wxEnterpriseId ;
private String enterpriseId ;
private HmPageDTO page;
// 二维码
private String hmQrcode;
......@@ -33,6 +35,22 @@ public class HmLinkWxaDTO implements Serializable {
// 说明
private Map<String,String> remarkMap ;
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Long getHmId() {
return hmId;
}
......
package com.gic.haoban.manage.api.service.hm;
import java.util.List;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
......@@ -9,8 +11,6 @@ import com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO;
import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO;
import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO;
import java.util.List;
/**
* @author mozhu
* @date 2022/7/5 09:33
......@@ -141,7 +141,7 @@ public interface HmQrcodeApiService {
* @author mozhu
* @date 2022-07-08 15:07:15
*/
List<HmQrcodeStoreDTO> getHmStoreByEnterpriseId(String enterpriseId);
List<HmQrcodeStoreDTO> getHmStoreByEnterpriseId(String wxEnterpriseId , String enterpriseId);
/**
*
......
......@@ -157,7 +157,7 @@ public interface TabHaobanHmQrcodeMapper {
* @author mozhu
* @date 2022-07-08 15:10:57
*/
List<TabHaobanHmQrcode> getHmStoreByEnterpriseId(@Param("enterpriseId") String enterpriseId);
List<TabHaobanHmQrcode> getHmStoreByEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId") String enterpriseId);
/**
* 根据分组id获取活码数量
......
......@@ -146,7 +146,7 @@ public interface HmQrcodeService {
* @author mozhu
* @date 2022-07-08 15:09:50
*/
List<HmQrcodeBO> getHmStoreByEnterpriseId(String enterpriseId);
List<HmQrcodeBO> getHmStoreByEnterpriseId(String wxEnterpriseId , String enterpriseId);
/**
......
......@@ -117,9 +117,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
@Override
public List<HmQrcodeBO> getHmStoreByEnterpriseId(String enterpriseId) {
public List<HmQrcodeBO> getHmStoreByEnterpriseId(String wxEnterpriseId,String enterpriseId) {
return EntityUtil.changeEntityListNew(HmQrcodeBO.class,
tabHaobanHmQrcodeMapper.getHmStoreByEnterpriseId(enterpriseId));
tabHaobanHmQrcodeMapper.getHmStoreByEnterpriseId(wxEnterpriseId ,enterpriseId));
}
@Override
......
......@@ -174,6 +174,8 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
}
Long linkId = link.getLinkId();
String wxEnterpriseId = link.getWxEnterpriseId();
retDTO.setWxEnterpriseId(wxEnterpriseId);
retDTO.setEnterpriseId(enterpriseId);
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(wxEnterpriseId);
if (wxEnterpriseDTO == null) {
log.error("未查询到微信企业,id={}", wxEnterpriseId);
......
......@@ -719,13 +719,13 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
@Override
public List<HmQrcodeStoreDTO> getHmStoreByEnterpriseId(String enterpriseId) {
public List<HmQrcodeStoreDTO> getHmStoreByEnterpriseId(String wxEnterpriseId , String enterpriseId) {
String key = "HM:STORE:" + enterpriseId;
Object cache = RedisUtil.getCache(key);
if (cache != null) {
return (List<HmQrcodeStoreDTO>) cache;
}
List<HmQrcodeStoreDTO> hmQrcodeStoreDTOS = EntityUtil.changeEntityListNew(HmQrcodeStoreDTO.class, hmQrcodeService.getHmStoreByEnterpriseId(enterpriseId));
List<HmQrcodeStoreDTO> hmQrcodeStoreDTOS = EntityUtil.changeEntityListNew(HmQrcodeStoreDTO.class, hmQrcodeService.getHmStoreByEnterpriseId(wxEnterpriseId,enterpriseId));
RedisUtil.setCache(key, hmQrcodeStoreDTOS, 10L, TimeUnit.MINUTES);
return hmQrcodeStoreDTOS;
}
......
......@@ -315,7 +315,11 @@
select store_id storeId,
MIN(over_flag) overFlag
from tab_haoban_hm_qrcode
where enterprise_id = #{enterpriseId} and status_flag = 1
where
<if test="null != wxEnterpriseId">
wx_enterprise_id = #{wxEnterpriseId}
</if>
enterprise_id = #{enterpriseId} and status_flag = 1
and store_id is not null
GROUP BY store_id
</select>
......
......@@ -214,7 +214,7 @@ public class HmStoreController {
searchDTO.setSearchName(storeSearchParams);
// 企业ID
searchDTO.setEnterpriseId(enterpriseId);
List<HmQrcodeStoreDTO> hmStoreList = this.hmQrcodeApiService.getHmStoreByEnterpriseId(enterpriseId);
List<HmQrcodeStoreDTO> hmStoreList = this.hmQrcodeApiService.getHmStoreByEnterpriseId(wxEnterpriseId , enterpriseId);
if (CollectionUtils.isEmpty(hmStoreList)) {
return RestResponse.failure("-1", "无活码门店");
}
......
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