package com.hotent.portal.persistence.manager;

import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.databind.JsonNode;
import com.hotent.base.manager.BaseManager;
import com.hotent.base.model.CommonResult;
import com.hotent.portal.model.AppDingModel;
import com.hotent.portal.model.AppModel;
import com.hotent.portal.params.AppTree;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletResponse;

/**
 * 
 * <pre> 
 * 描述：移动端应用 处理接口
 * 构建组：x7
 * 作者:pangq
 * 邮箱:pangq@jee-soft.cn
 * 日期:2020-07-06 15:23:30
 * 版权：广州宏天软件股份有限公司
 * </pre>
 */
public interface AppModelManager extends BaseManager<AppModel>{

	List<AppModel> getByTypeId(String typeId);

	List<AppModel> getByTypeId(String typeId,String appName);

	Map<String,String> exportData(List<String> ids) throws Exception;

	void importData(MultipartFile file);

	List<AppTree> getApp(String typeKey,String appName) throws Exception;

	List<AppTree> getAppByNoAuth(String typeKey,String appName) throws Exception;

	CommonResult<String> importData(MultipartHttpServletRequest request, HttpServletResponse response) throws Exception;

	CommonResult<String> importDataByXml(String appModelsPortalXml);

    CommonResult<String> createOrUpdate(AppModel appModel);
    /**
     * @description 发布钉钉app
     * @author  yangzibin
     * @date    2024/2/26 16:24
     * @param	appModel
     * @return  com.hotent.base.model.CommonResult<java.lang.String>
     */
	CommonResult<String> pushDingApp(AppDingModel appDingModel);


	/**
	 * @description 获取微应用免登用户数据
	 * @author  yangzibin
	 * @date    2024/3/6 8:51
	 * @param	code
	 * @param	corpId
	 * @param	appId
	 * @return  com.hotent.base.model.CommonResult<?>
	 */
	CommonResult<JsonNode> getDingUserInfo(String code, String corpId, String appId);

	AppModel getAppById(String id);

	List<Map<String, Object>>  getAppStatic();
}
