package com.zcloud.util.message;

import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.message.MessageTemplatesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Component
@Transactional //开启事物
public class MessagePublic {

	@Autowired
	private MessageTemplatesMapper messageTemplatesMapper;

	/**根据参数发送消息给指定对象
	 * @param pd
	 * @throws Exception
	 */
	public  List<PageData> sendMessageByParameter(PageData pd)throws Exception{

		return messageTemplatesMapper.listAll(pd);
	}
}

