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.TechnologyArchives1;

import java.util.Map;

@Mapper
public interface TechnologyArchives1Dao extends BaseMapper<TechnologyArchives1> {

    @Select(" select * from technology_archives1 where social_no = #{socialNo} and get_time = #{getTime} ")
    TechnologyArchives1 selectTechnologyArchives1ByGetTime(@Param("socialNo") String socialNo, @Param("getTime") String getTime);

    @Update(" delete from technology_archives1 where social_no = #{socialNo} and get_time = #{getTime} ")
    int delTechnologyArchives1ByCode(@Param("socialNo") String socialNo, @Param("getTime") String getTime);

    @Update(" update technology_archives1 set image = #{url} where social_no = #{socialNo} and get_time = #{getTime} ")
    int updateCertificateImage(String url,@Param("socialNo") String socialNo,@Param("getTime") String getTime);

    @Select(" select image  from  technology_archives1 where social_no = #{socialNo} and get_time = #{getTime}")
    Map<String, Object> selectImage(@Param("socialNo") String socialNo, @Param("getTime") String getTime);

    @Update(" update technology_archives1 set image = null  where social_no = #{socialNo} and get_time = #{getTime}")
    int deleteImage(@Param("socialNo") String socialNo, @Param("getTime") String getTime);
}
