Browse Source

Merge branch 'zouxuan' of http://git.dayaedu.com/yonge/cooleshow

zouxuan 3 years ago
parent
commit
04a1da8adc

+ 9 - 1
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserDeviceServiceImpl.java

@@ -42,7 +42,15 @@ public class SysUserDeviceServiceImpl extends BaseServiceImpl<Long, SysUserDevic
 
 	@Override
 	public boolean bindDevice(String clientId, Long userId, String deviceNum) {
-		String configValue = sysConfigDao.findConfigValue("user_device_login_num");
+		String paramName;
+		if (StringUtils.equals(clientId, "STUDENT")) {
+			paramName = "student_device_acc_num";
+		} else if (StringUtils.equals(clientId, "TEACHER")) {
+			paramName = "teacher_device_acc_num";
+		}else {
+			return true;
+		}
+		String configValue = sysConfigDao.findConfigValue(paramName);
 		if(StringUtils.isEmpty(configValue)){
 			return true;
 		}