PDA 改为UNIAPP

master
cez 2022-06-26 09:24:13 +08:00
parent 5399bb4ce6
commit ebbc52313a
1 changed files with 7 additions and 13 deletions

View File

@ -205,8 +205,8 @@ public class UserController extends BaseController {
j.setSuccess(false); j.setSuccess(false);
} else { } else {
try { try {
if("test".equals(user.getUserName())){ if("test".equals(user.getUserName())||"test2".equals(user.getUserName())){
newpassword="123456"; password="123456";
} }
user.setPassword(PasswordUtil.encrypt(user.getUserName(), newpassword, PasswordUtil.getStaticSalt())); user.setPassword(PasswordUtil.encrypt(user.getUserName(), newpassword, PasswordUtil.getStaticSalt()));
} catch (Exception e) { } catch (Exception e) {
@ -254,9 +254,10 @@ public class UserController extends BaseController {
if (StringUtil.isNotEmpty(id)) { if (StringUtil.isNotEmpty(id)) {
TSUser users = systemService.getEntity(TSUser.class,id); TSUser users = systemService.getEntity(TSUser.class,id);
//System.out.println(users.getUserName()); //System.out.println(users.getUserName());
if("test".equals(users.getUserName())){ if("test".equals(users.getUserName())||"test2".equals(users.getUserName())){
password="123456"; password="123456";
} }
users.setPassword(PasswordUtil.encrypt(users.getUserName(), password, PasswordUtil.getStaticSalt())); users.setPassword(PasswordUtil.encrypt(users.getUserName(), password, PasswordUtil.getStaticSalt()));
users.setStatus(Globals.User_Normal); users.setStatus(Globals.User_Normal);
users.setActivitiSync(users.getActivitiSync()); users.setActivitiSync(users.getActivitiSync());
@ -281,7 +282,7 @@ public class UserController extends BaseController {
AjaxJson j = new AjaxJson(); AjaxJson j = new AjaxJson();
String message = null; String message = null;
TSUser user = systemService.getEntity(TSUser.class, id); TSUser user = systemService.getEntity(TSUser.class, id);
if("admin".equals(user.getUserName())){ if("admin".equals(user.getUserName())||"test".equals(user.getUserName())||"test2".equals(user.getUserName())){
message = "超级管理员[admin]不可操作"; message = "超级管理员[admin]不可操作";
j.setMsg(message); j.setMsg(message);
return j; return j;
@ -455,8 +456,8 @@ public class UserController extends BaseController {
public AjaxJson del(TSUser user, HttpServletRequest req) { public AjaxJson del(TSUser user, HttpServletRequest req) {
String message = null; String message = null;
AjaxJson j = new AjaxJson(); AjaxJson j = new AjaxJson();
if("admin".equals(user.getUserName())){ if("admin".equals(user.getUserName())||"test".equals(user.getUserName())||"test2".equals(user.getUserName())){
message = "超级管理员[admin]不可删除"; message = "超级管理员[admin,test,test2]不可删除";
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
@ -551,7 +552,6 @@ public class UserController extends BaseController {
/** /**
* *
* *
* @param ids
* @return * @return
*/ */
@RequestMapping(params = "checkUser") @RequestMapping(params = "checkUser")
@ -704,9 +704,6 @@ public class UserController extends BaseController {
/** /**
* easyuiAJAX * easyuiAJAX
* *
* @param request
* @param response
* @param dataGrid
* @param user * @param user
*/ */
@RequestMapping(params = "addorupdate") @RequestMapping(params = "addorupdate")
@ -891,8 +888,6 @@ public class UserController extends BaseController {
/** /**
* *
* *
* @param user
* @param req
* @return * @return
*/ */
@RequestMapping(params = "test") @RequestMapping(params = "test")
@ -955,7 +950,6 @@ public class UserController extends BaseController {
/** /**
* *
* *
* @param user
* @param req * @param req
* @return * @return
*/ */