package com.sptg.ad.biz.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.sptg.ad.api.entity.AdPushContent;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * title: AdPushContentMapper
 * package: com.sptg.ad.biz.mapper
 * description: 任务发布类容-DAO
 *
 *               
 *                
 */
public interface AdPushContentMapper extends BaseMapper<AdPushContent> {
    /**
     * 功能描述:去重查询
     * @param  wrapper 查询条件
     * @return
     *               
     *                       
     */
    List<AdPushContent> getTaskIds(@Param(value = "ew") Wrapper<AdPushContent> wrapper);

    /**
     * 功能描述:更新记录机构位置
     * @param oldPosition 旧机构位置
     * @param newPosition 新机构位置
     *               
     *                      
     */
    @Update("update ad_push_content set s_org_position=#{newPosition} where s_org_position=#{oldPosition}")
    int updateOrgPosition(@Param(value = "oldPosition")String oldPosition, @Param(value = "newPosition") String newPosition);
}
