package com.mandi.fendan.mapper; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import com.mandi.fendan.persist.Fd_Vehicle; public interface Fd_VehicleMapper{ @Select("select a.* from fd_vehicle a where a.id=#{id}") public Fd_Vehicle get(String id); @Delete("delete from fd_vehicle where id=#{id}") public int del(String id); @Update("update fd_vehicle set companyNo=#{companyNo},driver=#{driver},loadweight=#{loadweight},note=#{note},phone=#{phone},state=#{state},vehicleId=#{vehicleId},vehicleweight=#{vehicleweight},type=#{type},status=#{status},feature=#{feature},IDNum=#{IDNum} where id=#{id}") public int update(Fd_Vehicle fd_vehicle); @Insert("insert into fd_vehicle(id,companyNo,driver,loadweight,note,phone,state," + "vehicleId,vehicleweight,type,status,feature,IDNum) " + "values (#{id},#{companyNo},#{driver},#{loadweight},#{note},#{phone},#{state},upper(#{vehicleId})," + "#{vehicleweight},#{type},#{status},#{feature},#{IDNum})") public int insert(Fd_Vehicle fd_vehicle); @Select("select a.* from fd_vehicle a where a.vehicleId=#{vehicleId}") public Fd_Vehicle getByVehicleId(String vehicleId); @Select("select top 1 a.* from fd_vehicle a where a.companyNo=#{companyNo} ") public Fd_Vehicle selectbyCompanyNo(String companyNo); @Delete("delete from fd_vehicle where vehicleId=#{vehicleId}") public int delByVehicleId(String vehicleId); public List> getList1(Map mp); public List> getList2(Map mp); public int getPages(Map mp); /** * 公司添加的车辆 * @param mp * @return */ public List> getCompanyVehicle(Map mp); }