package com.jeesharp.business.modules.marketing.tenantQrcode.mapper;

import com.jeesharp.business.modules.marketing.tenantQrcode.entity.MarketingTenantQrcode;
import com.jeesharp.business.modules.marketing.tenantQrcode.vo.MarketingTenantQrcodeQueryVO;
import com.jeesharp.framework.mybatis.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 店铺推广二维码 Mapper。
 *
 * @author jeesharp
 * @since 2026-06-25
 */
@Mapper
public interface MarketingTenantQrcodeMapper extends BaseMapper<MarketingTenantQrcode, MarketingTenantQrcodeQueryVO> {

    MarketingTenantQrcode getByWxScene(@Param("wxScene") String wxScene);

    MarketingTenantQrcode getByTenantAndChannel(@Param("tenantId") String tenantId, @Param("channelCode") String channelCode);

    MarketingTenantQrcode getByTenantAndChannelIncludingDeleted(@Param("tenantId") String tenantId, @Param("channelCode") String channelCode);

    int restoreDeleted(MarketingTenantQrcode entity);

    int incrementScanCount(@Param("id") String id);
}
