feat:matterType

This commit is contained in:
苏竹红
2025-08-29 13:16:33 +08:00
parent f6b695bf69
commit dce1fe5e52
14 changed files with 121 additions and 4 deletions

View File

@@ -71,6 +71,13 @@ public class MessageTemplateDAO {
return messageTemplateMapper.batchUpdatePublishStatus(ids);
}
public MessageTemplateDO getByKeyword(String keyword) {
if (keyword == null){
return null;
}
return messageTemplateMapper.getByKeyword(keyword);
}
}

View File

@@ -87,4 +87,11 @@ public class StoreMessageDAO {
public MessageDetailVO getMessageDetail(Long id){
return storeMessageMapper.getMessageDetail(id);
}
public Integer batchUpdateHandle(Long id, List<String> storeCodeList){
if (id==null||CollectionUtils.isEmpty(storeCodeList)){
return 0;
}
return storeMessageMapper.batchUpdateHandle(id,storeCodeList);
}
}

View File

@@ -3,6 +3,7 @@ package com.cool.store.mapper;
import com.cool.store.dto.notice.CommonDTO;
import com.cool.store.dto.notice.NoticeDTO;
import com.cool.store.entity.MessageTemplateDO;
import com.cool.store.entity.StoreMessageDO;
import com.cool.store.request.notice.MessageTemplateQueryRequest;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
@@ -25,6 +26,11 @@ public interface MessageTemplateMapper extends Mapper<MessageTemplateDO> {
int batchUpdatePublishStatus(@Param("ids") List<Long> ids);
/**
* 根据关键词查询
* @param keyword
* @return
*/
MessageTemplateDO getByKeyword(@Param("keyword") String keyword);
}

View File

@@ -35,4 +35,11 @@ public interface StoreMessageMapper extends Mapper<StoreMessageDO> {
MessageDetailVO getMessageDetail(Long id);
/**
* 批量更新处理
* @param id
* @param storeCodeList
*/
int batchUpdateHandle(@Param("id") Long id, @Param("storeCodeList") List<String> storeCodeList);
}

View File

@@ -127,4 +127,14 @@
</foreach>
</update>
<select id="getByKeyword" resultMap="BaseResultMap">
SELECT
*
FROM zxjp_message_template
WHERE deleted = 0
<if test="keyword != null and keyword != ''">
AND handle_keyword = #{keyword,jdbcType=VARCHAR}
</if>
</select>
</mapper>

View File

@@ -216,6 +216,24 @@
a.id = #{id}
</select>
<update id="batchUpdateHandle">
UPDATE zxjp_store_message
SET
process_status = 1,
process_time = NOW(),
read_status = 1,
read_time = NOW(),
update_time = NOW()
<where>
<if test="id != null">
AND message_template_id = #{id}
</if>
and store_code IN
<foreach item="item" collection="storeCodeList" index="index" separator="," close=")" open="(">
#{item}
</foreach>
</where>
</update>