-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix-320][UI] Fix Error data management list Updater field shows ID i…
…nstead of name (#325)
- Loading branch information
Showing
8 changed files
with
200 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...erver/src/main/java/io/datavines/server/api/dto/bo/storage/ErrorDataStoragePageParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.datavines.server.api.dto.bo.storage; | ||
|
||
import lombok.Data; | ||
import javax.validation.constraints.NotNull; | ||
|
||
@Data | ||
@NotNull(message = "ErrorDataStoragePageParam cannot be null") | ||
public class ErrorDataStoragePageParam { | ||
|
||
private Long workspaceId; | ||
|
||
private String searchVal; | ||
|
||
private String type; | ||
|
||
private String startTime; | ||
|
||
private String endTime; | ||
|
||
private Integer pageNumber; | ||
|
||
private Integer pageSize; | ||
|
||
} |
49 changes: 49 additions & 0 deletions
49
datavines-server/src/main/java/io/datavines/server/api/dto/vo/ErrorDataStorageVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.datavines.server.api.dto.vo; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import lombok.Data; | ||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
|
||
@Data | ||
public class ErrorDataStorageVO implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private Long id; | ||
|
||
private String name; | ||
|
||
private String type; | ||
|
||
private String param; | ||
|
||
private Long workspaceId; | ||
|
||
private String creator; | ||
|
||
private String updater; | ||
|
||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | ||
private LocalDateTime startTime; | ||
|
||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | ||
private LocalDateTime updateTime; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
datavines-server/src/main/resources/mapper/ErrorDataStorageMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
<mapper namespace="io.datavines.server.repository.mapper.ErrorDataStorageMapper"> | ||
<sql id="basic_sql"> | ||
select * from dv_error_data_storage | ||
<where> | ||
<if test="type != null"> | ||
and type = #{type} | ||
</if> | ||
<if test="workspaceId != null"> | ||
and workspace_id = #{workspaceId} | ||
</if> | ||
<if test="startTime != null and startTime != ''"> | ||
and update_time >= #{startTime} | ||
</if> | ||
<if test="endTime != null and endTime != ''"> | ||
and update_time <= #{endTime} | ||
</if> | ||
</where> | ||
</sql> | ||
|
||
<select id="getErrorDataStoragePage" resultType="io.datavines.server.api.dto.vo.ErrorDataStorageVO"> | ||
select p.id, p.name, p.type, p.param, p.workspace_id, u.username as updater, p.update_time | ||
from (<include refid="basic_sql"/>) p | ||
left join `dv_user` u on u.id = p.update_by | ||
<where> | ||
<if test="searchVal != null"> | ||
LOWER(p.`name`) LIKE CONCAT(CONCAT('%', LOWER(#{searchVal})), '%') | ||
</if> | ||
</where> | ||
</select> | ||
|
||
|
||
|
||
</mapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters