Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
02a7c58e
Commit
02a7c58e
authored
Dec 20, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息分页
parent
11db84a0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
79 additions
and
3 deletions
+79
-3
NoticeMessageApiService.java
...an/manage/api/service/notify/NoticeMessageApiService.java
+10
-0
NoticeMessageMapper.java
...haoban/manage/service/dao/mapper/NoticeMessageMapper.java
+14
-0
NoticeMessageService.java
...n/manage/service/service/notify/NoticeMessageService.java
+10
-0
NoticeMessageServiceImpl.java
...service/service/notify/impl/NoticeMessageServiceImpl.java
+5
-0
NoticeMessageApiServiceImpl.java
...rvice/service/notify/out/NoticeMessageApiServiceImpl.java
+6
-0
NoticeMessageMapper.xml
...service/src/main/resources/mapper/NoticeMessageMapper.xml
+16
-0
NotifyController.java
...om/gic/haoban/manage/web/controller/NotifyController.java
+14
-2
CommonQO.java
.../src/main/java/com/gic/haoban/manage/web/qo/CommonQO.java
+3
-1
MessageListQO.java
...va/com/gic/haoban/manage/web/qo/notify/MessageListQO.java
+1
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/notify/NoticeMessageApiService.java
View file @
02a7c58e
...
@@ -31,6 +31,16 @@ public interface NoticeMessageApiService {
...
@@ -31,6 +31,16 @@ public interface NoticeMessageApiService {
public
ServiceResponse
<
Page
<
NoticeMessageInfoDTO
>>
pageNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
,
int
categoryType
,
BasePageInfo
pageInfo
);
public
ServiceResponse
<
Page
<
NoticeMessageInfoDTO
>>
pageNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
,
int
categoryType
,
BasePageInfo
pageInfo
);
/**
/**
* 未读数量
*
* @param enterpriseId
* @param storeId
* @param clerkId 可以空 标识查询门店级别消息
* @return
*/
public
ServiceResponse
<
Integer
>
countUnReadNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
);
/**
* 更新已读状态
* 更新已读状态
*
*
* @param id
* @param id
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/NoticeMessageMapper.java
View file @
02a7c58e
...
@@ -47,6 +47,20 @@ public interface NoticeMessageMapper {
...
@@ -47,6 +47,20 @@ public interface NoticeMessageMapper {
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"categoryType"
)
int
categoryType
);
@Param
(
"categoryType"
)
int
categoryType
);
/**
* 查询列表 根据导购
*
* @param enterpriseId
* @param storeId
* @param clerkId
* @param categoryType
* @return
*/
int
countUnreadNoticeMessage
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"categoryType"
)
int
categoryType
);
/**
/**
*/
*/
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/NoticeMessageService.java
View file @
02a7c58e
...
@@ -33,6 +33,16 @@ public interface NoticeMessageService {
...
@@ -33,6 +33,16 @@ public interface NoticeMessageService {
public
Page
<
NoticeMessageBO
>
pageNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
,
int
categoryType
,
BasePageInfo
pageInfo
);
public
Page
<
NoticeMessageBO
>
pageNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
,
int
categoryType
,
BasePageInfo
pageInfo
);
/**
/**
* 分页查询消息
*
* @param enterpriseId
* @param storeId 门店id
* @param clerkId
* @return
*/
int
countUnreadNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
);
/**
* 更新导购的已读转态
* 更新导购的已读转态
*
*
* @param enterpriseId
* @param enterpriseId
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/impl/NoticeMessageServiceImpl.java
View file @
02a7c58e
...
@@ -51,6 +51,11 @@ public class NoticeMessageServiceImpl implements NoticeMessageService {
...
@@ -51,6 +51,11 @@ public class NoticeMessageServiceImpl implements NoticeMessageService {
}
}
@Override
@Override
public
int
countUnreadNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
)
{
return
noticeMessageMapper
.
countUnreadNoticeMessage
(
enterpriseId
,
storeId
,
clerkId
,
-
1
);
}
@Override
public
boolean
updateNoticeMessageReadFlag
(
String
enterpriseId
,
String
clerkId
,
int
categoryType
)
{
public
boolean
updateNoticeMessageReadFlag
(
String
enterpriseId
,
String
clerkId
,
int
categoryType
)
{
noticeMessageMapper
.
updateNoticeMessageReadFlag
(
enterpriseId
,
clerkId
,
categoryType
);
noticeMessageMapper
.
updateNoticeMessageReadFlag
(
enterpriseId
,
clerkId
,
categoryType
);
return
true
;
return
true
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/NoticeMessageApiServiceImpl.java
View file @
02a7c58e
...
@@ -119,6 +119,12 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -119,6 +119,12 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
}
}
@Override
@Override
public
ServiceResponse
<
Integer
>
countUnReadNoticeMessage
(
String
enterpriseId
,
String
storeId
,
String
clerkId
)
{
int
count
=
noticeMessageService
.
countUnreadNoticeMessage
(
enterpriseId
,
storeId
,
clerkId
);
return
ServiceResponse
.
success
(
count
);
}
@Override
public
ServiceResponse
<
Boolean
>
updateReadFlagById
(
Long
id
)
{
public
ServiceResponse
<
Boolean
>
updateReadFlagById
(
Long
id
)
{
NoticeMessageBO
noticeMessageBO
=
new
NoticeMessageBO
();
NoticeMessageBO
noticeMessageBO
=
new
NoticeMessageBO
();
noticeMessageBO
.
setNoticeMessageId
(
id
);
noticeMessageBO
.
setNoticeMessageId
(
id
);
...
...
haoban-manage3-service/src/main/resources/mapper/NoticeMessageMapper.xml
View file @
02a7c58e
...
@@ -226,6 +226,22 @@
...
@@ -226,6 +226,22 @@
order by create_time desc
order by create_time desc
</select>
</select>
<select
id=
"countUnreadNoticeMessage"
resultType=
"Integer"
>
select
count(*)
from tab_haoban_notice_message
where enterprise_id = #{enterpriseId}
and read_flag=0
and store_id = #{storeId}
<if
test=
"clerkId != null"
>
and clerk_id =#{clerkId}
</if>
<if
test=
"categoryType != -1"
>
and category_type =#{categoryType}
</if>
order by create_time desc
</select>
<update
id=
"updateNoticeMessageReadFlag"
>
<update
id=
"updateNoticeMessageReadFlag"
>
update tab_haoban_notice_message
update tab_haoban_notice_message
set read_flag=1,update_time = now()
set read_flag=1,update_time = now()
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/NotifyController.java
View file @
02a7c58e
...
@@ -119,8 +119,8 @@ public class NotifyController extends WebBaseController {
...
@@ -119,8 +119,8 @@ public class NotifyController extends WebBaseController {
* @return
* @return
*/
*/
@RequestMapping
(
"/message/list"
)
@RequestMapping
(
"/message/list"
)
public
HaobanResponse
list
(
@RequestBody
@Valid
MessageListQO
qo
,
PageQo
pageQo
)
{
public
HaobanResponse
list
(
@RequestBody
@Valid
MessageListQO
qo
)
{
ServiceResponse
<
Page
<
NoticeMessageInfoDTO
>>
retPage
=
noticeMessageService
.
pageNoticeMessage
(
qo
.
getEnterpriseId
(),
qo
.
getStoreId
(),
qo
.
getClerkId
(),
qo
.
getCategoryType
(),
pageQ
o
.
getBasePageInfo
());
ServiceResponse
<
Page
<
NoticeMessageInfoDTO
>>
retPage
=
noticeMessageService
.
pageNoticeMessage
(
qo
.
getEnterpriseId
(),
qo
.
getStoreId
(),
qo
.
getClerkId
(),
qo
.
getCategoryType
(),
q
o
.
getBasePageInfo
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
PageUtil
.
getPageInfo
(
retPage
.
getResult
()));
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
PageUtil
.
getPageInfo
(
retPage
.
getResult
()));
}
}
...
@@ -165,4 +165,16 @@ public class NotifyController extends WebBaseController {
...
@@ -165,4 +165,16 @@ public class NotifyController extends WebBaseController {
}
}
/**
* 消息类别
*
* @return
*/
@RequestMapping
(
"/message/count"
)
public
HaobanResponse
messageCount
(
@RequestBody
@Valid
MessageListQO
qo
)
{
ServiceResponse
<
Integer
>
ret
=
noticeMessageService
.
countUnReadNoticeMessage
(
qo
.
getEnterpriseId
(),
qo
.
getStoreId
(),
qo
.
getClerkId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
ret
.
getResult
());
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/CommonQO.java
View file @
02a7c58e
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
;
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
;
import
com.gic.commons.web.qo.PageQo
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -8,7 +10,7 @@ import java.io.Serializable;
...
@@ -8,7 +10,7 @@ import java.io.Serializable;
*
*
* @author hua
* @author hua
*/
*/
public
class
CommonQO
implements
Serializable
{
public
class
CommonQO
extends
PageQo
implements
Serializable
{
@NotNull
(
message
=
"企业id不为空"
)
@NotNull
(
message
=
"企业id不为空"
)
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
@NotNull
(
message
=
"成员id不为空"
)
@NotNull
(
message
=
"成员id不为空"
)
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/notify/MessageListQO.java
View file @
02a7c58e
...
@@ -10,6 +10,7 @@ import com.gic.haoban.manage.web.qo.CommonQO;
...
@@ -10,6 +10,7 @@ import com.gic.haoban.manage.web.qo.CommonQO;
public
class
MessageListQO
extends
CommonQO
{
public
class
MessageListQO
extends
CommonQO
{
private
Integer
categoryType
=
-
1
;
private
Integer
categoryType
=
-
1
;
public
Integer
getCategoryType
()
{
public
Integer
getCategoryType
()
{
return
categoryType
;
return
categoryType
;
}
}
...
...
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