package com.mandi.fendan.mapper; import com.mandi.fendan.persist.BusinessVehiclePerson; import org.apache.ibatis.annotations.*; import java.util.List; import java.util.Map; public interface BusinessVehiclePersonMapper { @Select("select * from BusinessVehiclePerson where businessNo=#{businessNo} and vehicleId=#{vehicleId}") List selectList(@Param("businessNo")String businessNo, @Param("vehicleId")String vehicleId); @Select({ "" , "" , "select top ${pagesize} *" , "" , "" , "select *" , "" , " from ( select row_number()" , "" , "" , "over (order by ${sort} )" , "" , "" , "over (order by a.id desc )" , "" , "" , "as rownumber,a.*", " select * from BusinessVehiclePerson ", ") as a where rownumber > #{pagesize}*#{page} order by a.rownumber asc " }) List selectPage(Map map); @Select("select * from BusinessVehiclePerson where id=#{id}") BusinessVehiclePerson selectById(long id); @Insert({ "insert into BusinessVehiclePerson(vehicleId,businessNo,userName,idCard,phone,province,city,area,street,createTime,updateTime)", "values(#{vehicleId},#{businessNo},#{userName},#{idCard},#{phone},#{province},#{city},#{area},#{street},#{createTime},#{updateTime})" }) @Options(useGeneratedKeys = true,keyProperty = "id",keyColumn = "Id") int insert(BusinessVehiclePerson businessVehiclePerson); @Update({"" }) int update(BusinessVehiclePerson businessVehiclePerson); @Delete("delete from BusinessVehiclePerson where id=#{id}") int delete(Long id); }