feat:bug修复

This commit is contained in:
苏竹红
2025-07-28 11:19:37 +08:00
parent b67b1f4c2d
commit 40a8ed9460
8 changed files with 37 additions and 15 deletions

View File

@@ -73,8 +73,11 @@ public class StoreMessageDAO {
return storeMessageMapper.revokeById(id,userId,userName);
}
public Integer queryStoreModuleCount(String storeId, Integer moduleCode){
return storeMessageMapper.queryStoreModuleCount(storeId,moduleCode);
public Integer queryStoreModuleCount(String storeId,String userId, Integer 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){

View File

@@ -23,7 +23,9 @@ public interface StoreMessageMapper extends Mapper<StoreMessageDO> {
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,
@Param("moduleCode") Integer moduleCode,

View File

@@ -146,7 +146,8 @@
select count(1) from zxjp_store_message a
left join zxjp_message_template b on a.message_template_id = b.id
where a.store_id = #{storeId}
and b.module_id = #{moduleCode}
and b.module_code = #{moduleCode}
and a.operator_list like concat('%',#{userId},'%')
limit 1
</select>
@@ -169,15 +170,19 @@
and a.store_id = #{storeId}
</if>
<if test="moduleCode != null">
and b.module_id = #{moduleCode}
and b.module_code = #{moduleCode}
</if>
<if test="todayTask != null">
and b.today_task = #{todayTask}
</if>
<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 ))
</if>
<if test="userId != null">
and a.operator_list like concat('%',#{userId},'%')
</if>
and revoke_status = 0
</where>
@@ -186,13 +191,14 @@
<select id="getMessageDetail" resultType="com.cool.store.vo.notice.MessageDetailVO">
select
a.id,
a.message_title,
a.message_image,
b.message_title,
b.message_image,
a.create_time,
a.publish_user_name
b.publisher_user_id as publishUserId,
b.message_content as messageContent
from
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
a.id = #{id}
</select>