|
@ -43,6 +43,24 @@ public class BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取被代理人的code
|
|
|
* @return
|
|
|
*/
|
|
|
public String getRepresentedUID() {
|
|
|
try {
|
|
|
String userAgent = request.getHeader("userAgent");
|
|
|
if (StringUtils.isEmpty(userAgent)) {
|
|
|
userAgent = request.getHeader("User-Agent");
|
|
|
}
|
|
|
JSONObject json = new JSONObject(userAgent);
|
|
|
return json.getString("represented");
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 獲取髮送請求用戶的uid
|
|
|
*
|