WANG 6 rokov pred
rodič
commit
ad81abb141

+ 20 - 3
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/AuthController.java

@@ -124,16 +124,33 @@ public class AuthController extends ControllerSupport {
 
 	@Naked
 	@WithoutStackTrace(true)
-	@ApiOperation(value = "第三方机构接入", notes = "")
+	@ApiOperation(value = "第三方普通用户接入", notes = "")
 	@PostMapping("/thirdPartyAccess")
-	public User thirdPartyAccess(HttpServletRequest request, @RequestParam Long orgId,
+	public User thirdPartyCommonUserAccess(HttpServletRequest request, @RequestParam Long orgId,
 			@RequestParam String loginName, @RequestParam String appId,
 			@RequestParam String timestamp, @RequestParam String token) {
 		String realIp = request.getHeader("x-forwarded-for");
 		if (StringUtils.isBlank(realIp)) {
 			realIp = request.getHeader("x-real-ip");
 		}
-		return authService.thirdPartyCommonUserAccess(orgId, loginName, appId, timestamp, token, realIp);
+		return authService.thirdPartyCommonUserAccess(orgId, loginName, appId, timestamp, token,
+				realIp);
+	}
+
+	@Naked
+	@WithoutStackTrace(true)
+	@ApiOperation(value = "第三方学生接入", notes = "")
+	@PostMapping("/thirdPartyStudentAccess")
+	public User thirdPartyStudentAccess(HttpServletRequest request, @RequestParam Long rootOrgId,
+			@RequestParam String accountType, @RequestParam String accountValue,
+			@RequestParam String appId, @RequestParam String timestamp,
+			@RequestParam String token) {
+		String realIp = request.getHeader("x-forwarded-for");
+		if (StringUtils.isBlank(realIp)) {
+			realIp = request.getHeader("x-real-ip");
+		}
+		return authService.thirdPartyStudentAccess(rootOrgId, accountType, accountValue, appId,
+				timestamp, token, realIp);
 	}
 
 	@Naked

+ 20 - 3
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/AuthService.java

@@ -41,7 +41,7 @@ public interface AuthService {
 	User getLoginUser(String key, String token);
 
 	/**
-	 * 第三方登陆名接入
+	 * 第三方普通用户登陆名接入
 	 *
 	 * @author WANGWEI
 	 * @param rootOrgId
@@ -53,7 +53,24 @@ public interface AuthService {
 	 * @return
 	 * @throws StatusException
 	 */
-	User thirdPartyCommonUserAccess(Long rootOrgId, String loginName, String appId, String timestamp, String token,
-			String clientIp) throws StatusException;
+	User thirdPartyCommonUserAccess(Long rootOrgId, String loginName, String appId,
+			String timestamp, String token, String clientIp) throws StatusException;
+
+	/**
+	 * 第三方学生登陆
+	 *
+	 * @author WANGWEI
+	 * @param rootOrgId
+	 * @param accountType
+	 * @param accountValue
+	 * @param appId
+	 * @param timestamp
+	 * @param token
+	 * @param clientIp
+	 * @return
+	 * @throws StatusException
+	 */
+	User thirdPartyStudentAccess(Long rootOrgId, String accountType, String accountValue,
+			String appId, String timestamp, String token, String clientIp) throws StatusException;
 
 }

+ 8 - 2
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -533,8 +533,8 @@ public class AuthServiceImpl implements AuthService {
 	}
 
 	@Override
-	public User thirdPartyCommonUserAccess(Long rootOrgId, String loginName, String appId, String timestamp,
-			String token, String clientIp) throws StatusException {
+	public User thirdPartyCommonUserAccess(Long rootOrgId, String loginName, String appId,
+			String timestamp, String token, String clientIp) throws StatusException {
 
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == rootOrg) {
@@ -638,4 +638,10 @@ public class AuthServiceImpl implements AuthService {
 		return roleList;
 	}
 
+	@Override
+	public User thirdPartyStudentAccess(Long rootOrgId, String accountType, String accountValue,
+			String appId, String timestamp, String token, String clientIp) throws StatusException {
+		return null;
+	}
+
 }