package thyyxxk.webserver.dao.his.technologyArchives;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import thyyxxk.webserver.entity.technologyArchives.TechnologyArchives14;

@Mapper
public interface TechnologyArchives14Dao extends BaseMapper<TechnologyArchives14> {

    @Select(" select * from technology_archives14 where social_no = #{socialNo} and id = #{id} ")
    TechnologyArchives14 selectTechnologyArchives14ById(@Param("socialNo") String socialNo, @Param("id") Integer id);

    @Select(" select isnull(max(id), 0) as id from technology_archives14 where social_no = #{socialNo} ")
    int selectTechnologyArchives14MaxId(@Param("socialNo") String socialNo);

    @Update(" delete from technology_archives14 where social_no = #{socialNo} and id = #{id} ")
    int delTechnologyArchives14ByCode(@Param("socialNo") String socialNo, @Param("id") Integer id);

}
