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

import com.gic.haoban.manage.service.entity.hm.TabHaobanHmGroupSetting;
import com.gic.haoban.manage.service.pojo.qo.HmGroupInfoQO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TabHaobanHmGroupSettingMapper {
    int deleteByPrimaryKey(Long groupId);

    int insert(TabHaobanHmGroupSetting record);

    int insertSelective(TabHaobanHmGroupSetting record);

    TabHaobanHmGroupSetting selectByPrimaryKey(Long groupId);

    int updateByPrimaryKeySelective(TabHaobanHmGroupSetting record);

    int updateByPrimaryKey(TabHaobanHmGroupSetting record);

    /**
     * 条件查询 活码分组
     * @param hmGroupInfoQO
     * @return
     */
    List<TabHaobanHmGroupSetting> queryHmGroupSettingList(HmGroupInfoQO hmGroupInfoQO);

    /**
     * 更新 分组被引用的数量
     * @param groupId
     * @param changeCount
     * @return
     */
    int updateGroupSettingCount(@Param("groupId") Long groupId, @Param("changeCount") Integer changeCount);

    /**
     * 根据名称精确查询
     * @param groupName
     * @param enterpriseId
     * @return
     */
    List<TabHaobanHmGroupSetting> queryHmGroupSettingByName(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId, @Param("groupName") String groupName);

}