提交 e7b35eae authored 作者: 133's avatar 133

[清退]、[培训] 添加json时间返回格式 yyyy mm dd

上级 c7120aaf
......@@ -8,10 +8,13 @@ import org.springframework.format.datetime.DateFormatterRegistrar;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.format.support.DefaultFormattingConversionService;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.security.web.method.annotation.AuthenticationPrincipalArgumentResolver;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import java.time.format.DateTimeFormatter;
import java.util.List;
/**
* DateTimeConfig.
......@@ -60,4 +63,8 @@ public class WebMvcConfigConfig extends WebMvcConfigurationSupport {
return conversionService;
}
@Override
protected void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
argumentResolvers.add(new AuthenticationPrincipalArgumentResolver());
}
}
package com.tykj.dev.device.sendback.entity.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -47,6 +48,7 @@ public class SendBackBill {
* 截止时间
*/
@ApiModelProperty(value = "截止时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date deadLine;
/**
* 涉及装备id(x作为分隔符),例如x1x2x,意为id为1,2的装备需要退回
......@@ -64,6 +66,7 @@ public class SendBackBill {
*/
@CreatedDate
@ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
/**
* 更新用户id
......
package com.tykj.dev.device.sendback.entity.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -66,12 +67,14 @@ public class SendBackBillDetail {
*/
@Column(name = "send_time", columnDefinition = "not null datetime 配发时间")
@ApiModelProperty(value = "配发时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date sendTime;
/**
* 接收时间
*/
@Column(name = "receive_time", columnDefinition = "null datetime 接收时间")
@ApiModelProperty(value = "接收时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date receiveTime;
/**
* 发件方id(A岗位)
......@@ -202,6 +205,7 @@ public class SendBackBillDetail {
@LastModifiedDate
@Column(name = "update_time", columnDefinition = "not null datetime 更新时间")
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
/**
* 删除标记(0:未删除,1:已删除)
......@@ -240,6 +244,7 @@ public class SendBackBillDetail {
private String num;
@ApiModelProperty(value = "截至日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time;
@ApiModelProperty(value = "发件单位签章id")
......
package com.tykj.dev.device.sendback.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -20,66 +21,68 @@ public class SendBackOutFormVo {
/**
* 申请文号
*/
@Column(name = "apply_number", columnDefinition = "not null varchar(255) 申请文号")
@Column(name = "apply_number")
@ApiModelProperty(value = "申请文号")
private String applyNumber;
/**
* 批复文号
*/
@Column(name = "replay_number", columnDefinition = "not null varchar(255) 批复文号")
@Column(name = "replay_number")
@ApiModelProperty(value = "批复文号")
private String replayNumber;
/**
* 发件单位
*/
@Column(name = "send_unit", columnDefinition = "not null varchar(32) 发件单位")
@Column(name = "send_unit")
@ApiModelProperty(value = "发件单位")
private String sendUnit;
/**
* 收件单位
*/
@Column(name = "receive_unit", columnDefinition = "not null varchar(32) 收件单位")
@Column(name = "receive_unit")
@ApiModelProperty(value = "收件单位")
private String receiveUnit;
/**
* 配发时间
*/
@Column(name = "send_time", columnDefinition = "not null datetime 配发时间")
@Column(name = "send_time")
@ApiModelProperty(value = "配发时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date sendTime;
/**
* 接收时间
*/
@Column(name = "receive_time", columnDefinition = "null datetime 接收时间")
@Column(name = "receive_time")
@ApiModelProperty(value = "接收时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date receiveTime;
/**
* 发件方id(A岗位)
*/
@Column(name = "send_userA_id", columnDefinition = "not null int(11) 发件方id(A岗位)")
@Column(name = "send_userA_id")
@ApiModelProperty(value = "发件方id(A岗位)")
private String sendUserAName;
/**
* 发件方id(B岗位)
*/
@Column(name = "send_userB_id", columnDefinition = "not null int(11) 发件方id(B岗位)")
@Column(name = "send_userB_id")
@ApiModelProperty(value = "发件方id(B岗位)")
private String sendUserBName;
/**
* 收件方id(A岗位)
*/
@Column(name = "receive_userA_id", columnDefinition = "not null int(11) 收件方id(A岗位)")
@Column(name = "receive_userA_id")
@ApiModelProperty(value = "收件方id(A岗位)")
private String receiveUserAName;
/**
* 收件方id(B岗位)
*/
@Column(name = "receive_userB_id", columnDefinition = "null int(11) 收件方id(B岗位)")
@Column(name = "receive_userB_id")
@ApiModelProperty(value = "收件方id(B岗位)")
private String receiveUserBName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime;
private Integer page;
......
package com.tykj.dev.device.sendback.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -27,6 +28,7 @@ public class SendBackOutVo {
private Integer id;
@ApiModelProperty(value = "截止时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time;
@ApiModelProperty(value = "应出库")
......
package com.tykj.dev.device.sendback.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -24,6 +25,7 @@ public class SendBackVo {
private String name;
@ApiModelProperty(value = "截至日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time;
@ApiModelProperty(value = "是否可以办结")
......
package com.tykj.dev.device.sendback.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -19,6 +20,7 @@ import java.util.List;
public class UnDeviceDesVo {
@ApiModelProperty(value = "时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time;
@ApiModelProperty(value = "用户名称")
......
......@@ -46,6 +46,7 @@ public class TrainTheme {
/**
* 报名截止时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "报名截止时间")
private Date trainTime;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论