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

import java.util.List;
import java.util.Map;

@Mapper
public interface TechnologyArchivesHLMainDao extends BaseMapper<TechnologyArchivesHLMain> {

    @Select(" select * from technology_archives_hl_main where social_no = #{socialNo} or account = #{socialNo} or name = #{socialNo} ")
    TechnologyArchivesHLMain selectTechnologyArchivesHLMainBySocialNo(@Param("socialNo") String socialNo);

    @Select(" select image1  from  technology_archives_hl_main where social_no = #{socialNo}")
    Map<String, Object> selectHLImage1(@Param("socialNo") String socialNo);

    @Select(" select account as accountAuthor, social_no as socialNo, name as accountName from technology_archives_hl_main ")
    List<Map<String, Object>> selectTechnologyArchivesHLMainDict();

    @Update(" update technology_archives_hl_main set image1 = #{url}  where social_no = #{socialNo} ")
    int updatePersonalImage(String url, @Param("socialNo") String socialNo);
}
