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}

  • 相关阅读:
    Codeforces Round #674 (Div. 3)C. Increase and Copy
    Calendar Game
    poj3255Roadblocks
    L2-008 最长对称子串
    L2-004 这是二叉搜索树吗?
    D. Boboniu Chats with Du Codeforces Round #664 (Div. 2)
    暑假了,冲冲冲
    逆元和同余
    懒惰的我
    Codeforces Round #594 (Div. 2) C题
  • 原文地址:https://www.cnblogs.com/mozq/p/11625888.html
Copyright © 2011-2022 走看看