feat:bug修复
This commit is contained in:
@@ -73,8 +73,11 @@ public class StoreMessageDAO {
|
|||||||
return storeMessageMapper.revokeById(id,userId,userName);
|
return storeMessageMapper.revokeById(id,userId,userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer queryStoreModuleCount(String storeId, Integer moduleCode){
|
public Integer queryStoreModuleCount(String storeId,String userId, Integer moduleCode){
|
||||||
return storeMessageMapper.queryStoreModuleCount(storeId,moduleCode);
|
if (storeId == null|| userId == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return storeMessageMapper.queryStoreModuleCount(storeId,userId,moduleCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StoreMessageVO> getStoreMessageListByCondition(String storeId, Integer moduleCode, Integer todayTask, Integer pendingFlag, String userId){
|
public List<StoreMessageVO> getStoreMessageListByCondition(String storeId, Integer moduleCode, Integer todayTask, Integer pendingFlag, String userId){
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ public interface StoreMessageMapper extends Mapper<StoreMessageDO> {
|
|||||||
|
|
||||||
int revokeById(@Param("id") Long id, @Param("userId") String userId, @Param("userName") String userName);
|
int revokeById(@Param("id") Long id, @Param("userId") String userId, @Param("userName") String userName);
|
||||||
|
|
||||||
Integer queryStoreModuleCount(@Param("storeId") String storeId, @Param("moduleCode") Integer moduleCode);
|
Integer queryStoreModuleCount(@Param("storeId") String storeId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("moduleCode") Integer moduleCode);
|
||||||
|
|
||||||
List<StoreMessageVO> getStoreMessageListByCondition(@Param("storeId") String storeId,
|
List<StoreMessageVO> getStoreMessageListByCondition(@Param("storeId") String storeId,
|
||||||
@Param("moduleCode") Integer moduleCode,
|
@Param("moduleCode") Integer moduleCode,
|
||||||
|
|||||||
@@ -146,7 +146,8 @@
|
|||||||
select count(1) from zxjp_store_message a
|
select count(1) from zxjp_store_message a
|
||||||
left join zxjp_message_template b on a.message_template_id = b.id
|
left join zxjp_message_template b on a.message_template_id = b.id
|
||||||
where a.store_id = #{storeId}
|
where a.store_id = #{storeId}
|
||||||
and b.module_id = #{moduleCode}
|
and b.module_code = #{moduleCode}
|
||||||
|
and a.operator_list like concat('%',#{userId},'%')
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -169,15 +170,19 @@
|
|||||||
and a.store_id = #{storeId}
|
and a.store_id = #{storeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="moduleCode != null">
|
<if test="moduleCode != null">
|
||||||
and b.module_id = #{moduleCode}
|
and b.module_code = #{moduleCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="todayTask != null">
|
<if test="todayTask != null">
|
||||||
and b.today_task = #{todayTask}
|
and b.today_task = #{todayTask}
|
||||||
</if>
|
</if>
|
||||||
<if test="pendingFlag != null">
|
<if test="pendingFlag != null">
|
||||||
and a.process_status = #{pendingFlag}
|
and a.process_status = 0
|
||||||
and (b.remind_type = 1 or (b.remind_type = 2 and NOW() BETWEEN b.remind_start_time AND b.remind_end_time ))
|
and (b.remind_type = 1 or (b.remind_type = 2 and NOW() BETWEEN b.remind_start_time AND b.remind_end_time ))
|
||||||
</if>
|
</if>
|
||||||
|
<if test="userId != null">
|
||||||
|
and a.operator_list like concat('%',#{userId},'%')
|
||||||
|
</if>
|
||||||
|
and revoke_status = 0
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
|
|
||||||
@@ -186,13 +191,14 @@
|
|||||||
<select id="getMessageDetail" resultType="com.cool.store.vo.notice.MessageDetailVO">
|
<select id="getMessageDetail" resultType="com.cool.store.vo.notice.MessageDetailVO">
|
||||||
select
|
select
|
||||||
a.id,
|
a.id,
|
||||||
a.message_title,
|
b.message_title,
|
||||||
a.message_image,
|
b.message_image,
|
||||||
a.create_time,
|
a.create_time,
|
||||||
a.publish_user_name
|
b.publisher_user_id as publishUserId,
|
||||||
|
b.message_content as messageContent
|
||||||
from
|
from
|
||||||
zxjp_store_message a
|
zxjp_store_message a
|
||||||
left join zxjp_message_template b on a.template_id = b.id
|
left join zxjp_message_template b on a.message_template_id = b.id
|
||||||
where
|
where
|
||||||
a.id = #{id}
|
a.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class StoreMessageDO {
|
|||||||
* 撤销状态(0:未撤销 1:已撤销)
|
* 撤销状态(0:未撤销 1:已撤销)
|
||||||
*/
|
*/
|
||||||
@Column(name = "revoke_status")
|
@Column(name = "revoke_status")
|
||||||
private Boolean revokeStatus;
|
private Integer revokeStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 撤销时间
|
* 撤销时间
|
||||||
|
|||||||
@@ -30,4 +30,6 @@ public class MessageDetailVO {
|
|||||||
@ApiModelProperty("发布人")
|
@ApiModelProperty("发布人")
|
||||||
private String publishUserName;
|
private String publishUserName;
|
||||||
|
|
||||||
|
private String publishUserId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public interface MessageTemplateService {
|
|||||||
*/
|
*/
|
||||||
Boolean revokeById(Long id, LoginUserInfo user);
|
Boolean revokeById(Long id, LoginUserInfo user);
|
||||||
|
|
||||||
List<ModuleAndMatterVO> getModuleList(String storeId);
|
List<ModuleAndMatterVO> getModuleList(String storeId,PartnerUserInfoVO userInfoVO);
|
||||||
|
|
||||||
PageInfo<StoreMessageVO> getStorePendingList(StoreMessagePendingRequest request);
|
PageInfo<StoreMessageVO> getStorePendingList(StoreMessagePendingRequest request);
|
||||||
|
|
||||||
|
|||||||
@@ -274,11 +274,16 @@ public class MessageTemplateServiceImpl implements MessageTemplateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ModuleAndMatterVO> getModuleList(String storeId) {
|
public List<ModuleAndMatterVO> getModuleList(String storeId,PartnerUserInfoVO userInfoVO) {
|
||||||
List<ModuleAndMatterVO> moduleAndMatterList = ModuleAndMatterVO.getModuleAndMatterList();
|
List<ModuleAndMatterVO> moduleAndMatterList = ModuleAndMatterVO.getModuleAndMatterList();
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.selectByMobile("18375320931");
|
||||||
|
if (enterpriseUserDO == null){
|
||||||
|
enterpriseUserDO = new EnterpriseUserDO();
|
||||||
|
}
|
||||||
List<ModuleAndMatterVO> list= new ArrayList<>();
|
List<ModuleAndMatterVO> list= new ArrayList<>();
|
||||||
|
EnterpriseUserDO finalEnterpriseUserDO = enterpriseUserDO;
|
||||||
moduleAndMatterList.forEach(x->{
|
moduleAndMatterList.forEach(x->{
|
||||||
Integer integer = storeMessageDAO.queryStoreModuleCount(storeId, x.getModuleCode());
|
Integer integer = storeMessageDAO.queryStoreModuleCount(storeId, finalEnterpriseUserDO.getUserId(), x.getModuleCode());
|
||||||
if (integer > 0){
|
if (integer > 0){
|
||||||
list.add(x);
|
list.add(x);
|
||||||
}
|
}
|
||||||
@@ -298,6 +303,10 @@ public class MessageTemplateServiceImpl implements MessageTemplateService {
|
|||||||
@Override
|
@Override
|
||||||
public MessageDetailVO getMessageDetail(Long id) {
|
public MessageDetailVO getMessageDetail(Long id) {
|
||||||
MessageDetailVO messageDetailVO = storeMessageDAO.getMessageDetail(id);
|
MessageDetailVO messageDetailVO = storeMessageDAO.getMessageDetail(id);
|
||||||
|
if (messageDetailVO!=null&&messageDetailVO.getPublishUserId()!=null){
|
||||||
|
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(messageDetailVO.getPublishUserId());
|
||||||
|
messageDetailVO.setPublishUserName(userInfoById.getName());
|
||||||
|
}
|
||||||
return messageDetailVO;
|
return messageDetailVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class MiniMessageTemplateController {
|
|||||||
@ApiOperation("获取每个门店需要展示的模块")
|
@ApiOperation("获取每个门店需要展示的模块")
|
||||||
@GetMapping("/getModuleListByStoreId")
|
@GetMapping("/getModuleListByStoreId")
|
||||||
public ResponseResult<List<ModuleAndMatterVO>> getModuleListByStoreId(@RequestParam("id")String storeId) {
|
public ResponseResult<List<ModuleAndMatterVO>> getModuleListByStoreId(@RequestParam("id")String storeId) {
|
||||||
return ResponseResult.success(messageTemplateService.getModuleList(storeId));
|
return ResponseResult.success(messageTemplateService.getModuleList(storeId, PartnerUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取消息详情")
|
@ApiOperation("获取消息详情")
|
||||||
|
|||||||
Reference in New Issue
Block a user