..
This commit is contained in:
@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -15,13 +16,13 @@ import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.utils.PwdUtil;
|
||||
import com.budwk.app.sys.models.Sys_dict;
|
||||
import com.budwk.app.sys.models.Sys_unit;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.models.Sys_user_source;
|
||||
import com.budwk.app.sys.enums.SysDataUpdateMode;
|
||||
import com.budwk.app.sys.models.*;
|
||||
import com.budwk.app.sys.param.SysDataUserUpdateParam;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.sys.services.SysUnitService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.sys.services.impl.SysDataUserAllUpdateServiceImpl;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@@ -220,6 +221,116 @@ public class JugTest {
|
||||
dao.update(users,"password|salt");
|
||||
}
|
||||
|
||||
@Inject
|
||||
private SysDataUserAllUpdateServiceImpl sysDataUserUpdateService;
|
||||
|
||||
@Test
|
||||
public void userUpdateTask() {
|
||||
SysDataUserUpdateParam param = new SysDataUserUpdateParam();
|
||||
param.setPullTime("2025-09-15 01:00:06");
|
||||
param.setUpdateMode(SysDataUpdateMode.ALL.name());
|
||||
param.setConditionGroup(null);
|
||||
sysDataUserUpdateService.update(param);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void bsh(){
|
||||
List<String> bsh = new ArrayList<>();
|
||||
bsh.add("91036");
|
||||
bsh.add("91035");
|
||||
bsh.add("91030");
|
||||
bsh.add("91034");
|
||||
bsh.add("91033");
|
||||
bsh.add("91031");
|
||||
bsh.add("91032");
|
||||
bsh.add("91027");
|
||||
bsh.add("91026");
|
||||
bsh.add("91024");
|
||||
bsh.add("91025");
|
||||
bsh.add("91023");
|
||||
bsh.add("91021");
|
||||
bsh.add("91020");
|
||||
bsh.add("91022");
|
||||
bsh.add("91018");
|
||||
bsh.add("91015");
|
||||
bsh.add("91017");
|
||||
bsh.add("91014");
|
||||
bsh.add("91013");
|
||||
bsh.add("91012");
|
||||
bsh.add("91011");
|
||||
bsh.add("91008");
|
||||
bsh.add("91004");
|
||||
bsh.add("90996");
|
||||
bsh.add("90994");
|
||||
bsh.add("90992");
|
||||
bsh.add("90993");
|
||||
bsh.add("90991");
|
||||
bsh.add("90990");
|
||||
bsh.add("90979");
|
||||
bsh.add("90978");
|
||||
bsh.add("90976");
|
||||
bsh.add("90975");
|
||||
bsh.add("90974");
|
||||
bsh.add("90972");
|
||||
bsh.add("90971");
|
||||
bsh.add("90973");
|
||||
bsh.add("90969");
|
||||
bsh.add("90966");
|
||||
bsh.add("90967");
|
||||
bsh.add("90965");
|
||||
bsh.add("90964");
|
||||
bsh.add("90968");
|
||||
bsh.add("90959");
|
||||
bsh.add("90957");
|
||||
bsh.add("90958");
|
||||
bsh.add("90961");
|
||||
bsh.add("90960");
|
||||
bsh.add("90952");
|
||||
bsh.add("90950");
|
||||
bsh.add("90951");
|
||||
bsh.add("90953");
|
||||
bsh.add("90954");
|
||||
bsh.add("90948");
|
||||
bsh.add("90947");
|
||||
bsh.add("90949");
|
||||
bsh.add("90946");
|
||||
bsh.add("90942");
|
||||
bsh.add("90937");
|
||||
bsh.add("90935");
|
||||
bsh.add("90934");
|
||||
bsh.add("90933");
|
||||
bsh.add("90932");
|
||||
bsh.add("90930");
|
||||
bsh.add("90927");
|
||||
bsh.add("90926");
|
||||
bsh.add("90913");
|
||||
bsh.add("90906");
|
||||
bsh.add("90904");
|
||||
bsh.add("90903");
|
||||
bsh.add("90901");
|
||||
bsh.add("90899");
|
||||
bsh.add("90898");
|
||||
bsh.add("90895");
|
||||
bsh.add("90894");
|
||||
|
||||
List<Sys_user> users = dao.query(Sys_user.class, Cnd.where(Sys_user::getLoginname, "in", bsh));
|
||||
|
||||
for (Sys_user user : users){
|
||||
user.setMember(true);
|
||||
dao.update(users,"member");
|
||||
|
||||
Sys_user_role user_role = new Sys_user_role();
|
||||
user_role.setUserId(user.getId());
|
||||
user_role.setRoleId("6d603b652abee584ba6274dc1fcee3bb");
|
||||
dao.insert(user_role);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user