package com.sptg.statistics.biz.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.sptg.statistics.api.entity.StatisticsAdPushCount;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * title: StatisticsAdPushCountMapper
 * package: com.sptg.statistics.biz.mapper
 * description: 统计广告发布数量-DAO接口
 *
 *                
 *                
 */
public interface StatisticsAdPushCountMapper extends BaseMapper<StatisticsAdPushCount> {
    /**
     * 功能描述:更新记录机构位置
     * @param oldPosition 旧机构位置
     * @param newPosition 新机构位置
     * @return int
     *                
     *                      
     */
    @Update("update  statistics_ad_push_count set   s_org_position=#{newPosition}  where s_org_position=#{oldPosition}")
    public int updateOrgPosition(@Param(value = "oldPosition") String oldPosition, @Param(value = "newPosition") String newPosition);

    /**
     * 功能描述:更新推送状态
     * @param adPushTaskId 发布广告任务id
     * @param pushState 推送状态 0推送中 1推送成功
     * @return int
     *                
     *                      
     */
    @Update("update  statistics_ad_push_count set   i_push_state=#{pushState}  where l_ad_push_task_id=#{adPushTaskId}")
    public int updatePushStateByTaskId(@Param(value = "adPushTaskId") long adPushTaskId, @Param(value = "pushState") int pushState);
}
