Commit 396f5003 authored by yaobaizheng's avatar yaobaizheng

添加土地筛选项 轮播图枚举修改

parent 51f167ee
...@@ -13,10 +13,8 @@ public enum CarouselTypeEnum { ...@@ -13,10 +13,8 @@ public enum CarouselTypeEnum {
DUSHIQUAN(0, "都市圈"), DUSHIQUAN(0, "都市圈"),
KAIFAQU(1, "开发区"), KAIFAQU(1, "开发区"),
YUANQU(2, "园区"), YUANQU(2, "园区"),
LAND(4, "土地轮播图"), LAND(3, "土地轮播图"),
CARRIER(5, "载体轮播图"), CARRIER(4, "载体轮播图");
SHOUYE(3, "园区字典首页"),
LYYSHOUYE(6, "立业云首页");
private final Integer type; private final Integer type;
private final String typeName; private final String typeName;
......
...@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.List;
/** /**
* @Author:zhouxudong * @Author:zhouxudong
* @version: 1.0 * @version: 1.0
...@@ -24,4 +26,18 @@ public class LandPageDto { ...@@ -24,4 +26,18 @@ public class LandPageDto {
private String name; private String name;
//开发区id //开发区id
private Integer developmentId; private Integer developmentId;
/** 土地类型(1:工业土地 2:商业土地) */
@ApiModelProperty(value = "土地类型(工业土地 商业土地)", notes = "")
private String landType;
@ApiModelProperty(value = "面积")
private String area;
@ApiModelProperty(hidden = true)
private Double lowArea;
@ApiModelProperty(hidden = true)
private Double highArea;
@ApiModelProperty(hidden = true)
private List<Integer> statusList;
} }
...@@ -9,6 +9,7 @@ import com.postcard.service.domain.Direction; ...@@ -9,6 +9,7 @@ import com.postcard.service.domain.Direction;
import com.postcard.service.domain.ParamEntity; import com.postcard.service.domain.ParamEntity;
import com.postcard.service.domain.Sort; import com.postcard.service.domain.Sort;
import com.postcard.service.enums.CarouselTypeEnum; import com.postcard.service.enums.CarouselTypeEnum;
import com.postcard.service.enums.DevelopmentStatusEnum;
import com.postcard.service.moudle.development.entity.DevelopmentInfo; import com.postcard.service.moudle.development.entity.DevelopmentInfo;
import com.postcard.service.moudle.development.service.DevelopmentInfoService; import com.postcard.service.moudle.development.service.DevelopmentInfoService;
import com.postcard.service.moudle.land.dto.LandPageDto; import com.postcard.service.moudle.land.dto.LandPageDto;
...@@ -30,6 +31,7 @@ import org.springframework.util.ObjectUtils; ...@@ -30,6 +31,7 @@ import org.springframework.util.ObjectUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.StringJoiner; import java.util.StringJoiner;
...@@ -59,8 +61,18 @@ public class LandInfoServiceImpl extends ServiceImpl<LandInfoMapper, LandInfoEnt ...@@ -59,8 +61,18 @@ public class LandInfoServiceImpl extends ServiceImpl<LandInfoMapper, LandInfoEnt
@Override @Override
public Page<LandPageVo> pageInfo(ParamEntity<LandPageDto> param) { public Page<LandPageVo> pageInfo(ParamEntity<LandPageDto> param) {
LandPageDto condition = param.getCondition(); LandPageDto condition = param.getCondition();
condition.setDevelopmentId(developMentId); condition.setDevelopmentId(developMentId);
String area = condition.getArea();
if (!StringUtils.isEmpty(area)) {
String[] split = area.split("-");
condition.setLowArea(Double.valueOf(split[0]));
if (split.length > 1) {
condition.setHighArea(Double.valueOf(split[1]));
}
}
condition.setStatusList(Arrays.asList(DevelopmentStatusEnum.STATUS_YRZ.getCode(), DevelopmentStatusEnum.STATUS_DRZ.getCode()));
List<Sort> sortList = new ArrayList<>(); List<Sort> sortList = new ArrayList<>();
sortList.add(new Sort(Direction.DESC,"-a.sort_development")); sortList.add(new Sort(Direction.DESC,"-a.sort_development"));
sortList.add(new Sort(Direction.DESC,"a.create_time")); sortList.add(new Sort(Direction.DESC,"a.create_time"));
......
...@@ -75,6 +75,21 @@ ...@@ -75,6 +75,21 @@
case when a.area is null then '' else CONCAT(ROUND(a.area,0),'亩') end , case when a.area is null then '' else CONCAT(ROUND(a.area,0),'亩') end ,
a.type) LIKE concat('%', #{param.name}, '%') a.type) LIKE concat('%', #{param.name}, '%')
</if> </if>
<if test="param.lowArea != null and param.lowArea != ''">
and a.area &gt;= #{param.lowArea}
</if>
<if test="param.highArea != null and param.highArea != ''">
and a.area &lt;= #{param.highArea}
</if>
<if test="param.landType != null and param.landType != ''">
and a.type=#{param.landType}
</if>
<if test="param.statusList != null and param.statusList.size() > 0 ">
AND b.`status` IN
<foreach item="status" collection="param.statusList" open="(" separator="," close=")">
#{status}
</foreach>
</if>
-- order by a.create_time desc -- order by a.create_time desc
</select> </select>
</mapper> </mapper>
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