/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sys.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.sys.entity.MainDictDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 字典明细DAO接口
 * @author 马鹏波
 * @version 2018-05-30
 */
@MyBatisDao
public interface MainDictDetailDao extends CrudDao<MainDictDetail> {

    /**
     * 逻辑删除
     * @param mainDictDetail
     * @return
     */
    public int deleteByLogic(MainDictDetail mainDictDetail);

    /**
     * 修改末级标记
     * @param mainDictDetail
     * @return
     */
    public int upateEndFlag(MainDictDetail mainDictDetail);

    /**
     * 获取当前节点是否有子节点
     * @param id
     * @return
     */
    public int getChildNode(String id);

    public MainDictDetail getNameByIdAndKey(MainDictDetail mainDictDetail);
    public MainDictDetail getByDetailKey(MainDictDetail mainDictDetail);

    public List<MainDictDetail> findListOther(MainDictDetail mainDictDetail);
    public List<MainDictDetail> findSys(String typeName);
    public List<MainDictDetail> getDetailKey(@Param("detailKey")String detailKey, @Param("typeId")String typeId, @Param("id")String id,@Param("branchOffice")String branchOffice);
    public List<MainDictDetail> findAllListView(MainDictDetail mainDictDetail);
    public MainDictDetail getId(@Param("typeName")String typeName, @Param("companyId")String companyId, @Param("name")String name);
    public List<MainDictDetail> findJedisAllList(MainDictDetail mainDictDetail);
}