Browse Source

数据接入日志

2024年9月26日14:12:51
thing_master
lishuai 1 year ago
parent
commit
792791b4a3
  1. 12
      modules/thing/src/main/java/com/thing/extend/dto/TransportExtendMsgDTO.java
  2. 3
      modules/thing/src/main/java/com/thing/extend/service/impl/TransportExtendMsgServiceImpl.java

12
modules/thing/src/main/java/com/thing/extend/dto/TransportExtendMsgDTO.java

@ -41,15 +41,15 @@ public class TransportExtendMsgDTO implements Serializable {
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Long creator;
@Schema(description = "创建时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
@JsonFormat(pattern = DateTimeUtils.DATE_TIME_PATTERN_STR)
private Date createDate;
// @JsonProperty(access = JsonProperty.Access.READ_ONLY)
// @JsonFormat(pattern = DateTimeUtils.DATE_TIME_PATTERN_STR)
private Long createDate;
@Schema(description = "更新者")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Long updater;
@Schema(description = "更新时间")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
@JsonFormat(pattern = DateTimeUtils.DATE_TIME_PATTERN_STR)
private Date updateDate;
// @JsonProperty(access = JsonProperty.Access.READ_ONLY)
// @JsonFormat(pattern = DateTimeUtils.DATE_TIME_PATTERN_STR)
private Long updateDate;
}

3
modules/thing/src/main/java/com/thing/extend/service/impl/TransportExtendMsgServiceImpl.java

@ -8,6 +8,7 @@ import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.thing.common.core.constants.Constant;
import com.thing.common.core.exception.SysException;
import com.thing.common.core.utils.DateTimeUtils;
import com.thing.common.core.utils.excel.ExcelUtils;
import com.thing.common.core.web.response.PageData;
import com.thing.common.orm.service.impl.BaseServiceImpl;
@ -164,7 +165,7 @@ public class TransportExtendMsgServiceImpl extends BaseServiceImpl<TransportExte
}
List<TransportExtendMsgDTO> list = mapper.getList(params);
List<TransportExtendMsgExcel> collect = list.parallelStream()
.map(item -> new TransportExtendMsgExcel(item.getConfiguration(), item.getInputMsg(), item.getOutputMsg(), item.getErrorMsg(), DateUtil.formatDateTime(item.getCreateDate())))
.map(item -> new TransportExtendMsgExcel(item.getConfiguration(), item.getInputMsg(), item.getOutputMsg(), item.getErrorMsg(), DateTimeUtils.timeConvertStr(item.getCreateDate())))
.sorted(Comparator.comparing(TransportExtendMsgExcel::getCreateDate).reversed())
.collect(Collectors.toList());
ExcelUtils.exportExcel(collect, extendEntity.getName() + "消息日志", null, TransportExtendMsgExcel.class, extendEntity.getName() + "消息日志.xls", response);

Loading…
Cancel
Save