新增用户注册/登录

This commit is contained in:
2018-01-08 12:49:07 +08:00
parent 4c7a0d6e91
commit 84b81cf0ac
33 changed files with 1358 additions and 72 deletions

View File

@@ -0,0 +1,28 @@
package com.lxyer.model;
import com.lxyer.config.LxyKit;
import com.lxyer.model.base.BaseUserPwd;
/**
* Generated by JFinal.
*/
@SuppressWarnings("serial")
public class UserPwd extends BaseUserPwd<UserPwd> {
public static final UserPwd dao = new UserPwd().dao();
@Override
public boolean save() {
setUpdateTime(System.currentTimeMillis());
setPwd(LxyKit.md5IfNeed(getPwd()));
if (findById(getUserId()) == null) {
return super.save();
}else {
return super.update();
}
}
@Override
public boolean update() {
return save();
}
}