新增用户注册/登录
This commit is contained in:
28
src/main/java/com/lxyer/model/UserPwd.java
Normal file
28
src/main/java/com/lxyer/model/UserPwd.java
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user