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
a26e7ce5
Commit
a26e7ce5
authored
Feb 27, 2026
by
wujipeng
Browse files
优化
parent
251fe04c
Changes
7
Show whitespace changes
Inline
Side-by-side
pom.xml
View file @
a26e7ce5
...
@@ -41,6 +41,11 @@
...
@@ -41,6 +41,11 @@
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
3.4.0
</version>
<version>
3.4.0
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
</dependencies>
</dependencies>
<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependencies>
...
...
src/main/java/com/ruzhoukj/integration/controller/MetaDataController.java
View file @
a26e7ce5
...
@@ -47,5 +47,4 @@ public class MetaDataController {
...
@@ -47,5 +47,4 @@ public class MetaDataController {
return
Result
.
success
(
metaDataService
.
saveOrUpdate
(
metaDataDTO
));
return
Result
.
success
(
metaDataService
.
saveOrUpdate
(
metaDataDTO
));
}
}
}
}
src/main/java/com/ruzhoukj/integration/mapper/MetaDataMapper.java
View file @
a26e7ce5
...
@@ -18,7 +18,8 @@ import java.util.List;
...
@@ -18,7 +18,8 @@ import java.util.List;
public
interface
MetaDataMapper
extends
BaseMapper
<
MetaDataEntity
>
{
public
interface
MetaDataMapper
extends
BaseMapper
<
MetaDataEntity
>
{
List
<
MetaDataVO
>
getUpDataById
(
@Param
(
"id"
)
String
id
);
List
<
MetaDataVO
>
getUpDataById
(
@Param
(
"id"
)
String
id
);
List
<
MetaDataVO
>
getDownDataById
(
@Param
(
"id"
)
String
id
);
List
<
MetaDataVO
>
getDownDataById
(
@Param
(
"id"
)
String
id
);
MetaDataVO
detail
(
@Param
(
"id"
)
String
id
);
MetaDataVO
detail
(
@Param
(
"id"
)
String
id
);
}
}
src/main/java/com/ruzhoukj/integration/pojo/dto/MetaDataDTO.java
View file @
a26e7ce5
...
@@ -13,4 +13,10 @@ import lombok.EqualsAndHashCode;
...
@@ -13,4 +13,10 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Data
public
class
MetaDataDTO
extends
MetaDataEntity
{
public
class
MetaDataDTO
extends
MetaDataEntity
{
private
Integer
pageNum
=
1
;
private
Integer
pageSize
=
10
;
}
}
src/main/java/com/ruzhoukj/integration/service/MetaDataService.java
View file @
a26e7ce5
package
com.ruzhoukj.integration.service
;
package
com.ruzhoukj.integration.service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruzhoukj.integration.pojo.dto.MetaDataDTO
;
import
com.ruzhoukj.integration.pojo.entity.MetaDataEntity
;
import
com.ruzhoukj.integration.pojo.entity.MetaDataEntity
;
import
com.ruzhoukj.integration.pojo.vo.MetaDataVO
;
import
com.ruzhoukj.integration.pojo.vo.MetaDataVO
;
import
org.springframework.data.domain.Page
;
import
java.util.List
;
import
java.util.List
;
...
@@ -19,4 +21,5 @@ public interface MetaDataService extends IService<MetaDataEntity> {
...
@@ -19,4 +21,5 @@ public interface MetaDataService extends IService<MetaDataEntity> {
List
<
MetaDataVO
>
getDownDataById
(
String
id
);
List
<
MetaDataVO
>
getDownDataById
(
String
id
);
MetaDataVO
detail
(
String
id
);
MetaDataVO
detail
(
String
id
);
}
}
src/main/java/com/ruzhoukj/integration/service/impl/MetaDataServiceImpl.java
View file @
a26e7ce5
...
@@ -2,9 +2,11 @@ package com.ruzhoukj.integration.service.impl;
...
@@ -2,9 +2,11 @@ package com.ruzhoukj.integration.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruzhoukj.integration.mapper.MetaDataMapper
;
import
com.ruzhoukj.integration.mapper.MetaDataMapper
;
import
com.ruzhoukj.integration.pojo.dto.MetaDataDTO
;
import
com.ruzhoukj.integration.pojo.entity.MetaDataEntity
;
import
com.ruzhoukj.integration.pojo.entity.MetaDataEntity
;
import
com.ruzhoukj.integration.pojo.vo.MetaDataVO
;
import
com.ruzhoukj.integration.pojo.vo.MetaDataVO
;
import
com.ruzhoukj.integration.service.MetaDataService
;
import
com.ruzhoukj.integration.service.MetaDataService
;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -31,4 +33,5 @@ public class MetaDataServiceImpl extends ServiceImpl<MetaDataMapper, MetaDataEnt
...
@@ -31,4 +33,5 @@ public class MetaDataServiceImpl extends ServiceImpl<MetaDataMapper, MetaDataEnt
public
MetaDataVO
detail
(
String
id
)
{
public
MetaDataVO
detail
(
String
id
)
{
return
baseMapper
.
detail
(
id
);
return
baseMapper
.
detail
(
id
);
}
}
}
}
src/main/resources/com/ruzhoukj/integration/mapper/MetaDataMapper.xml
View file @
a26e7ce5
...
@@ -28,9 +28,7 @@
...
@@ -28,9 +28,7 @@
CAST(NULL AS CHAR(256)) AS parent_id
CAST(NULL AS CHAR(256)) AS parent_id
FROM meta_data
FROM meta_data
WHERE id = #{id}
WHERE id = #{id}
UNION ALL
UNION ALL
SELECT
SELECT
m.id,
m.id,
m.name,
m.name,
...
...
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