Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
integration
Commits
5422ecd5
Commit
5422ecd5
authored
Mar 06, 2026
by
wujipeng
Browse files
元数据自定义查询
parent
264a621a
Changes
4
Show whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/integration/constant/TimeOffset.java
0 → 100644
View file @
5422ecd5
package
com.ruzhoukj.integration.constant
;
import
lombok.Getter
;
/**
* @author : wujipeng
* @date : 2026/3/4 10:17
* @Version: 1.0
* @Desc : 描述信息
*/
@Getter
public
enum
TimeOffset
{
THE_SAME_PERIOD_LAST_YEAR
(
"去年同期"
),
THE_FIRST_HALF_OF_THIS_YEAR
(
"本年上期"
);
private
final
String
name
;
TimeOffset
(
String
name
)
{
this
.
name
=
name
;
}
}
src/main/java/com/ruzhoukj/integration/pojo/entity/MetaDataEntity.java
View file @
5422ecd5
...
@@ -3,9 +3,12 @@ package com.ruzhoukj.integration.pojo.entity;
...
@@ -3,9 +3,12 @@ package com.ruzhoukj.integration.pojo.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
/**
/**
* @author : wujipeng
* @author : wujipeng
* @date : 2026/2/27 14:15
* @date : 2026/2/27 14:15
...
@@ -39,4 +42,14 @@ public class MetaDataEntity {
...
@@ -39,4 +42,14 @@ public class MetaDataEntity {
@ApiModelProperty
(
value
=
"版本"
)
@ApiModelProperty
(
value
=
"版本"
)
private
String
version
;
private
String
version
;
@ApiModelProperty
(
value
=
"所属厂"
)
private
String
factory
;
@ApiModelProperty
(
value
=
"数据时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
date
;
@ApiModelProperty
(
value
=
"所属部门"
)
private
String
dept
;
}
}
src/main/java/com/ruzhoukj/integration/result/ResultCode.java
View file @
5422ecd5
package
com.ruzhoukj.integration.result
;
package
com.ruzhoukj.integration.result
;
import
lombok.Getter
;
/**
/**
* 响应状态码枚举
* 响应状态码枚举
*/
*/
@Getter
public
enum
ResultCode
{
public
enum
ResultCode
{
SUCCESS
(
200
,
"操作成功"
),
SUCCESS
(
200
,
"操作成功"
),
...
@@ -17,19 +20,11 @@ public enum ResultCode {
...
@@ -17,19 +20,11 @@ public enum ResultCode {
INTERNAL_SERVER_ERROR
(
500
,
"服务器内部错误"
),
INTERNAL_SERVER_ERROR
(
500
,
"服务器内部错误"
),
SERVICE_UNAVAILABLE
(
503
,
"服务不可用"
);
SERVICE_UNAVAILABLE
(
503
,
"服务不可用"
);
private
Integer
code
;
private
final
Integer
code
;
private
String
message
;
private
final
String
message
;
ResultCode
(
Integer
code
,
String
message
)
{
ResultCode
(
Integer
code
,
String
message
)
{
this
.
code
=
code
;
this
.
code
=
code
;
this
.
message
=
message
;
this
.
message
=
message
;
}
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getMessage
()
{
return
message
;
}
}
}
\ No newline at end of file
src/main/resources/com/ruzhoukj/integration/mapper/MetaDataMapper.xml
View file @
5422ecd5
...
@@ -64,17 +64,33 @@
...
@@ -64,17 +64,33 @@
hidden = 0
hidden = 0
</select>
</select>
<select
id=
"getPageData"
resultType=
"com.ruzhoukj.integration.pojo.vo.MetaDataVO"
>
<select
id=
"getPageData"
resultType=
"com.ruzhoukj.integration.pojo.vo.MetaDataVO"
>
select id,
select
id,
name,
name,
value,
value,
reunite,
reunite,
formula,
formula,
attribute,
attribute,
hidden,
hidden,
version
version,
factory,
date,
dept
from
from
meta_data
meta_data
where
where
hidden = 0
hidden = 0
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"factory != null and factory != ''"
>
and factory like concat('%', #{factory}, '%')
</if>
<if
test=
"date != null"
>
and date = #{date}
</if>
<if
test=
"dept != null and dept != ''"
>
and dept like concat('%', #{dept}, '%')
</if>
</select>
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment