package com.ltkj.hosp.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import org.apache.ibatis.annotations.Insert;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
import org.apache.poi.ss.formula.functions.T;
|
|
@Mapper
|
public interface OrderNumberMapper extends BaseMapper<T> {
|
@Select("SELECT max(last_id) FROM order_number WHERE date_key = #{dateKey} and fl=#{fl}")
|
Integer getLastId(@Param("dateKey") String dateKey,@Param("fl") String fl);
|
|
@Insert("INSERT INTO order_number(date_key, last_id,fl) VALUES(#{dateKey}, #{lastId},#{fl}) ON DUPLICATE KEY UPDATE last_id = #{lastId}")
|
void updateLastId(@Param("dateKey") String dateKey, @Param("lastId") int lastId,@Param("fl") String fl);
|
}
|