package cn.superdesk.uniorder.service.invoice.common;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
import cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceBankInfo;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceBankInfoParam;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceBankInfoQueryCriteria;
import cn.superdesk.uniorder.dto.vo.invoice.common.InvoiceBankInfoVo;

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

/**
 * @Description: 继承 BaseService 现在在这不见得
 * @Author: linjinyu
 * @CreateDate: 2022/1/25 下午1:22
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022/1/25 下午1:22
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public interface InvoiceBankInfoService {//extends BaseService<InvoiceBankInfo>


	/****************************************** extends BaseService 部分 start ******************************************/

//	@Deprecated
//	void addObj(InvoiceBankInfo entity);
//
//	@Deprecated
//	void updateObj(InvoiceBankInfo entity);
//
//	@Deprecated
//	void deleteObj(Long id);
//
//	@Deprecated
//	InvoiceBankInfo findById(Long id);
//
//	@Deprecated
//	PageInfo<InvoiceBankInfo> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize);
//
//	@Deprecated
//	List<InvoiceBankInfo> findAll(Map<String, Object> queryMap);

	/****************************************** extends BaseService 部分   end ******************************************/

	int addInvoiceBankInfo(InvoiceBankInfo entity, LoginSysUser loginSysUser);

	int updateInvoiceBankInfo(InvoiceBankInfo entity, LoginSysUser loginSysUser);

	int opPhysicsDelete(Long id, LoginSysUser loginSysUser);

	int opLogicalDelete(Long id, LoginSysUser loginSysUser);

	void setAllNormal();

	int setNormal(Long id, LoginSysUser loginSysUser);

	int setDefault(Long id, LoginSysUser loginSysUser);

	InvoiceBankInfo getByDefault();

	InvoiceBankInfo getInvoiceBankInfoById(Long invoiceBankInfoId);

	InvoiceBankInfo getInvoiceBankInfoByIdOrNullByDefault(Long invoiceBankInfoId);

	/**
	 * 拐弯抹角的绕
	 *
	 * @param invoiceApplyId
	 * @return
	 */
	InvoiceBankInfoVo getInvoiceBankInfoByInvoiceApplyIdOrNullByDefault(Long invoiceApplyId);

	R<List<InvoiceBankInfo>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize);

	List<InvoiceBankInfo> query(InvoiceBankInfoQueryCriteria queryCriteria, LoginSysUser loginSysUser);

	R<List<InvoiceBankInfoParam>> pageQuery(InvoiceBankInfoQueryCriteria queryCriteria, LoginSysUser loginSysUser);


	/****************************************** 缓存 start ******************************************/

	void cacheInit();

	void cacheRefresh();

	void cacheRemove();

	String cacheGet(String hashTable, String keyField);

	/****************************************** 缓存   end ******************************************/

}
