|
|
@@ -192,7 +192,14 @@ public class PublicQueryController {
|
|
|
ok = true;
|
|
|
infos.put("enuu", os.getUu());
|
|
|
infos.put("emuu", user.getUserUU());
|
|
|
- infos.put("enSecret", os.getAccessSecret());
|
|
|
+ if (StringUtils.isEmpty(os.getAccessSecret())) {
|
|
|
+ String secret = StringUtil.uuid();
|
|
|
+ os.setAccessSecret(secret);
|
|
|
+ enterpriseDao.save(os);
|
|
|
+ infos.put("enSecret", os.getAccessSecret());
|
|
|
+ } else {
|
|
|
+ infos.put("enSecret", os.getAccessSecret());
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -217,7 +224,14 @@ public class PublicQueryController {
|
|
|
ok = true;
|
|
|
infos.put("enuu", os.getUu());
|
|
|
infos.put("emuu", newUser.getUserUU());
|
|
|
- infos.put("enSecret", os.getAccessSecret());
|
|
|
+ if (StringUtils.isEmpty(os.getAccessSecret())) {
|
|
|
+ String secret = StringUtil.uuid();
|
|
|
+ os.setAccessSecret(secret);
|
|
|
+ enterpriseDao.save(os);
|
|
|
+ infos.put("enSecret", os.getAccessSecret());
|
|
|
+ } else {
|
|
|
+ infos.put("enSecret", os.getAccessSecret());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -378,7 +392,7 @@ public class PublicQueryController {
|
|
|
* </pre>
|
|
|
*
|
|
|
* @author yingp
|
|
|
- *
|
|
|
+ *
|
|
|
*/
|
|
|
@RequestMapping(value = "/token", method = RequestMethod.GET)
|
|
|
@ResponseBody
|