云数据库接口地址:https://www.dbihelper.cn/linkdb | |
create table mysql.user_info( userid varchar(30) not null comment '用户主键' , usname varchar(255) null comment '用户匿名', mobile varchar(255) null comment '手机号', loginpwd varchar(255) null comment '登录密码', deviceid varchar(255) null comment '设备号', devicename varchar(255) null comment '设备名称', logintime datetime null comment '登录时间', loginnum int null comment '登录次数', loginip varchar(255) null comment '登录IP', primary key(userid) ) charset=gbk comment='用户表' | |
查询用户手机号接口,sqlid:usermobile SQL语句:select mobile from mysql.user_info where mobile='[mobile]' | |
用户密码登录接口,sqlid:userpwdlogin SQL语句:select userid,mobile,deviceid,devicename,logintime from mysql.user_info where mobile='[mobile]' and loginpwd='[loginpwd]'; update mysql.user_info set logintime=now(),loginnum=loginnum+1,loginip='[sys.ip]' where mobile='[mobile]' and loginpwd='[loginpwd]' | |
用户密码注册接口,sqlid:userpwdadd SQL语句:insert into mysql.user_info(userid,mobile,loginpwd,deviceid,devicename,logintime,loginnum,loginip) select * from ( select '[sys.id]','[mobile]' mobile,'[loginpwd]','[deviceid]','[devicename]','[sys.time]',0,'[sus.ip]' ) s where mobile not in (select mobile from mysql.user_info ) | |
查询用户信息接口,sqlid:userselect SQL语句:select userid,usname,mobile,deviceid,devicename,logintime,loginnum,loginip from mysql.user_info where usname like? '%[usname]%' and mobilelike? '%[mobile]%' order by [orderby] | |
用户删除接口(正式环境不需要),sqlid:userdelete SQL语句:delete from mysql.user_info where mobile='[mobile]' |