zouxuan 5 년 전
부모
커밋
9f9b596f0f

+ 1 - 1
edu-auth/edu-auth-server/src/main/java/com/keao/edu/auth/config/ResourceServerConfig.java

@@ -26,7 +26,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 	@Override
 	public void configure(HttpSecurity http) throws Exception {
 		http.csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler).authenticationEntryPoint(baseAuthenticationEntryPoint).and()
-				.authorizeRequests().antMatchers("/task/**","/v2/api-docs","/code/*").hasIpAddress("0.0.0.0/0").anyRequest().authenticated().and().httpBasic();
+				.authorizeRequests().antMatchers("/task/**","/v2/api-docs","/code/*","/user/updatePassword","/user/noAuth/queryUserByPhone").hasIpAddress("0.0.0.0/0").anyRequest().authenticated().and().httpBasic();
 	}
 
 	@Override

+ 2 - 2
edu-auth/edu-auth-server/src/main/resources/application.yml

@@ -26,7 +26,7 @@ spring:
 
   datasource:
     name: test
-    url: jdbc:mysql://47.99.212.176:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://47.114.176.40:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
     username: edu_saas
     password: dayaDataOnline@2019
     # 使用druid数据源
@@ -47,7 +47,7 @@ spring:
     maxOpenPreparedStatements: 20
 
   redis:
-    host: 47.99.212.176
+    host: 47.114.176.40
     port: 6379
     password: dyym
     database: 1

+ 2 - 2
edu-im/edu-im-server/src/main/resources/application.yml

@@ -30,7 +30,7 @@ spring:
 
   datasource:
     name: test
-    url: jdbc:mysql://47.99.212.176:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://47.114.176.40:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
     username: edu_saas
     password: dayaDataOnline@2019
     # 使用druid数据源
@@ -51,7 +51,7 @@ spring:
     maxOpenPreparedStatements: 20
 
   redis:
-    host: 47.99.212.176
+    host: 47.114.176.40
     port: 6379
     password: dyym
     database: 1

+ 42 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/StudentController.java

@@ -0,0 +1,42 @@
+package com.keao.edu.user.controller;
+
+
+import com.keao.edu.common.controller.BaseController;
+import com.keao.edu.common.entity.HttpResponseResult;
+import com.keao.edu.common.page.PageInfo;
+import com.keao.edu.common.page.QueryInfo;
+import com.keao.edu.user.entity.Student;
+import com.keao.edu.user.service.StudentService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 系统配置控制层
+ */
+@RestController
+@Api(tags = "学员服务")
+@RequestMapping(value = "student")
+public class StudentController extends BaseController {
+
+	@Autowired
+	private StudentService studentService;
+
+	@ApiOperation(value = "学员列表")
+	@GetMapping(value = "list")
+    @PreAuthorize("@pcs.hasPermissions('teacher/list')")
+	public HttpResponseResult<PageInfo<Student>> list(QueryInfo queryInfo) {
+		return succeed(studentService.queryPage(queryInfo));
+	}
+
+	@ApiOperation(value = "查询学员")
+	@GetMapping(value = "get")
+    @PreAuthorize("@pcs.hasPermissions('teacher/get')")
+	public HttpResponseResult<Student> get(Integer id) {
+		return succeed(studentService.get(id));
+	}
+}

+ 2 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/StudentServiceImpl.java

@@ -10,12 +10,14 @@ import com.keao.edu.user.entity.Student;
 import com.keao.edu.user.service.StudentService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
  * @Author Joburgess
  * @Date 2020.06.18
  */
+@Service
 public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implements StudentService {
 
     @Autowired

+ 2 - 2
edu-user/edu-user-server/src/main/resources/application.yml

@@ -29,7 +29,7 @@ spring:
 #    url: jdbc:mysql://47.99.212.176:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
 #    username: edu_saas
 #    password: edu_saas
-    url: jdbc:mysql://47.99.212.176:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://47.114.176.40:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
     username: edu_saas
     password: dayaDataOnline@2019
     # 使用druid数据源
@@ -50,7 +50,7 @@ spring:
     maxOpenPreparedStatements: 20
 
   redis:
-    host: 47.99.212.176
+    host: 47.114.176.40
     port: 6379
     password: dyym
     database: 1