package com.gic.haoban.manage.service.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gic.haoban.manage.service.entity.TabHaobanWxApplication;

public interface WxApplicationMapper {

    int insertSelective(TabHaobanWxApplication record);

    int updateByPrimaryKeySelective(TabHaobanWxApplication record);

    TabHaobanWxApplication selectBySiteIdAndWxEnterpriseId(@Param("siteId") String siteId, @Param("wxEnterpriseId") String wxEnterpriseId);

    TabHaobanWxApplication selectByWxEnterpriseIdAndApplicationType(@Param("wxEnterpriseId") String wxEnterpriseId,
                                                                    @Param("applicationType") int applicationType);

    int cancelWxApplication(@Param("corpId") String corpId, @Param("suiteId") String suiteId);

    /**
     * 选择通过公司id
     *
     * @param corpid          corpid
     * @param applicationType 应用程序类型
     * @return {@link TabHaobanWxApplication}
     * @author mozhu
     * @date 2021-12-21 22:00:54
     */
    TabHaobanWxApplication selectByCorpId(@Param("corpid") String corpid,@Param("applicationType") Integer applicationType);

    /**
     * 更新corpid通过id
     *
     * @param wxApplicationId 天气应用程序id
     * @param corpid          corpid
     * @return int
     * @author mozhu
     * @date 2022-06-30 19:19:19
     */
    int updateCorpidById(@Param("wxApplicationId") String wxApplicationId, @Param("corpid") String corpid);
    
    List<TabHaobanWxApplication> listApplication(@Param("wxEnterpriseId")String wxEnterpriseId) ;
}