feat:matterType
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user