fix:新增获取接入物联网门店信息开放接口

This commit is contained in:
wangff
2025-09-16 10:50:13 +08:00
parent fe16305910
commit 342c91fb89
8 changed files with 70 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
package com.cool.store.service;
import com.cool.store.dto.StoreDTO;
import com.cool.store.dto.StoreNameDTO;
import com.cool.store.dto.store.AuthStoreUserDTO;
import com.cool.store.dto.store.StoreUserPositionDTO;
import com.cool.store.response.MiniShopsResponse;
@@ -24,6 +25,11 @@ public interface StoreService {
*/
PageInfo<StoreDTO> getStoreExtendFieldInfo(Integer pageSize,Integer pageNum);
/**
* 分页查询接入物联网的门店
*/
PageInfo<StoreNameDTO> getIotStoreList(Integer pageNum, Integer pageSize);
PageInfo<MiniShopsResponse> getStoreListByMobile(String mobile,Integer pageNum,Integer pageSize,String storeName,String storeNum);
List<StoreUserPositionDTO> getStoreUser(List<String> storeCodeList);

View File

@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dto.StoreNameDTO;
import com.cool.store.dto.store.AuthStoreUserDTO;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.EnterpriseUserRoleDao;
@@ -77,7 +78,7 @@ public class StoreServiceImpl implements StoreService {
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE,"单次最多获取200条门店数据");
}
PageHelper.startPage(pageNum,pageSize);
List<StoreDO> list = storeDao.list();
List<StoreDO> list = storeDao.list(null);
PageInfo info = new PageInfo<>(list);
if (CollectionUtils.isEmpty(list)){
return info;
@@ -87,6 +88,22 @@ public class StoreServiceImpl implements StoreService {
return info;
}
@Override
public PageInfo<StoreNameDTO> getIotStoreList(Integer pageNum, Integer pageSize) {
if (pageSize > 200) {
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "单次最多获取200条门店数据");
}
PageHelper.startPage(pageNum, pageSize);
List<StoreDO> list = storeDao.list(1);
PageInfo info = new PageInfo<>(list);
if (CollectionUtils.isEmpty(list)){
return info;
}
List<StoreNameDTO> result = list.stream().map(v -> new StoreNameDTO(v.getStoreName(), v.getStoreNum())).collect(Collectors.toList());
info.setList(result);
return info;
}
@Override
public PageInfo<MiniShopsResponse> getStoreListByMobile(String mobile,Integer pageNum,Integer pageSize,String storeName,String storeNum) {
//根据手机号查询 标品userId