diff --git a/air/src/main/java/com/air/applets/controller/LandListedController.java b/air/src/main/java/com/air/applets/controller/LandListedController.java index ac99c7c..f36d12c 100644 --- a/air/src/main/java/com/air/applets/controller/LandListedController.java +++ b/air/src/main/java/com/air/applets/controller/LandListedController.java @@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.time.LocalDate; +import java.time.Period; import java.util.List; @@ -100,8 +101,10 @@ public class LandListedController { landListed.setTransactionStatus(LandListStatusEnum.DEAL_DONE.getCode()); }else if (localDate.isBefore(landListed.getAuctionDate())){ landListed.setTransactionStatus(LandListStatusEnum.LISTED.getCode()); - }else if (!localDate.isBefore(landListed.getAuctionDate()) && StrUtil.equals(landListed.getDeal(),"0")){ + }else if (localDate.isAfter(landListed.getAuctionDate()) && StrUtil.equals(landListed.getDeal(),"0")){ landListed.setTransactionStatus(LandListStatusEnum.PASS_BY.getCode()); + }else if (Period.between(landListed.getAuctionDate(),localDate).getDays() == 0){ + landListed.setTransactionStatus(LandListStatusEnum.LISTED.getCode()); } return R.ok(landListed); } diff --git a/air/src/main/resources/mapper/LandListedLonLatMapper.xml b/air/src/main/resources/mapper/LandListedLonLatMapper.xml index 5546f17..6f97342 100644 --- a/air/src/main/resources/mapper/LandListedLonLatMapper.xml +++ b/air/src/main/resources/mapper/LandListedLonLatMapper.xml @@ -8,12 +8,11 @@ insert into land_listed_lon_lat( land_listed_id, anno_id, land_code, name, land_lon_lat, line_width, line_color, line_opaqueness, fill_color, fill_opaqueness, status_cd, status_date, create_user_id, - create_date, update_user_id, update_date, remark, geom) + create_date, update_user_id, update_date, remark) values( #{landListedId}, #{annoId}, #{landCode}, #{name}, #{landLonLat}, #{lineWidth}, #{lineColor} , #{lineOpaqueness}, #{fillColor}, #{fillOpaqueness}, #{statusCd}, now(), #{createUserId} - , now(), #{updateUserId}, now(), #{remark}, ST_GeometryFromText(#{geom}) - ) + , now(), #{updateUserId}, now(), #{remark})