package com.palmnest.service.notice.service;

import com.palmnest.application.bean.AppResultDto;
import com.palmnest.application.dto.NoticeWxTempVo;
import com.palmnest.model.User;
import com.palmnest.model.notice.AppNoticeModel;

import javax.servlet.http.HttpServletRequest;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

public interface NoticePublicnoService {

//	/**
//	 * 上传压缩素材图片
//	 */
//	Map<String,Object> addThumbImg(String imgUrl,Integer userId,String orgIds,Integer sourceId,String author);

//	/**
//	 * 删除素材
//	 * @return
//	 */
//	Map<String,Object> deleteNews(String orgIds,Integer noticeDetailId,Integer userId);
//	/**
//	 * 修改素材
//	 * @param appNotice
//	 * @param author
//	 * @return
//	 */
//	Map<String, Object> updateNews(AppNoticeModel appNotice,String author);

//	Map<String,Object> uploadnews(String orgIds,Integer userId,AppNoticeModel appNotice);
//	
//	Map<String,Object> sendPublicno(AppNoticeModel appNotice,User user);

	/**
	 * 保存详情
	 * @param noticeDetail
	 * @param noticeId
	 * @param userId
	 * @param insert 判断是否新增的公告， 原因：当公告为复制的情况下 公告详情中带有原公告的id，导致无法产生新的详情
	 * @return
	 */
	String saveDetaile(String noticeDetail, Integer noticeId, String userId,Boolean insert,Integer publicId);

	/**
	 * 删除素材相关信息
	 *
	 * @param noticeDetailId
	 * @param userId
	 * @return
	 */
	String delDetaile(Integer noticeDetailId, String userId);


	Map<String, Object> uploadnews(AppNoticeModel appNotice, User user);

	Map<String, Object> approvalAppNotice(AppNoticeModel appNotice,HttpServletRequest request, User user, int type) throws Exception;


//	String saveImages(AppNoticeModel appNotice,User user);

	/**
	 * 导入用户
	 *
	 * @param orgId
	 * @param ins
	 * @return
	 * @throws Exception
	 */
	AppResultDto importUserInfo(String orgId, InputStream ins, String developId) throws Exception;
	
	/**
	 * 推送消息给下一级审核的角色对应的人
	 * @param 
	 */
	List<User> getPushMsgUserById(Integer approvalTypeId,Integer orgId,Integer type,Integer id);
	/**
	 * 推送模板消息给所有粉丝
	 * @param orgId
	 */
	void sendTemplateMsgByWxUser(String orgIds,String title,String url,List<String> openIds);
	
	List<String> getWxPublicUser(String developId);
	
//	List<String> getOpenIds(String str, int type);
	
	Map<String, Object> getSentWxTempMsg(AppNoticeModel appNotice);
	
	void sendTemplateMsgByWxUser(List<NoticeWxTempVo> list,String url,String content);
	
	void saveNoticeRecord(AppNoticeModel appNotice);


}
