Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
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
base_platform_enterprise
gic-platform-enterprise
Commits
87d250ad
Commit
87d250ad
authored
Apr 20, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知详情修改
parent
880cc0f8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
14 deletions
+47
-14
PushMessageApiService.java
...ava/com/gic/enterprise/service/PushMessageApiService.java
+2
-1
TabPushUserMessageMapper.java
...m/gic/enterprise/dao/mapper/TabPushUserMessageMapper.java
+7
-2
PushUserMessageService.java
...va/com/gic/enterprise/service/PushUserMessageService.java
+4
-1
PushUserMessageServiceImpl.java
...c/enterprise/service/impl/PushUserMessageServiceImpl.java
+8
-2
PushMessageApiServiceImpl.java
...erprise/service/outer/impl/PushMessageApiServiceImpl.java
+3
-2
TabPushUserMessageMapper.xml
...ce/src/main/resources/mapper/TabPushUserMessageMapper.xml
+19
-4
IndexModuleController.java
.../gic/enterprise/web/controller/IndexModuleController.java
+4
-2
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/PushMessageApiService.java
View file @
87d250ad
...
...
@@ -122,7 +122,8 @@ public interface PushMessageApiService {
* @Param
* @return
*/
ServiceResponse
<
Integer
>
totalUserMessage
(
Integer
userId
,
Integer
status
);
ServiceResponse
<
Integer
>
totalUserMessage
(
Integer
userId
,
String
search
,
Integer
status
,
Date
startTime
,
Date
endTime
,
Integer
pushClassifyId
);
/** @Description: 推送消息接口
* @author taogs
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabPushUserMessageMapper.java
View file @
87d250ad
...
...
@@ -3,6 +3,7 @@ package com.gic.enterprise.dao.mapper;
import
com.gic.enterprise.entity.TabPushUserMessage
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
public
interface
TabPushUserMessageMapper
{
...
...
@@ -56,8 +57,12 @@ public interface TabPushUserMessageMapper {
int
recallMessage
(
@Param
(
"messageId"
)
Integer
messageId
);
List
<
Integer
>
totalUserMessage
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"status"
)
Integer
status
);
List
<
Integer
>
totalUserMessage
(
@Param
(
"search"
)
String
search
,
@Param
(
"status"
)
Integer
status
,
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
,
@Param
(
"classify"
)
String
classify
,
@Param
(
"userId"
)
Integer
userId
);
int
readAll
(
@Param
(
"userId"
)
Integer
userId
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/PushUserMessageService.java
View file @
87d250ad
...
...
@@ -2,12 +2,15 @@ package com.gic.enterprise.service;
import
com.gic.enterprise.entity.TabPushUserMessage
;
import
java.util.Date
;
public
interface
PushUserMessageService
{
int
save
(
Integer
enterpriseId
,
Integer
userId
,
Integer
messageId
,
String
classify
,
String
title
,
String
content
);
int
reCallMessage
(
Integer
messageId
);
int
totalUserMessage
(
Integer
userId
,
int
status
);
int
totalUserMessage
(
Integer
userId
,
String
search
,
Integer
status
,
Date
startTime
,
Date
endTime
,
Integer
pushClassifyId
);
int
readAll
(
Integer
userId
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/PushUserMessageServiceImpl.java
View file @
87d250ad
package
com
.
gic
.
enterprise
.
service
.
impl
;
import
com.gic.enterprise.dao.mapper.TabPushUserMessageMapper
;
import
com.gic.enterprise.entity.TabPushClassify
;
import
com.gic.enterprise.entity.TabPushUserMessage
;
import
com.gic.enterprise.service.PushTypeService
;
import
com.gic.enterprise.service.PushUserMessageService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -13,6 +15,8 @@ import java.util.List;
public
class
PushUserMessageServiceImpl
implements
PushUserMessageService
{
@Autowired
private
TabPushUserMessageMapper
tabPushUserMessageMapper
;
@Autowired
private
PushTypeService
pushTypeService
;
@Override
public
int
save
(
Integer
enterpriseId
,
Integer
userId
,
Integer
messageId
,
String
classify
,
String
title
,
String
content
)
{
...
...
@@ -35,8 +39,10 @@ public class PushUserMessageServiceImpl implements PushUserMessageService {
}
@Override
public
int
totalUserMessage
(
Integer
userId
,
int
status
)
{
List
<
Integer
>
list
=
this
.
tabPushUserMessageMapper
.
totalUserMessage
(
userId
,
status
);
public
int
totalUserMessage
(
Integer
userId
,
String
search
,
Integer
status
,
Date
startTime
,
Date
endTime
,
Integer
pushClassifyId
)
{
TabPushClassify
byId
=
this
.
pushTypeService
.
getById
(
pushClassifyId
);
List
<
Integer
>
list
=
this
.
tabPushUserMessageMapper
.
totalUserMessage
(
search
,
status
,
startTime
,
endTime
,
byId
==
null
?
null
:
byId
.
getClassifyName
(),
userId
);
return
list
.
get
(
0
);
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/PushMessageApiServiceImpl.java
View file @
87d250ad
...
...
@@ -166,8 +166,9 @@ public class PushMessageApiServiceImpl implements PushMessageApiService {
}
@Override
public
ServiceResponse
<
Integer
>
totalUserMessage
(
Integer
userId
,
Integer
status
)
{
return
ServiceResponse
.
success
(
this
.
pushUserMessageService
.
totalUserMessage
(
userId
,
status
));
public
ServiceResponse
<
Integer
>
totalUserMessage
(
Integer
userId
,
String
search
,
Integer
status
,
Date
startTime
,
Date
endTime
,
Integer
pushClassifyId
)
{
return
ServiceResponse
.
success
(
this
.
pushUserMessageService
.
totalUserMessage
(
userId
,
search
,
status
,
startTime
,
endTime
,
pushClassifyId
));
}
@Override
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabPushUserMessageMapper.xml
View file @
87d250ad
...
...
@@ -156,10 +156,25 @@
where message_id = #{messageId,jdbcType=INTEGER} and status!=0
</update>
<select
id=
"totalUserMessage"
resultType=
"integer"
>
select
count(1)
from tab_push_user_message
where user_id=#{userId} and status = #{status}
select count(1)
from tab_push_user_message t1 left join tab_push_message t3 on t1.message_id = t3.message_id
where t1.user_id=#{userId}
and (t1.status = 1 or t1.status = 2)
<if
test=
"search != null and search != ''"
>
and (t1.title like concat('%', #{search}, '%') or t1.content like concat('%', #{search}, '%'))
</if>
<if
test=
"status != null"
>
and t1.status = #{status}
</if>
<if
test=
"startTime != null"
>
and (t1.create_time
>
= #{startTime})
</if>
<if
test=
"endTime != null"
>
and (t1.create_time
<
= #{endTime})
</if>
<if
test=
"classify != null and classify !=''"
>
and t1.classify = #{classify}
</if>
</select>
<update
id=
"readAll"
>
update tab_push_user_message
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/IndexModuleController.java
View file @
87d250ad
...
...
@@ -59,7 +59,8 @@ public class IndexModuleController {
try
{
ServiceResponse
<
Page
<
UserMessageDTO
>>
response
=
this
.
pushMessageApiService
.
pageUserMessage
(
userId
,
search
,
status
,
StringUtils
.
isBlank
(
startTime
)
?
null
:
sdf
.
parse
(
startTime
+
" 00:00:00"
),
StringUtils
.
isBlank
(
endTime
)
?
null
:
sdf
.
parse
(
endTime
+
" 23:59:59"
),
pushClassifyId
,
pageQO
.
getCurrentPage
(),
pageQO
.
getPageSize
());
ServiceResponse
<
Integer
>
unReadResponse
=
this
.
pushMessageApiService
.
totalUserMessage
(
UserDetailUtils
.
getUserDetail
().
getUserId
(),
1
);
ServiceResponse
<
Integer
>
unReadResponse
=
this
.
pushMessageApiService
.
totalUserMessage
(
userId
,
search
,
1
,
StringUtils
.
isBlank
(
startTime
)
?
null
:
sdf
.
parse
(
startTime
+
" 00:00:00"
),
StringUtils
.
isBlank
(
endTime
)
?
null
:
sdf
.
parse
(
endTime
+
" 23:59:59"
),
pushClassifyId
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"page"
,
response
.
getResult
());
result
.
put
(
"unReadCount"
,
unReadResponse
.
getResult
());
...
...
@@ -72,7 +73,8 @@ public class IndexModuleController {
@RequestMapping
(
"total-message"
)
public
RestResponse
totalMessage
(){
ServiceResponse
<
Integer
>
response
=
this
.
pushMessageApiService
.
totalUserMessage
(
UserDetailUtils
.
getUserDetail
().
getUserId
(),
1
);
ServiceResponse
<
Integer
>
response
=
this
.
pushMessageApiService
.
totalUserMessage
(
UserDetailUtils
.
getUserDetail
().
getUserId
(),
null
,
null
,
null
,
null
,
null
);
return
RestResponse
.
success
(
response
.
getResult
());
}
...
...
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