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
4494e04e
Commit
4494e04e
authored
Dec 28, 2023
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangfei' into 'dev'
Feat See merge request
!17
parents
29e4eee9
33fdd0d5
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
118 additions
and
27 deletions
+118
-27
Book.java
quality-review/src/main/java/com/ruoyi/domain/Book.java
+5
-0
BookMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/BookMapper.java
+1
-1
BookService.java
...y-review/src/main/java/com/ruoyi/service/BookService.java
+2
-2
BookServiceImpl.java
...src/main/java/com/ruoyi/service/impl/BookServiceImpl.java
+3
-3
BookController.java
...ty-review/src/main/java/com/ruoyi/web/BookController.java
+28
-13
ReviewSceneChangeTaskController.java
...n/java/com/ruoyi/web/ReviewSceneChangeTaskController.java
+7
-8
BookDeleteRequest.java
...rc/main/java/com/ruoyi/web/request/BookDeleteRequest.java
+14
-0
BookListRequest.java
.../src/main/java/com/ruoyi/web/request/BookListRequest.java
+15
-0
ReviewSceneChangeTaskFindCreateRequest.java
...i/web/request/ReviewSceneChangeTaskFindCreateRequest.java
+8
-0
ReviewSceneChangeTaskFindFinishRequest.java
...i/web/request/ReviewSceneChangeTaskFindFinishRequest.java
+8
-0
ReviewSceneChangeTaskFindPendingRequest.java
.../web/request/ReviewSceneChangeTaskFindPendingRequest.java
+8
-0
BaseController.java
...java/com/ruoyi/common/core/controller/BaseController.java
+12
-0
PageDomain.java
.../src/main/java/com/ruoyi/common/core/page/PageDomain.java
+7
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/Book.java
View file @
4494e04e
...
@@ -3,12 +3,15 @@ package com.ruoyi.domain;
...
@@ -3,12 +3,15 @@ package com.ruoyi.domain;
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.ruoyi.common.core.domain.BaseEntity
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
* 书籍
* 书籍
* @TableName t_book
* @TableName t_book
*/
*/
@ApiModel
@TableName
(
value
=
"t_book"
)
@TableName
(
value
=
"t_book"
)
@Data
@Data
public
class
Book
extends
BaseEntity
{
public
class
Book
extends
BaseEntity
{
...
@@ -17,12 +20,14 @@ public class Book extends BaseEntity {
...
@@ -17,12 +20,14 @@ public class Book extends BaseEntity {
/**
/**
* 主键
* 主键
*/
*/
@ApiModelProperty
(
"主键"
)
@TableId
@TableId
private
Long
id
;
private
Long
id
;
/**
/**
* 书名
* 书名
*/
*/
@ApiModelProperty
(
"书名"
)
private
String
name
;
private
String
name
;
}
}
\ No newline at end of file
quality-review/src/main/java/com/ruoyi/mapper/BookMapper.java
View file @
4494e04e
...
@@ -18,7 +18,7 @@ import java.util.List;
...
@@ -18,7 +18,7 @@ import java.util.List;
*/
*/
@Repository
@Repository
public
interface
BookMapper
extends
BaseMapper
<
Book
>
{
public
interface
BookMapper
extends
BaseMapper
<
Book
>
{
List
<
Book
>
selectBookList
(
Book
book
);
List
<
Book
>
selectBookList
(
@Param
(
"name"
)
String
name
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/BookService.java
View file @
4494e04e
...
@@ -15,8 +15,8 @@ import java.util.List;
...
@@ -15,8 +15,8 @@ import java.util.List;
*/
*/
public
interface
BookService
extends
IService
<
Book
>
{
public
interface
BookService
extends
IService
<
Book
>
{
List
<
Book
>
selectBookList
(
Book
book
);
List
<
Book
>
selectBookList
(
String
name
);
List
<
Book
>
selectBookListException
(
Book
book
);
List
<
Book
>
selectBookListException
(
String
name
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/BookServiceImpl.java
View file @
4494e04e
...
@@ -27,12 +27,12 @@ public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements Bo
...
@@ -27,12 +27,12 @@ public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements Bo
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Override
@Override
public
List
<
Book
>
selectBookList
(
Book
book
)
{
public
List
<
Book
>
selectBookList
(
String
name
)
{
return
bookMapper
.
selectBookList
(
book
);
return
bookMapper
.
selectBookList
(
name
);
}
}
@Override
@Override
public
List
<
Book
>
selectBookListException
(
Book
book
)
{
public
List
<
Book
>
selectBookListException
(
String
name
)
{
if
(
1
==
1
)
{
if
(
1
==
1
)
{
throw
new
ServiceException
(
"测试异常处理"
);
throw
new
ServiceException
(
"测试异常处理"
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/BookController.java
View file @
4494e04e
package
com
.
ruoyi
.
web
;
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.
AjaxResult
;
import
com.ruoyi.common.core.domain.
R
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.domain.Book
;
import
com.ruoyi.domain.Book
;
import
com.ruoyi.service.BookService
;
import
com.ruoyi.service.BookService
;
import
com.ruoyi.web.request.BookDeleteRequest
;
import
com.ruoyi.web.request.BookListRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
...
@@ -16,45 +20,56 @@ import java.util.Arrays;
...
@@ -16,45 +20,56 @@ import java.util.Arrays;
import
java.util.List
;
import
java.util.List
;
@Api
(
"书籍管理"
)
@RestController
@RestController
@RequestMapping
(
"/book"
)
@RequestMapping
(
"/book"
)
public
class
BookController
extends
BaseController
{
public
class
BookController
extends
BaseController
{
@Autowired
@Autowired
private
BookService
bookService
;
private
BookService
bookService
;
@ApiOperation
(
"添加书籍"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
public
AjaxResult
add
(
@Validated
@RequestBody
Book
book
)
{
public
R
add
(
@Validated
@RequestBody
Book
book
)
{
return
toAjax
(
bookService
.
save
(
book
));
bookService
.
save
(
book
);
return
R
.
ok
();
}
}
@ApiOperation
(
"修改书籍"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
public
AjaxResult
edit
(
@Validated
@RequestBody
Book
book
)
{
public
R
edit
(
@Validated
@RequestBody
Book
book
)
{
return
toAjax
(
bookService
.
updateById
(
book
));
bookService
.
updateById
(
book
);
return
R
.
ok
();
}
}
@ApiOperation
(
"查询书籍列表"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/list"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/list"
)
public
TableDataInfo
list
(
@Validated
@RequestBody
Book
book
)
{
public
TableDataInfo
list
(
@Validated
@RequestBody
Book
ListRequest
request
)
{
startPage
();
startPage
(
request
);
List
<
Book
>
books
=
bookService
.
selectBookList
(
book
);
List
<
Book
>
books
=
bookService
.
selectBookList
(
request
.
getName
()
);
return
getDataTable
(
books
);
return
getDataTable
(
books
);
}
}
@ApiOperation
(
"删除书籍"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/remove"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/remove"
)
public
AjaxResult
remove
(
@Validated
@RequestBody
Long
[]
userIds
)
{
public
R
remove
(
@Validated
@RequestBody
BookDeleteRequest
request
)
{
return
toAjax
(
bookService
.
removeBatchByIds
(
Arrays
.
asList
(
userIds
)));
bookService
.
removeBatchByIds
(
Arrays
.
asList
(
request
.
getIds
()));
return
R
.
ok
();
}
}
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/listException"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/listException"
)
public
TableDataInfo
listException
(
@Validated
@RequestBody
Book
book
)
{
public
TableDataInfo
listException
(
@Validated
@RequestBody
Book
ListRequest
request
)
{
startPage
();
startPage
(
request
);
List
<
Book
>
books
=
bookService
.
selectBookListException
(
book
);
List
<
Book
>
books
=
bookService
.
selectBookListException
(
request
.
getName
()
);
return
getDataTable
(
books
);
return
getDataTable
(
books
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewSceneChangeTaskController.java
View file @
4494e04e
...
@@ -8,8 +8,7 @@ import com.ruoyi.common.enums.BusinessType;
...
@@ -8,8 +8,7 @@ import com.ruoyi.common.enums.BusinessType;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
...
@@ -74,8 +73,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
...
@@ -74,8 +73,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
public
TableDataInfo
<
ReviewSceneChangeTask
>
findPending
()
{
public
TableDataInfo
<
ReviewSceneChangeTask
>
findPending
(
@Validated
@RequestBody
ReviewSceneChangeTaskFindPendingRequest
request
)
{
startPage
();
startPage
(
request
);
return
getDataTable
(
reviewSceneChangeTaskService
.
findPendingListByUserId
(
getUserId
()));
return
getDataTable
(
reviewSceneChangeTaskService
.
findPendingListByUserId
(
getUserId
()));
}
}
...
@@ -87,8 +86,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
...
@@ -87,8 +86,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findFinish"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findFinish"
)
public
TableDataInfo
<
ReviewSceneChangeTask
>
findFinish
()
{
public
TableDataInfo
<
ReviewSceneChangeTask
>
findFinish
(
ReviewSceneChangeTaskFindFinishRequest
request
)
{
startPage
();
startPage
(
request
);
return
getDataTable
(
reviewSceneChangeTaskService
.
findFinishListByUserId
(
getUserId
()));
return
getDataTable
(
reviewSceneChangeTaskService
.
findFinishListByUserId
(
getUserId
()));
}
}
...
@@ -100,8 +99,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
...
@@ -100,8 +99,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findCreate"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findCreate"
)
public
TableDataInfo
<
ReviewSceneChangeTask
>
findCreate
()
{
public
TableDataInfo
<
ReviewSceneChangeTask
>
findCreate
(
ReviewSceneChangeTaskFindCreateRequest
request
)
{
startPage
();
startPage
(
request
);
return
getDataTable
(
reviewSceneChangeTaskService
.
findCreateListByUserId
(
getUserId
()));
return
getDataTable
(
reviewSceneChangeTaskService
.
findCreateListByUserId
(
getUserId
()));
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/BookDeleteRequest.java
0 → 100644
View file @
4494e04e
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
public
class
BookDeleteRequest
{
@ApiModelProperty
(
"书籍id"
)
private
Long
[]
ids
;
}
quality-review/src/main/java/com/ruoyi/web/request/BookListRequest.java
0 → 100644
View file @
4494e04e
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
@Data
public
class
BookListRequest
extends
PageDomain
{
@ApiModelProperty
(
"数名"
)
private
String
name
;
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskFindCreateRequest.java
0 → 100644
View file @
4494e04e
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
@ApiModel
public
class
ReviewSceneChangeTaskFindCreateRequest
extends
PageDomain
{
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskFindFinishRequest.java
0 → 100644
View file @
4494e04e
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
@ApiModel
public
class
ReviewSceneChangeTaskFindFinishRequest
extends
PageDomain
{
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskFindPendingRequest.java
0 → 100644
View file @
4494e04e
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
@ApiModel
public
class
ReviewSceneChangeTaskFindPendingRequest
extends
PageDomain
{
}
ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
View file @
4494e04e
...
@@ -55,6 +55,18 @@ public class BaseController
...
@@ -55,6 +55,18 @@ public class BaseController
PageUtils
.
startPage
();
PageUtils
.
startPage
();
}
}
/**
* 设置请求分页数据
*/
protected
void
startPage
(
PageDomain
pageDomain
)
{
Integer
pageNum
=
pageDomain
.
getPageNum
();
Integer
pageSize
=
pageDomain
.
getPageSize
();
String
orderBy
=
SqlUtil
.
escapeOrderBySql
(
pageDomain
.
getOrderBy
());
Boolean
reasonable
=
pageDomain
.
getReasonable
();
PageHelper
.
startPage
(
pageNum
,
pageSize
,
orderBy
).
setReasonable
(
reasonable
);
}
/**
/**
* 设置请求排序数据
* 设置请求排序数据
*/
*/
...
...
ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java
View file @
4494e04e
package
com
.
ruoyi
.
common
.
core
.
page
;
package
com
.
ruoyi
.
common
.
core
.
page
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
/**
* 分页数据
* 分页数据
*
*
* @author ruoyi
* @author ruoyi
*/
*/
@ApiModel
public
class
PageDomain
public
class
PageDomain
{
{
/** 当前记录起始索引 */
/** 当前记录起始索引 */
@ApiModelProperty
(
"当前记录起始索引"
)
private
Integer
pageNum
;
private
Integer
pageNum
;
/** 每页显示记录数 */
/** 每页显示记录数 */
@ApiModelProperty
(
"每页显示记录数"
)
private
Integer
pageSize
;
private
Integer
pageSize
;
/** 排序列 */
/** 排序列 */
@ApiModelProperty
(
"排序列"
)
private
String
orderByColumn
;
private
String
orderByColumn
;
/** 排序的方向desc或者asc */
/** 排序的方向desc或者asc */
@ApiModelProperty
(
"排序的方向desc或者asc"
)
private
String
isAsc
=
"asc"
;
private
String
isAsc
=
"asc"
;
/** 分页参数合理化 */
/** 分页参数合理化 */
...
...
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