Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
c65ba911
Commit
c65ba911
authored
Jun 01, 2022
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)增加消息列表接口
parent
2e410da2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
59 deletions
+132
-59
MsgLogDto.java
...a/com/yeejoin/amos/boot/module/tzs/api/dto/MsgLogDto.java
+2
-0
MsgLog.java
...a/com/yeejoin/amos/boot/module/tzs/api/entity/MsgLog.java
+5
-2
MsgLogController.java
...amos/boot/module/tzs/biz/controller/MsgLogController.java
+83
-56
MsgLogServiceImpl.java
...s/boot/module/tzs/biz/service/impl/MsgLogServiceImpl.java
+5
-0
TaskServiceImpl.java
...boot/module/tzs/flc/biz/service/impl/TaskServiceImpl.java
+1
-1
tzs-1.0.0.0.xml
...e-tzs-biz/src/main/resources/db/changelog/tzs-1.0.0.0.xml
+36
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/MsgLogDto.java
View file @
c65ba911
...
@@ -46,4 +46,6 @@ public class MsgLogDto extends BaseDto {
...
@@ -46,4 +46,6 @@ public class MsgLogDto extends BaseDto {
@ApiModelProperty
(
value
=
"站端类型: WEB,APP"
)
@ApiModelProperty
(
value
=
"站端类型: WEB,APP"
)
private
String
terminalType
;
private
String
terminalType
;
@ApiModelProperty
(
value
=
"是否已读"
)
private
Boolean
isRead
=
false
;
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/MsgLog.java
View file @
c65ba911
...
@@ -7,7 +7,6 @@ import lombok.Data;
...
@@ -7,7 +7,6 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.naming.ldap.PagedResultsControl
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -70,5 +69,9 @@ public class MsgLog extends BaseEntity {
...
@@ -70,5 +69,9 @@ public class MsgLog extends BaseEntity {
*/
*/
private
String
terminalType
;
private
String
terminalType
;
/**
* 是否已读
*/
@TableField
(
"is_read"
)
private
Boolean
isRead
=
false
;
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/MsgLogController.java
View file @
c65ba911
...
@@ -5,12 +5,16 @@ import io.swagger.annotations.ApiOperation;
...
@@ -5,12 +5,16 @@ import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.MsgLogServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.MsgLogServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MsgLogDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MsgLogDto
;
...
@@ -37,28 +41,28 @@ public class MsgLogController extends BaseController {
...
@@ -37,28 +41,28 @@ public class MsgLogController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增消息流水表"
,
notes
=
"新增消息流水表"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增消息流水表"
,
notes
=
"新增消息流水表"
)
public
ResponseModel
<
MsgLogDto
>
save
(
@RequestBody
MsgLogDto
model
)
{
public
ResponseModel
<
MsgLogDto
>
save
(
@RequestBody
MsgLogDto
model
)
{
model
=
msgLogServiceImpl
.
createWithModel
(
model
);
model
=
msgLogServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
/**
/**
* 根据sequenceNbr更新
* 根据sequenceNbr更新
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新消息流水表"
,
notes
=
"根据sequenceNbr更新消息流水表"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新消息流水表"
,
notes
=
"根据sequenceNbr更新消息流水表"
)
public
ResponseModel
<
MsgLogDto
>
updateBySequenceNbrMsgLog
(
@RequestBody
MsgLogDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
MsgLogDto
>
updateBySequenceNbrMsgLog
(
@RequestBody
MsgLogDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
updateWithModel
(
model
));
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
updateWithModel
(
model
));
}
}
/**
/**
* 根据sequenceNbr删除
* 根据sequenceNbr删除
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
...
@@ -67,63 +71,85 @@ public class MsgLogController extends BaseController {
...
@@ -67,63 +71,85 @@ public class MsgLogController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除消息流水表"
,
notes
=
"根据sequenceNbr删除消息流水表"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除消息流水表"
,
notes
=
"根据sequenceNbr删除消息流水表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
removeById
(
sequenceNbr
));
}
}
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr
主键
* @param sequenceNbr
主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个消息流水表"
,
notes
=
"根据sequenceNbr查询单个消息流水表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个消息流水表"
,
notes
=
"根据sequenceNbr查询单个消息流水表"
)
public
ResponseModel
<
MsgLogDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
MsgLogDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
* @param current 每页大小
* @param current 每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表分页查询"
,
notes
=
"消息流水表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表分页查询"
,
notes
=
"消息流水表分页查询"
)
public
ResponseModel
<
Page
<
MsgLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
MsgLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
(
value
=
"size"
)
int
size
)
{
Page
<
MsgLogDto
>
page
=
new
Page
<
MsgLogDto
>();
Page
<
MsgLogDto
>
page
=
new
Page
<
MsgLogDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryForMsgLogPage
(
page
));
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryForMsgLogPage
(
page
));
}
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表列表全部数据查询"
,
notes
=
"消息流水表列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表列表全部数据查询"
,
notes
=
"消息流水表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
MsgLogDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
MsgLogDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryForMsgLogList
());
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryForMsgLogList
());
}
}
/**
* 告警数量统计
*
* @return Integer
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"告警数量统计"
,
notes
=
"告警数量统计"
)
@GetMapping
(
value
=
"/count"
)
public
ResponseModel
<
Integer
>
countByTerminalType
(
@RequestParam
(
value
=
"terminalType"
,
required
=
false
)
String
terminalType
)
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
countByTerminalType
(
terminalType
));
}
/**
/**
* 告警数量统计
* 列表分页查询
*
*
* @return Integer
* @param current 当前页
*/
* @param current 每页大小
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
* @param terminalType 终端类型
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"告警数量统计"
,
notes
=
"告警数量统计"
)
* @param isRead 是否未读
@GetMapping
(
value
=
"/count"
)
* @return
public
ResponseModel
<
Integer
>
countByTerminalType
(
*/
@RequestParam
(
value
=
"terminalType"
,
required
=
false
)
String
terminalType
)
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
countByTerminalType
(
terminalType
));
@GetMapping
(
value
=
"/page/terminalType"
)
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表分页查询"
,
notes
=
"消息流水表分页查询"
)
public
ResponseModel
<
Page
<
MsgLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"terminalType"
)
String
terminalType
,
@RequestParam
(
value
=
"isRead"
)
Boolean
isRead
)
{
Page
<
MsgLogDto
>
page
=
new
Page
<
MsgLogDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryForMsgLogByTerminalTypePage
(
page
,
terminalType
,
isRead
));
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/MsgLogServiceImpl.java
View file @
c65ba911
...
@@ -89,4 +89,8 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto,MsgLog,MsgLogMapper
...
@@ -89,4 +89,8 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto,MsgLog,MsgLogMapper
public
Integer
countByTerminalType
(
String
terminalType
)
{
public
Integer
countByTerminalType
(
String
terminalType
)
{
return
this
.
list
(
new
LambdaQueryWrapper
<
MsgLog
>().
eq
(
StringUtils
.
isNotEmpty
(
terminalType
),
MsgLog:
:
getTerminalType
,
terminalType
)).
size
();
return
this
.
list
(
new
LambdaQueryWrapper
<
MsgLog
>().
eq
(
StringUtils
.
isNotEmpty
(
terminalType
),
MsgLog:
:
getTerminalType
,
terminalType
)).
size
();
}
}
public
Page
<
MsgLogDto
>
queryForMsgLogByTerminalTypePage
(
Page
<
MsgLogDto
>
page
,
String
terminalType
,
Boolean
isRead
)
{
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
,
terminalType
,
isRead
);
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/TaskServiceImpl.java
View file @
c65ba911
...
@@ -62,7 +62,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
...
@@ -62,7 +62,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
* 分页查询
* 分页查询
*/
*/
public
Page
<
TaskDto
>
queryForTaskPage
(
Page
<
TaskDto
>
page
,
String
userId
,
@Condition
(
Operator
.
in
)
List
<
Integer
>
status
)
{
public
Page
<
TaskDto
>
queryForTaskPage
(
Page
<
TaskDto
>
page
,
String
userId
,
@Condition
(
Operator
.
in
)
List
<
Integer
>
status
)
{
return
this
.
queryForPage
(
page
,
null
,
false
,
userId
,
status
);
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
,
userId
,
status
);
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/db/changelog/tzs-1.0.0.0.xml
View file @
c65ba911
...
@@ -1457,7 +1457,43 @@
...
@@ -1457,7 +1457,43 @@
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"xl"
id=
"2022-06-01-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"tz_task"
/>
</not>
</preConditions>
<comment>
add table tz_task
</comment>
<sql>
CREATE TABLE `tz_task` (
`sequence_nbr` bigint(20) NOT NULL COMMENT 'id',
`name` varchar(255) DEFAULT NULL COMMENT '任务名称',
`content` text COMMENT '内容',
`description` varchar(500) DEFAULT NULL COMMENT '描述',
`status` int(1) DEFAULT NULL COMMENT '状态【0:待填报,1:待签收,2:已完成】',
`user_id` varchar(255) DEFAULT NULL COMMENT '用户ID',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`rec_user_name` varchar(15) DEFAULT NULL COMMENT '更新人名称',
`rec_user_id` varchar(19) DEFAULT NULL COMMENT '用户ID',
`rec_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_delete` bit(1) NOT NULL COMMENT '是否删除',
`app_id` varchar(255) DEFAULT NULL COMMENT '对接公司编码',
`dept_id` varchar(255) DEFAULT NULL COMMENT '单位ID',
`dept_name` varchar(255) DEFAULT NULL COMMENT '单位名称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务表';
</sql>
</changeSet>
<changeSet
author=
"xl"
id=
"2022-06-01-02"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"tz_msg_log"
/>
</preConditions>
<comment>
modify table tz_msg_log add is_read columns
</comment>
<sql>
ALTER TABLE `tz_msg_log` add is_read bit(1) DEFAULT NULL COMMENT '是否已读【0:未读;1:已读】';
UPDATE tz_msg_log set is_read = false;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
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