server_commit
This commit is contained in:
@@ -138,6 +138,10 @@ public class mobileLoginController {
|
||||
}
|
||||
}
|
||||
|
||||
if (user.getLoginname().equals(newPwd)) {
|
||||
return Result.error("请勿以工号作为密码");
|
||||
}
|
||||
|
||||
String pwd = PwdUtil.doSm4CbcEncrypt(newPwd);
|
||||
dao.update(Sys_user.class, Chain.make("password", pwd).add("weAppLoginCount", user.getWeAppLoginCount() + 1), Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||
|
||||
@@ -154,7 +158,7 @@ public class mobileLoginController {
|
||||
@RequiresAuthentication
|
||||
public Object checkIsFirstLogin(){
|
||||
Sys_user user = dao.fetch(Sys_user.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||
if (user.getWeAppLoginCount() == 1 && StrUtil.isNotBlank(user.getOpenId())) {
|
||||
if ((user.getWeAppLoginCount() == null || user.getWeAppLoginCount() == 1) && StrUtil.isNotBlank(user.getOpenId())) {
|
||||
return Result.error();
|
||||
} else {
|
||||
return Result.success();
|
||||
|
||||
Reference in New Issue
Block a user