package com.uas.account.service;

import com.uas.account.core.Page;
import com.uas.account.entity.App;
import com.uas.account.entity.ChangeAdminDetail;

public interface ChangeAdminService {

	/**
	 * 存储相关信息
	 * 
	 * @param detail
	 * @return
	 */
	ChangeAdminDetail save(ChangeAdminDetail detail);

	/**
	 * 上传的相关信息
	 * 
	 * @param detail
	 * @return
	 */
	ChangeAdminDetail submit(ChangeAdminDetail detail);

	/**
	 * 查找所有 的申请更换管理员的信息
	 * 
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	Page<ChangeAdminDetail> findAll(int pageNumber, int pageSize, String name, String businessCode, String userName);

	/**
	 * 查询审核通过
	 * 
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	Page<ChangeAdminDetail> findAllEnable(int pageNumber, int pageSize, String name, String businessCode,
			String userName);

	/**
	 * 查询待审核
	 * 
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	Page<ChangeAdminDetail> findAllUnAudit(int pageNumber, int pageSize, String name, String businessCode,
			String userName);

	/**
	 * 查询审核未通过
	 * 
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	Page<ChangeAdminDetail> findAllUnApply(int pageNumber, int pageSize, String name, String businessCode,
			String userName);

	/**
	 * 审核通过
	 * 
	 * @param businessCode
	 */
	void enable(String businessCode);

	/**
	 * 审核未通过
	 * 
	 * @param businessCode
	 * @param reason
	 */
	void disable(String businessCode, String reason);

	/**
	 * 通过businessCode查询详细信息
	 * 
	 * @param businessCode
	 * @return
	 */
	ChangeAdminDetail findByBusinessCode(String businessCode);

	ChangeAdminDetail syncUserToApp(App app, ChangeAdminDetail detail) throws Exception;

}
