package com.reptileclient.jlifeapp.dao;

import com.reptileclient.jlifeapp.entity.hm.HmStationShop;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface HmStationShopMapper {


    @Delete(" truncate  table jlife_worker.sys_hm_shop")
    void cleanTable();

    @Insert(value = {
            "<script>",
            "insert into jlife_worker.sys_hm_shop(city,station_code,station_name,shop_code,shop_name) values ",
            "<foreach collection='list' item='item' index='index' separator=','>",
            "(#{item.city},#{item.stationCode},#{item.stationName},#{item.shopCode},#{item.shopName})",
            "</foreach>",
            "</script>"
    })
    void batchInsert(@Param("list") List<HmStationShop> list);
}
