parent
09b0125780
commit
1d1f9cdfc3
@ -0,0 +1,19 @@ |
||||
package com.zilber.boot.file.dao; |
||||
|
||||
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 java.util.Map; |
||||
|
||||
@Mapper |
||||
public interface FileDao { |
||||
|
||||
@Select("SELECT url, type FROM file WHERE md5 = #{md5} LIMIT 1") |
||||
Map<String, Object> listFileUrl(@Param("md5") String md5); |
||||
|
||||
@Insert("INSERT INTO file(md5, url, type) VALUES (#{md5}, #{url}, #{type})") |
||||
void addFile(@Param("md5") String md5,@Param("url") String url,@Param("type") Integer type); |
||||
|
||||
} |
Loading…
Reference in new issue