模板导入
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
package com.njcn.csdevice.pojo.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -46,9 +43,7 @@ public class CsDevModelAddParm {
|
||||
* 版本日期
|
||||
*/
|
||||
@ApiModelProperty(value = "版本日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date versionDate;
|
||||
private String time;
|
||||
|
||||
/**
|
||||
* 装置模板文件路径
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -57,7 +57,7 @@ public class CsDevModelPO extends BaseEntity {
|
||||
* 版本日期
|
||||
*/
|
||||
@TableField(value = "version_date")
|
||||
private LocalDateTime versionDate;
|
||||
private Date versionDate;
|
||||
|
||||
/**
|
||||
* 装置模板文件路径
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@@ -38,6 +39,7 @@ public class CsDevModelServiceImpl extends ServiceImpl<CsDevModelMapper, CsDevMo
|
||||
CsDevModelPO csDevModelPO = new CsDevModelPO ();
|
||||
BeanUtils.copyProperties (csDevModelAddParm, csDevModelPO);
|
||||
csDevModelPO.setStatus ("1");
|
||||
csDevModelPO.setVersionDate(Date.valueOf(csDevModelAddParm.getTime()));
|
||||
this.save (csDevModelPO);
|
||||
return csDevModelPO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user