Browse Source

Merge branch 'dev' of yeshijie/patient-co-management into dev

trick9191 7 years ago
parent
commit
c21b4b6341
1 changed files with 18 additions and 0 deletions
  1. 18 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/BaseController.java

+ 18 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/BaseController.java

@ -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
     *