feat:接口调整
This commit is contained in:
@@ -5,6 +5,8 @@ import com.cool.store.dto.store.StoreUserPositionDTO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/5/13 9:56
|
||||
@@ -23,6 +25,6 @@ public interface StoreService {
|
||||
|
||||
PageInfo<MiniShopsResponse> getStoreListByMobile(String mobile,Integer pageNum,Integer pageSize,String storeName,String storeNum);
|
||||
|
||||
PageInfo<StoreUserPositionDTO> getStoreUser(Integer pageSize, Integer pageNum);
|
||||
List<StoreUserPositionDTO> getStoreUser(List<String> storeCodeList);
|
||||
|
||||
}
|
||||
|
||||
@@ -110,15 +110,13 @@ public class StoreServiceImpl implements StoreService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<StoreUserPositionDTO> getStoreUser(Integer pageSize, Integer pageNum) {
|
||||
if (pageSize>=100){
|
||||
public List<StoreUserPositionDTO> getStoreUser(List<String> storeCodeList) {
|
||||
if (CollectionUtils.isNotEmpty(storeCodeList)&&storeCodeList.size()>=100){
|
||||
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE,"单次最多获取100条门店数据");
|
||||
}
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
List<StoreDO> list = storeDao.list();
|
||||
PageInfo info = new PageInfo<>(list);
|
||||
List<StoreDO> list = storeDao.getStoreNumByStoreCodes(storeCodeList);
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return info;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<StoreUserPositionDTO> result = new ArrayList<>();
|
||||
list.forEach(x->{
|
||||
@@ -143,8 +141,7 @@ public class StoreServiceImpl implements StoreService {
|
||||
storeUserPositionDTO.setUserList(userList);
|
||||
result.add(storeUserPositionDTO);
|
||||
});
|
||||
info.setList(result);
|
||||
return info;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user