zoukankan      html  css  js  c++  java
  • 旅游网dao层

    # 注册功能
    # 1.根据用户名查询用户
    select * from tab_user where username=#{username}
    # 2.插入注册用户信息
    insert into tab_user(username, password, name, birthday, sex, telephone, email, status, code) values
    (#{username}, #{password}, #{name}, #{birthday}, #{sex}, #{telephone}, #{email}, #{status}, #{code});
    # 3.根据激活码查询用户
    select * from tab_user where code=#{code}
    # 4.根据用户id修改激活状态
    update tab_user set status=#{status} where uid=#{uid}
    
    # 登录功能
    # 1.根据用户名查询用户
    # 2.根据用户名和密码查询用户
    select * from tab_user where username=#{username} and password=#{password}
    
    # 根据分类和旅游线路名称动态查询路线
    
    # 旅游线路详情查询
    # 分别查询出卖家,图片列表实体,然后设置到Route对象中。
    select R.*, S.sname, S.consphone, S.address
    from tab_route R, tab_seller S
    where R.sid = S.sid;
    
    # 旅游线路收藏
    # 1.是否已经收藏,根据用户id和路线id查询收藏表
    select * from tab_favorite where uid=#{uid} and rid=#{rid}
    # 2.收藏线路
    insert into tab_favorite(uid, rid, date) values(#{uid}, #{rid}, now())
    # 3.线路收藏次数
    select count(*) from tab_favorite where rid=#{rid}
    
  • 相关阅读:
    python多线程http压力测试脚本
    php随机生成国内ip
    HTTP请求方式中8种请求方法(简单介绍)
    PHP函数
    jquery获取span标签下的第一个span子标签内容
    php实现数据库备份导出成sql
    php实现备份数据库
    中文繁体简体问题
    编程素养Day009
    编程素养Day008
  • 原文地址:https://www.cnblogs.com/mozq/p/11632547.html
Copyright © 2011-2022 走看看