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
6a27fe26
Commit
6a27fe26
authored
Jul 19, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消息接口
parent
5a7c5052
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
0 deletions
+120
-0
Msg.java
...src/main/java/com/yeejoin/amos/patrol/dao/entity/Msg.java
+30
-0
MsgController.java
...eejoin/amos/patrol/business/controller/MsgController.java
+63
-0
MsgInfoPageParam.java
.../yeejoin/amos/patrol/business/param/MsgInfoPageParam.java
+24
-0
msgMapper.xml
...-system-patrol/src/main/resources/db/mapper/msgMapper.xml
+3
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/Msg.java
View file @
6a27fe26
...
@@ -111,6 +111,36 @@ public class Msg extends BasicEntity{
...
@@ -111,6 +111,36 @@ public class Msg extends BasicEntity{
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
Long
createBy
;
private
Long
createBy
;
//单位code
@Column
(
name
=
"biz_org_code"
)
private
String
bizOrgCode
;
public
String
getBizOrgCode
()
{
return
bizOrgCode
;
}
public
void
setBizOrgCode
(
String
bizOrgCode
)
{
this
.
bizOrgCode
=
bizOrgCode
;
}
public
String
getBizOrgName
()
{
return
bizOrgName
;
}
public
void
setBizOrgName
(
String
bizOrgName
)
{
this
.
bizOrgName
=
bizOrgName
;
}
//单位名称
@Column
(
name
=
"biz_org_name"
)
private
String
bizOrgName
;
public
String
getTitle
()
{
public
String
getTitle
()
{
return
title
;
return
title
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/MsgController.java
View file @
6a27fe26
...
@@ -86,6 +86,69 @@ public class MsgController extends AbstractBaseController {
...
@@ -86,6 +86,69 @@ public class MsgController extends AbstractBaseController {
private IUserService iUserService;
private IUserService iUserService;
*/
*/
/**
* 新接口
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据条件获取消息列表"
,
notes
=
"APP 根据条件获取消息列表"
)
@PostMapping
(
value
=
"/listNew"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
querylistNew
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
MsgInfoPageParam
param
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
,
defaultValue
=
"pageNumber=0&pageSize=10"
)
CommonPageable
commonPageable
)
{
try
{
Page
<
MsgVo
>
dataList
=
iMsgService
.
queryMsgInfoList
(
param
);
return
CommonResponseUtil
.
success
(
dataList
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"件获取消息列表失败"
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通知发布"
,
notes
=
"通知发布"
)
@PostMapping
(
value
=
"/noticePublishNew"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
noticePublishNew
(
@ApiParam
(
value
=
"通知信息"
,
required
=
true
)
@RequestBody
NoticePublishParam
msg
)
{
try
{
AgencyUserModel
user
=
getUserInfo
();
msg
.
setCreateBy
(
user
.
getUserId
());
ReginParams
reginParams
=
getSelectedOrgInfo
();
msg
.
setUserName
(
user
.
getRealName
());
String
loginOrgCode
=
getOrgCode
(
reginParams
);
msg
.
setOrgCode
(
loginOrgCode
);
List
<
Msg
>
msgList
=
iMsgService
.
publishNotice
(
getToken
(),
getProduct
(),
getAppKey
(),
msg
);
msgList
.
forEach
(
m
->{
jobService
.
msgAddJob
(
m
);
});
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
"通知发布失败!"
);
}
}
/**
* 新接口
*
* **/
/**
/**
* 获取用户当前所选择公司的消息订阅信息
* 获取用户当前所选择公司的消息订阅信息
* @return
* @return
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/param/MsgInfoPageParam.java
View file @
6a27fe26
...
@@ -35,6 +35,30 @@ public class MsgInfoPageParam extends CommonPageable{
...
@@ -35,6 +35,30 @@ public class MsgInfoPageParam extends CommonPageable{
*/
*/
private
String
userId
;
private
String
userId
;
/**
* biz_org_code
*/
private
String
bizOrgCode
;
private
String
bizOrgName
;
public
String
getBizOrgName
()
{
return
bizOrgName
;
}
public
void
setBizOrgName
(
String
bizOrgName
)
{
this
.
bizOrgName
=
bizOrgName
;
}
public
String
getBizOrgCode
()
{
return
bizOrgCode
;
}
public
void
setBizOrgCode
(
String
bizOrgCode
)
{
this
.
bizOrgCode
=
bizOrgCode
;
}
public
String
getUserId
()
{
public
String
getUserId
()
{
return
userId
;
return
userId
;
}
}
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/msgMapper.xml
View file @
6a27fe26
...
@@ -213,6 +213,8 @@
...
@@ -213,6 +213,8 @@
<if
test=
"msgType != null"
>
AND m.msg_type = #{msgType}
</if>
<if
test=
"msgType != null"
>
AND m.msg_type = #{msgType}
</if>
<if
test=
"beginDate != null"
>
AND m.create_date
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"beginDate != null"
>
AND m.create_date
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"endDate != null"
>
AND m.create_date
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"endDate != null"
>
AND m.create_date
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"bizOrgCode != null"
>
AND m.biz_org_code = #{bizOrgCode}
</if>
</where>
</where>
</select>
</select>
...
@@ -239,6 +241,7 @@
...
@@ -239,6 +241,7 @@
<if
test=
"msgType != null"
>
AND m.msg_type = #{msgType}
</if>
<if
test=
"msgType != null"
>
AND m.msg_type = #{msgType}
</if>
<if
test=
"beginDate != null"
>
AND m.create_date
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"beginDate != null"
>
AND m.create_date
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"endDate != null"
>
AND m.create_date
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"endDate != null"
>
AND m.create_date
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"bizOrgCode != null"
>
AND m.biz_org_code = #{bizOrgCode}
</if>
</where>
</where>
ORDER BY m.id DESC
ORDER BY m.id DESC
<choose>
<choose>
...
...
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