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对象中。

    旅游线路收藏

    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}

  • 相关阅读:
    MAC电脑操作快捷键
    Xcode的控制台调试命令
    iOS 页面间传值
    App开机动画
    TCP/IP长连接和短连接
    Using the Transient Fault Handling Application Block
    [转]数据库并发控制 乐观锁,悲观锁
    [转]网站度量指标
    dictionary 和 hashtable 区别
    负载均衡策略
  • 原文地址:https://www.cnblogs.com/mozq/p/11625888.html
Copyright © 2011-2022 走看看