package com.nmgs.mapper;


import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.nmgs.entity.ServiceAreaPic;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ServiceAreaPicMapper extends MppBaseMapper<ServiceAreaPic> {

    /**
     * 获取最大id
     * @return
     */
    Integer getMaxId();


    @Delete("delete from service_area_pic_table where SERVICEID=#{id}")
    int  deletePicByAreaId(@Param("id") Integer id);

    @Select("select ID,SERVICEID,PICDATA from service_area_pic_table where SERVICEID=#{params.id}")
    List<ServiceAreaPic> getAreaPic(@Param("params")Map<String, Object> params);

}
