package com.hp.dao;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.hp.domain.Feed;
import com.hp.domain.User;
public interface FeedMapper {
//显示
public List<Feed> findselect(Feed feed);
//登录
@Select("select * from tab_user where uname = #{uname} and pwd = #{pwd}")
public User login(User user);
//绑定下拉列表
@Select("select * from tab_user")
public List<User> eist();
//删除
@Delete("delete from tab_feedback where id = #{id}")
public void del(Integer id);
//带参回显
@Select("select id from tab_user where uname = #{uname} ")
public Integer findUser(String uname);
//新增
@Insert("INSERT tab_feedback(author,commit_time,title,content,open)VALUES(#{author},#{commit_time},#{title},#{content},#{open})")
public void add(Feed feed);
//修改公开和不公开
@Update("update tab_feedback set open=1 where id=#{id}")
public void update(Integer id);
}