制度管理新增上传时间
parent
3aab27eee1
commit
95b2fa97df
|
|
@ -14,6 +14,7 @@ import com.gunshi.project.xyt.validate.markers.Update;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -50,6 +51,9 @@ public class SzRegulatoryFrameworkController extends AbstractCommonFileControlle
|
||||||
dto.setCreateTime(new Date());
|
dto.setCreateTime(new Date());
|
||||||
dto.setId(IdWorker.getId());
|
dto.setId(IdWorker.getId());
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(dto.getFiles())){
|
||||||
|
dto.setUploadDate(new Date());
|
||||||
|
}
|
||||||
boolean result = service.save(dto);
|
boolean result = service.save(dto);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -72,6 +76,9 @@ public class SzRegulatoryFrameworkController extends AbstractCommonFileControlle
|
||||||
throw new IllegalArgumentException("当前名称已存在");
|
throw new IllegalArgumentException("当前名称已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(dto.getFiles())){
|
||||||
|
dto.setUploadDate(new Date());
|
||||||
|
}
|
||||||
dto.setCreateBy(null);
|
dto.setCreateBy(null);
|
||||||
dto.setCreateName(null);
|
dto.setCreateName(null);
|
||||||
dto.setUpdateTime(new Date());
|
dto.setUpdateTime(new Date());
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,16 @@ public class SzRegulatoryFramework extends CommUpdate implements Serializable {
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传时间
|
||||||
|
*/
|
||||||
|
@Schema(description="上传时间 格式:" + DateFormatString.YYYY_MM_DD_HH_MM_SS)
|
||||||
|
@TableField(value="upload_date")
|
||||||
|
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||||
|
private Date uploadDate;
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 创建人Id
|
// * 创建人Id
|
||||||
// */
|
// */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue