Commit e94a09db authored by unset's avatar unset

Merge remote-tracking branch 'origin/dev' into dev

parents cf65ec1e 86cebd84
......@@ -13,5 +13,5 @@ import java.util.List;
public class BgImageQueryDTO extends PageParam {
String name;
String imageSatelliteType;
String resolution;
BigDecimal resolution;
}
\ No newline at end of file
......@@ -175,12 +175,16 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
public void setStartDate(String startDate) {
this.startDate = startDate;
this.startDateTime = DateUtil.beginOfDay(DateUtil.parseDate(startDate)).toString();
if(StrUtil.isNotBlank(startDate)) {
this.startDateTime = DateUtil.beginOfDay(DateUtil.parseDate(startDate)).toString();
}
}
public void setEndDate(String endDate) {
this.endDate = endDate;
this.endDateTime = DateUtil.endOfDay(DateUtil.parseDate(endDate)).toString();
if(StrUtil.isNotBlank(endDate)) {
this.endDateTime = DateUtil.endOfDay(DateUtil.parseDate(endDate)).toString();
}
}
public void setAreaNo(String areaNo) {
......
......@@ -12,9 +12,14 @@ import lombok.Data;
@Data
public class ImageInformationDto extends PageParam {
public static final int SORT_TYPE_ASC = 1;
public static final int SORT_TYPE_DESC = 2;
String name;
Integer status;
Integer indexShow;
Integer sortType;
}
......@@ -70,6 +70,13 @@ public class ImageInformationBiz extends BaseBiz<ImageInformationMapper, ImageIn
if (imageInformationDto.getIndexShow() != null) {
criteria.andEqualTo("indexShow", imageInformationDto.getIndexShow());
}
if (imageInformationDto.getSortType() != null) {
if(ImageInformationDto.SORT_TYPE_ASC == imageInformationDto.getSortType()) {
example.orderBy("rank").asc();
}else {
example.orderBy("rank").desc();
}
}
example.orderBy("updTime").desc();
Query query = new Query(imageInformationDto);
PageDataVO<ImageInformation> pageDataVO = PageDataVO.pageInfo(query, () -> mapper.selectByExample(example));
......
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