mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
新增 小程序查询桩升级固件列表
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.jsowell.pile.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 查询桩固件DTO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2024/11/21 16:03:18
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class PileFirmwareInfoDTO {
|
||||
|
||||
private Integer pageNo;
|
||||
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 使用范围
|
||||
* 1-4G;2-蓝牙
|
||||
*/
|
||||
private String useRange;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.pile.domain.PileFirmwareInfo;
|
||||
import com.jsowell.pile.dto.PileFirmwareInfoDTO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
@@ -59,4 +61,11 @@ public interface PileFirmwareInfoService {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileFirmwareInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 通过使用范围查询桩固件信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
PageResponse selectPileFirmwareListByUseRange(PileFirmwareInfoDTO dto);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.file.AliyunOssUploadUtils;
|
||||
import com.jsowell.pile.domain.PileFirmwareInfo;
|
||||
import com.jsowell.pile.domain.PileReservationInfo;
|
||||
import com.jsowell.pile.dto.PileFirmwareInfoDTO;
|
||||
import com.jsowell.pile.mapper.PileFirmwareInfoMapper;
|
||||
import com.jsowell.pile.service.PileFirmwareInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -100,4 +106,32 @@ public class PileFirmwareInfoServiceImpl implements PileFirmwareInfoService {
|
||||
public int deletePileFirmwareInfoById(Long id) {
|
||||
return pileFirmwareInfoMapper.deletePileFirmwareInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过使用范围查询桩固件信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PageResponse selectPileFirmwareListByUseRange(PileFirmwareInfoDTO dto) {
|
||||
int pageNo = dto.getPageNo() == null ? Constants.one : dto.getPageNo();
|
||||
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
||||
|
||||
PileFirmwareInfo pileFirmwareInfo = new PileFirmwareInfo();
|
||||
pileFirmwareInfo.setUseRange(dto.getUseRange());
|
||||
|
||||
PageHelper.startPage(pageNo, pageSize);
|
||||
List<PileFirmwareInfo> list = selectPileFirmwareInfoList(pileFirmwareInfo);
|
||||
|
||||
PageInfo<PileFirmwareInfo> pageInfo = new PageInfo<>(list);
|
||||
|
||||
PageResponse pageResponse = new PageResponse();
|
||||
pageResponse.setPageNum(pageInfo.getPageNum());
|
||||
pageResponse.setPageSize(pageInfo.getPageSize());
|
||||
pageResponse.setPages(pageInfo.getPages());
|
||||
pageResponse.setTotal(pageInfo.getTotal());
|
||||
pageResponse.setList(pageInfo.getList());
|
||||
|
||||
return pageResponse;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user