|
|
|
@ -104,15 +104,16 @@ public class UserController {
|
|
|
|
|
String dis = accessToken.get("dis");
|
|
|
|
|
User user = userMapper.selectByUn(un);
|
|
|
|
|
String newUUID = IdUtil.simpleUUID();
|
|
|
|
|
String flowId = IdUtil.simpleUUID();
|
|
|
|
|
if (user != null) {
|
|
|
|
|
Map<String, Object> map = getStringObjectMap(access_token, un, dis, newUUID, flowId);
|
|
|
|
|
Flow flow = flowMapper.selectByPrimaryKey(user.getUserid());
|
|
|
|
|
Map<String, Object> map = getStringObjectMap(access_token, un, dis, newUUID, flow.getFlowId());
|
|
|
|
|
user.setAccessToken(access_token);
|
|
|
|
|
userMapper.updateByPrimaryKey(user);
|
|
|
|
|
return new ResultEntity(HttpStatus.OK, map);
|
|
|
|
|
}
|
|
|
|
|
User newUser = new User();
|
|
|
|
|
newUser.setUserid(IdUtil.simpleUUID());
|
|
|
|
|
String flowId = IdUtil.simpleUUID();
|
|
|
|
|
newUser.setUserid(newUUID);
|
|
|
|
|
newUser.setRoleId(4);
|
|
|
|
|
newUser.setLoginType(0);
|
|
|
|
|
newUser.setAccessToken(access_token);
|
|
|
|
@ -126,6 +127,10 @@ public class UserController {
|
|
|
|
|
newUser.setClassName("国家虚拟仿真训练班");
|
|
|
|
|
Map<String, Object> map = getStringObjectMap(access_token, un, dis, newUUID, flowId);
|
|
|
|
|
userMapper.insert(newUser);
|
|
|
|
|
Flow flow = new Flow();
|
|
|
|
|
flow.setUserid(newUUID);
|
|
|
|
|
flow.setFlowId(flowId);
|
|
|
|
|
flowMapper.insert(flow);
|
|
|
|
|
return new ResultEntity(HttpStatus.OK, map);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -150,11 +155,8 @@ public class UserController {
|
|
|
|
|
map.put("roleId", 4);
|
|
|
|
|
map.put("schoolId", "999999999");
|
|
|
|
|
map.put("classId", "999999999");
|
|
|
|
|
Flow flow = new Flow();
|
|
|
|
|
flow.setUserid(newUUID);
|
|
|
|
|
flow.setFlowId(flowId);
|
|
|
|
|
flowMapper.insert(flow);
|
|
|
|
|
map.put("flowId", flowId);
|
|
|
|
|
map.put("userId", newUUID);
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|