Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
77bc284a
Commit
77bc284a
authored
Feb 22, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标准库分页查询
parent
0fb39a1c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
28 deletions
+26
-28
Standard.java
quality-review/src/main/java/com/ruoyi/domain/Standard.java
+14
-0
StandardMapper.java
...review/src/main/java/com/ruoyi/mapper/StandardMapper.java
+1
-1
StandardService.java
...view/src/main/java/com/ruoyi/service/StandardService.java
+1
-1
StandardServiceImpl.java
...main/java/com/ruoyi/service/impl/StandardServiceImpl.java
+3
-3
StandardController.java
...eview/src/main/java/com/ruoyi/web/StandardController.java
+2
-2
StandardListRequest.java
.../main/java/com/ruoyi/web/request/StandardListRequest.java
+0
-12
StandardMapper.xml
quality-review/src/main/resources/mapper/StandardMapper.xml
+5
-9
No files found.
quality-review/src/main/java/com/ruoyi/domain/Standard.java
View file @
77bc284a
...
...
@@ -9,6 +9,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 标准
* @TableName t_standard
...
...
@@ -45,4 +47,16 @@ public class Standard {
@ApiModelProperty
(
"文件路径"
)
private
String
file
;
@ApiModelProperty
(
"标准分类"
)
private
String
standardType
;
@ApiModelProperty
(
"标准状态"
)
private
String
standardStatus
;
@ApiModelProperty
(
"发布日期"
)
private
Date
releaseDate
;
@ApiModelProperty
(
"实施日期"
)
private
Date
implementationDate
;
}
quality-review/src/main/java/com/ruoyi/mapper/StandardMapper.java
View file @
77bc284a
...
...
@@ -12,7 +12,7 @@ import java.util.List;
public
interface
StandardMapper
extends
BaseMapper
<
Standard
>
{
// 分页查询
List
<
Standard
>
findList
(
@Param
(
"params"
)
StandardListRequest
request
);
List
<
Standard
>
findList
();
// 根据id查询
Standard
findListById
(
@Param
(
"id"
)
Long
Id
);
...
...
quality-review/src/main/java/com/ruoyi/service/StandardService.java
View file @
77bc284a
...
...
@@ -12,7 +12,7 @@ import java.util.List;
public
interface
StandardService
extends
IService
<
Standard
>
{
// 分页查询
List
<
Standard
>
findList
(
StandardListRequest
request
);
List
<
Standard
>
findList
();
//根据id查询
Standard
findListById
(
Long
id
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StandardServiceImpl.java
View file @
77bc284a
...
...
@@ -18,12 +18,12 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
/**
* 分页查询
* @param
request
* @param
* @return
*/
@Override
public
List
<
Standard
>
findList
(
StandardListRequest
request
)
{
return
standardMapper
.
findList
(
request
);
public
List
<
Standard
>
findList
()
{
return
standardMapper
.
findList
();
}
/**
...
...
quality-review/src/main/java/com/ruoyi/web/StandardController.java
View file @
77bc284a
...
...
@@ -31,12 +31,12 @@ public class StandardController extends BaseController {
* 分页查询
* @return
*/
@ApiOperation
(
"标准
表
分页查询"
)
@ApiOperation
(
"标准
库
分页查询"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findStandardList"
)
public
TableDataInfo
<
Standard
>
findList
(
@Validated
@RequestBody
StandardListRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
standardService
.
findList
(
request
));
return
getDataTable
(
standardService
.
findList
());
}
}
quality-review/src/main/java/com/ruoyi/web/request/StandardListRequest.java
View file @
77bc284a
...
...
@@ -8,16 +8,4 @@ import lombok.Data;
@ApiModel
(
value
=
"StandardListRequest"
,
description
=
"查询标准"
)
@Data
public
class
StandardListRequest
extends
PageDomain
{
/**
* 标准名称
*/
@ApiModelProperty
(
"标准名称"
)
private
String
name
;
/**
* 标准号
*/
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
}
quality-review/src/main/resources/mapper/StandardMapper.xml
View file @
77bc284a
...
...
@@ -9,19 +9,15 @@
<result
property=
"name"
column=
"name"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardNo"
column=
"standard_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"file"
column=
"file"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardType"
column=
"standard_type"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardStatus"
column=
"standard_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"releaseDate"
column=
"release_date"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"implementationDate"
column=
"implementation_date"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.StandardListRequest"
resultMap=
"BaseResultMap"
>
SELECT id, name, standard_no, file
SELECT id, name, standard_no, file
,standard_type,standard_status,release_date,implementation_date
FROM t_standard
<where>
<if
test=
"params.name != null and params.name != ''"
>
and name like concat('%',#{params.name},'%')
</if>
<if
test=
"params.standardNo != null and params.standardNo != ''"
>
and standard_no = #{params.standardNo}
</if>
</where>
</select>
<select
id=
"findListById"
resultMap=
"BaseResultMap"
>
...
...
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