|
@@ -9,6 +9,7 @@ import com.sooka.common.core.page.PageDomain;
|
|
|
import com.sooka.common.core.page.TableSupport;
|
|
|
import com.sooka.common.utils.StringUtils;
|
|
|
import com.sooka.common.utils.sql.SqlUtil;
|
|
|
+import com.sooka.system.mapper.SysUserMapper;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -35,6 +36,8 @@ import com.sooka.system.service.ISysPostService;
|
|
|
import com.sooka.system.service.ISysRoleService;
|
|
|
import com.sooka.system.service.ISysUserService;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
/**
|
|
|
* 用户信息
|
|
|
*
|
|
@@ -312,6 +315,22 @@ public class SysUserController extends BaseController
|
|
|
return toAjax(userService.changeStatus(user));
|
|
|
}
|
|
|
|
|
|
+ @Resource
|
|
|
+ SysUserMapper sysUserMapper;
|
|
|
+
|
|
|
+ @RequestMapping("resetPwdBatch")
|
|
|
+ @ResponseBody
|
|
|
+ public AjaxResult resetPwdBatch(){
|
|
|
+ List<SysUser> list = userService.selectUserList(new SysUser());
|
|
|
+ for(SysUser s : list){
|
|
|
+ s.setSalt(ShiroUtils.randomSalt());
|
|
|
+ s.setPassword(passwordService.encryptPassword(s.getLoginName(), "AbCd%"+s.getPhonenumber(), s.getSalt()));
|
|
|
+ s.setUserId(s.getUserId());
|
|
|
+ sysUserMapper.updateUser(s);
|
|
|
+ System.out.println("===="+s.getUserName());
|
|
|
+ }
|
|
|
+ return success();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|