Commit 02337cc1 by zhouhb

[+]时间处理

1 parent 5ad74fed
...@@ -104,6 +104,13 @@ public class MerchantRopResponse { ...@@ -104,6 +104,13 @@ public class MerchantRopResponse {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime; private Date createdTime;
/**
* 更新时间
*/
@ApiModelProperty(name = "updatedTime", notes = "更新时间",dataType = "date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
/** /**
* 渠道id * 渠道id
......
...@@ -36,7 +36,7 @@ public class StaffExportResponse implements Serializable { ...@@ -36,7 +36,7 @@ public class StaffExportResponse implements Serializable {
* 状态 * 状态
*/ */
@Excel(name = "状态", orderNum="3") @Excel(name = "状态", orderNum="3")
private String status; private String statusName;
/** /**
...@@ -67,7 +67,7 @@ public class StaffExportResponse implements Serializable { ...@@ -67,7 +67,7 @@ public class StaffExportResponse implements Serializable {
/** /**
* 创建时间 * 创建时间
*/ */
@Excel(name = "创建时间", orderNum="8") @Excel(name = "更新时间", orderNum="8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String createDate; private String createDate;
......
...@@ -54,6 +54,13 @@ public class StaffResponse implements Serializable { ...@@ -54,6 +54,13 @@ public class StaffResponse implements Serializable {
private Date createdTime; private Date createdTime;
/** /**
* 创建时间
*/
@ApiModelProperty(name = "updatedTime", notes = "更新时间", dataType = "Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
/**
* 商户id * 商户id
*/ */
@ApiModelProperty(name = "merchantId", notes = "商户id", dataType = "Integer") @ApiModelProperty(name = "merchantId", notes = "商户id", dataType = "Integer")
......
...@@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -153,6 +154,8 @@ public class StaffService { ...@@ -153,6 +154,8 @@ public class StaffService {
staffResponses.forEach(index -> { staffResponses.forEach(index -> {
index.setCreateDate(DateUtils.format(index.getCreatedTime(), DateUtils.NORMAL_DATE_TIME_PATTERN)); index.setCreateDate(DateUtils.format(index.getCreatedTime(), DateUtils.NORMAL_DATE_TIME_PATTERN));
}); });
String time = new Date().getTime()+"";
String filename="员工列表"+time;
byte[] bytes = ExcelUtiles.exportGoodsExcel(staffResponses, StaffExportResponse.class); byte[] bytes = ExcelUtiles.exportGoodsExcel(staffResponses, StaffExportResponse.class);
FileUploadServerData fileUploadServerData = FileUploadUtil.uploadToFileSystem(systemProperty.getUploadFileUrl(), "", bytes, "xlsx"); FileUploadServerData fileUploadServerData = FileUploadUtil.uploadToFileSystem(systemProperty.getUploadFileUrl(), "", bytes, "xlsx");
return fileUploadServerData.getUrl(); return fileUploadServerData.getUrl();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!