Browse Source

1.0.0 解决bug

release/v1.0.0
peihao 4 years ago
parent
commit
0bf3bffc14
  1. 28
      air/src/main/java/com/air/land/controller/LandToListController.java
  2. 2
      air/src/main/java/com/air/land/entity/LandListed.java
  3. 3
      air/src/main/java/com/air/land/entity/LandToList.java
  4. 2
      air/src/main/java/com/air/land/vo/LandToListVo.java

28
air/src/main/java/com/air/land/controller/LandToListController.java

@ -7,6 +7,7 @@ import com.air.land.entity.LandToList;
import com.air.land.service.LandToListService; import com.air.land.service.LandToListService;
import com.air.land.vo.LandListedPageVo; import com.air.land.vo.LandListedPageVo;
import com.air.land.vo.LandToListVo; import com.air.land.vo.LandToListVo;
import com.air.utils.DateUtil;
import com.air.utils.ExcelUtil; import com.air.utils.ExcelUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -26,6 +27,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@ -85,21 +87,39 @@ public class LandToListController {
} }
/** /**
* 保存拟挂牌地块 * 新增拟挂牌地块
* *
* @param landToListVo 拟挂牌地块 * @param landToListVo 拟挂牌地块
* @return R * @return R
*/ */
@ApiOperation(value = "保存拟挂牌地块(新增,修改)", notes = "新增拟挂牌地块(传id为修改,不传为新增)") @ApiOperation(value = "新增拟挂牌地块", notes = "新增拟挂牌地块")
@PostMapping @PostMapping
public R savelandToList(@RequestBody @Validated LandToListVo landToListVo) { public R addlandToList(@RequestBody LandToListVo landToListVo) {
LandToList landToList = new LandToList(); LandToList landToList = new LandToList();
BeanUtil.copyProperties(landToListVo, landToList); BeanUtil.copyProperties(landToListVo, landToList);
landToList.setProposedseriaId(DateUtil.landListedIdfromDate(LocalDateTime.now(),"yyyyMMddHHmmssSSS"));
landToList.setStatusCd(Constant.LAND_TO_STATUS_1000); landToList.setStatusCd(Constant.LAND_TO_STATUS_1000);
landToListService.saveOrUpdate(landToList); landToListService.save(landToList);
return R.ok(landToList.getProposedseriaId()); return R.ok(landToList.getProposedseriaId());
} }
/**
* 修改拟挂牌地块
*
* @param landToListVo 拟挂牌地块
* @return R
*/
@ApiOperation(value = "修改拟挂牌地块", notes = "修改拟挂牌地块")
@PutMapping
public R updatelandToList(@RequestBody LandToListVo landToListVo) {
if (StringUtils.isEmpty(landToListVo.getProposedseriaId())){
return R.failed("id不能为空");
}
LandToList landToList = new LandToList();
BeanUtil.copyProperties(landToListVo, landToList);
return R.ok(landToListService.updateById(landToList));
}
/** /**
* 通过id删除拟挂牌地块 * 通过id删除拟挂牌地块
* *

2
air/src/main/java/com/air/land/entity/LandListed.java

@ -25,7 +25,7 @@ import java.time.LocalDateTime;
public class LandListed extends Model<LandListed> { public class LandListed extends Model<LandListed> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.INPUT)
@ApiModelProperty(value = "id(主键)") @ApiModelProperty(value = "id(主键)")
private String landListedId; private String landListedId;

3
air/src/main/java/com/air/land/entity/LandToList.java

@ -1,6 +1,7 @@
package com.air.land.entity; package com.air.land.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
@ -27,7 +28,7 @@ public class LandToList extends Model<LandToList> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO) @TableId(value = "proposedseria_id",type = IdType.INPUT)
@ApiModelProperty(value = "拟出让序号") @ApiModelProperty(value = "拟出让序号")
private String proposedseriaId; private String proposedseriaId;

2
air/src/main/java/com/air/land/vo/LandToListVo.java

@ -29,7 +29,7 @@ public class LandToListVo {
private String supplyStatus; private String supplyStatus;
@ApiModelProperty(value = "预计挂牌时间") @ApiModelProperty(value = "预计挂牌时间")
private String estimatedListingTime; private LocalDate estimatedListingTime;
@ApiModelProperty(value = "预计挂牌批次") @ApiModelProperty(value = "预计挂牌批次")
private String estimatedListingBatch; private String estimatedListingBatch;

Loading…
Cancel
Save