package com.yxproject.start.mapper;

import com.yxproject.start.entity.PoliceStationVailedEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by zhangyusheng on 2018/10/25 13:45
 */
@Mapper
public interface PoliceStationVailedMapper {
    /**
     * 保存派出所照片质量报表
     * @param policeStationVailedEntity
     * @return
     */
    @Insert("INSERT INTO POLICE_STATION_VAILED (POLICE_STATION_VAILED_ID,TASK_ID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) " +
            "values (#{police_Station_Vailed_Id},#{task_Id},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})")
    @Options(useGeneratedKeys = true, keyProperty = "police_Station_Vailed_Info_Id",keyColumn = "police_Station_Vailed_Info_Id")
    public void savePoliceStationVailedInfoEntity(PoliceStationVailedEntity policeStationVailedEntity);

    @Select("select * from POLICE_STATION_VAILED WHERE POLICE_STATION_VAILED_ID=#{id}")
    @Results({@Result(property = "police_Station_Vailed_Id",column = "police_Station_Vailed_Id"),
            @Result(property = "task_Id",column = "police_Station_Vailed_Id"),
            @Result(property = "police_Station_Code",column = "police_Station_Code"),
            @Result(property = "vailed_Count",column = "vailed_Count"),
            @Result(property = "invalid_Count",column = "invalid_Count"),
            @Result(property = "sava_Date",column = "sava_Date")})
    public List<PoliceStationVailedEntity> findPoliceStationVailedEntity(String id);
}
//@Mapper
//interface Inter {
//   public static final int num=3;
//   public abstract void show();
//}
//
//class Test implements Inter {
//   public void show(){
//
//    }
//}

//public class InterfaceDome{
////    public static void mian(String[] args){
////        Test t = new Test();
////        System.out.println(t.num);
////        System.out.println(Test.num);
////        System.out.println(Inter.num);
////    }
//
//}