Browse Source

班级学生模块,获取班级年份动态

tags/正式3.2.0
王宁 2 years ago
parent
commit
74cb9793c1

+ 17
- 19
suser/src/main/java/com/xhkjedu/suser/service/gradeclass/GradeService.java View File

1
 package com.xhkjedu.suser.service.gradeclass;
1
 package com.xhkjedu.suser.service.gradeclass;
2
 
2
 
3
 import com.xhkjedu.suser.mapper.gradeclass.GradeMapper;
3
 import com.xhkjedu.suser.mapper.gradeclass.GradeMapper;
4
-//import com.xhkjedu.suser.mapper.gradeclass.SchoolMapper;
4
+import com.xhkjedu.suser.mapper.gradeclass.SchoolMapper;
5
 import com.xhkjedu.suser.model.gradeclass.TGrade;
5
 import com.xhkjedu.suser.model.gradeclass.TGrade;
6
-import com.xhkjedu.utils.N_Utils;
7
 import com.xhkjedu.suser.vo.gradeclass.GradeVo;
6
 import com.xhkjedu.suser.vo.gradeclass.GradeVo;
7
+import com.xhkjedu.utils.N_Utils;
8
 import org.springframework.stereotype.Service;
8
 import org.springframework.stereotype.Service;
9
 
9
 
10
 import javax.annotation.Resource;
10
 import javax.annotation.Resource;
13
 /**
13
 /**
14
  * @author ywx
14
  * @author ywx
15
  * @classname TGradeService
15
  * @classname TGradeService
16
- * @description 
16
+ * @description
17
  * @date 2020/6/2 14:53
17
  * @date 2020/6/2 14:53
18
  **/
18
  **/
19
 @Service
19
 @Service
20
 public class GradeService {
20
 public class GradeService {
21
     @Resource
21
     @Resource
22
     private GradeMapper gradeMapper;
22
     private GradeMapper gradeMapper;
23
-    //@Resource
24
-    //private SchoolMapper schoolMapper;
23
+    @Resource
24
+    private SchoolMapper schoolMapper;
25
 
25
 
26
     //添加
26
     //添加
27
     public Integer save(TGrade model) {
27
     public Integer save(TGrade model) {
46
     }
46
     }
47
 
47
 
48
     //获取列表
48
     //获取列表
49
-    public List <TGrade> findAll(Integer schoolid) {
50
-        //Integer year = schoolMapper.getYearById(schoolid);
51
-        Integer year = 2021;
49
+    public List<TGrade> findAll(Integer schoolid) {
50
+        Integer year = schoolMapper.getYearById(schoolid);
52
         return gradeMapper.findAll(schoolid, year);
51
         return gradeMapper.findAll(schoolid, year);
53
     }
52
     }
54
 
53
 
55
     /**
54
     /**
56
      * 获取通知班级列表
55
      * 获取通知班级列表
56
+     *
57
+     * @return java.util.List<com.xhkjedu.suser.vo.gradeclass.GradeVo>
57
      * @Param [schoolid, year]
58
      * @Param [schoolid, year]
58
      * @Author ywx
59
      * @Author ywx
59
      * @Date 2020/6/13 15:41
60
      * @Date 2020/6/13 15:41
60
-     * @return java.util.List<com.xhkjedu.suser.vo.gradeclass.GradeVo>
61
      **/
61
      **/
62
-    public List<GradeVo> listClass(Integer schoolid,Integer classtype) {
63
-        //Integer year = schoolMapper.getYearById(schoolid);
64
-        Integer year = 2021;
65
-        return gradeMapper.listClass(schoolid, year,classtype);
62
+    public List<GradeVo> listClass(Integer schoolid, Integer classtype) {
63
+        Integer year = schoolMapper.getYearById(schoolid);
64
+        return gradeMapper.listClass(schoolid, year, classtype);
66
     }
65
     }
67
 
66
 
68
     /**
67
     /**
69
      * 获取通知教师列表
68
      * 获取通知教师列表
69
+     *
70
+     * @return java.util.List<com.xhkjedu.suser.vo.gradeclass.GradeVo>
70
      * @Param [schoolid, year]
71
      * @Param [schoolid, year]
71
      * @Author ywx
72
      * @Author ywx
72
      * @Date 2020/6/13 15:42
73
      * @Date 2020/6/13 15:42
73
-     * @return java.util.List<com.xhkjedu.suser.vo.gradeclass.GradeVo>
74
      **/
74
      **/
75
     public List<GradeVo> listTeacher(Integer schoolid) {
75
     public List<GradeVo> listTeacher(Integer schoolid) {
76
-        //Integer year = schoolMapper.getYearById(schoolid);
77
-        Integer year = 2021;
76
+        Integer year = schoolMapper.getYearById(schoolid);
78
         return gradeMapper.listTeacher(schoolid, year);
77
         return gradeMapper.listTeacher(schoolid, year);
79
     }
78
     }
80
 
79
 
81
     //获取行政班和提高班
80
     //获取行政班和提高班
82
     public List<GradeVo> listClassForTeacher(Integer schoolid) {
81
     public List<GradeVo> listClassForTeacher(Integer schoolid) {
83
-        //Integer year = schoolMapper.getYearById(schoolid);
84
-        Integer year = 2021;
85
-        return gradeMapper.listClassForTeacher(schoolid,year);
82
+        Integer year = schoolMapper.getYearById(schoolid);
83
+        return gradeMapper.listClassForTeacher(schoolid, year);
86
     }
84
     }
87
 }
85
 }

+ 1
- 7
suser/src/main/resources/application.properties View File

1
 server.port=8083
1
 server.port=8083
2
-
3
 spring.application.name=suser
2
 spring.application.name=suser
4
 #注册到我们本地的eureka注册中心,端口8081
3
 #注册到我们本地的eureka注册中心,端口8081
5
 eureka.client.service-url.defaultZone=http://127.0.0.1:8081/eureka/
4
 eureka.client.service-url.defaultZone=http://127.0.0.1:8081/eureka/
6
 #设置eureka输出日志级别
5
 #设置eureka输出日志级别
7
 logging.level.com.netflix=error
6
 logging.level.com.netflix=error
8
-
9
 spring.datasource.url=jdbc:mysql://dbtest.xhkjedu.com:13306/xhkjedu_school_test?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true&allowMultiQueries=true
7
 spring.datasource.url=jdbc:mysql://dbtest.xhkjedu.com:13306/xhkjedu_school_test?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true&allowMultiQueries=true
10
 spring.datasource.username=root
8
 spring.datasource.username=root
11
 spring.datasource.password=_xhkjedu!@#07
9
 spring.datasource.password=_xhkjedu!@#07
12
 spring.mvc.hiddenmethod.filter.enabled=true
10
 spring.mvc.hiddenmethod.filter.enabled=true
13
-
14
 #数据库连接池配置
11
 #数据库连接池配置
15
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
12
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
16
 #允许的最小空闲数
13
 #允许的最小空闲数
26
 spring.datasource.hikari.connection-timeout=20000
23
 spring.datasource.hikari.connection-timeout=20000
27
 # 测试连接是否可用的query 语句 在oracle是 select 1 from dual  36   28.26
24
 # 测试连接是否可用的query 语句 在oracle是 select 1 from dual  36   28.26
28
 spring.datasource.hikari.connection-test-query=SELECT 1
25
 spring.datasource.hikari.connection-test-query=SELECT 1
29
-
30
 # 所有Entity别名类所在包
26
 # 所有Entity别名类所在包
31
 mybatis.type-aliases-package=com.xhkjedu.suser.model,com.xhkjedu.suser.vo
27
 mybatis.type-aliases-package=com.xhkjedu.suser.model,com.xhkjedu.suser.vo
32
 mybatis.mapper-Locations=classpath*:mapper/**/*.xml
28
 mybatis.mapper-Locations=classpath*:mapper/**/*.xml
36
 logging.level.com.xhkjedu.suser.mapper=debug
32
 logging.level.com.xhkjedu.suser.mapper=debug
37
 #分页
33
 #分页
38
 spring.pagehelper.helper-dialect=mysql
34
 spring.pagehelper.helper-dialect=mysql
39
-
40
 #redis配置
35
 #redis配置
41
 spring.redis.host=cachetest.xhkjedu.com
36
 spring.redis.host=cachetest.xhkjedu.com
42
 spring.redis.port=6379
37
 spring.redis.port=6379
59
 signName=【河南星火燎原】
54
 signName=【河南星火燎原】
60
 #郑州管城大数据SSO认证鉴权接口
55
 #郑州管城大数据SSO认证鉴权接口
61
 ssourl=http://gcdsj.zzgcjy.cn/portal/sso/api/agent
56
 ssourl=http://gcdsj.zzgcjy.cn/portal/sso/api/agent
62
-
63
 #版本号
57
 #版本号
64
-versionname=Test_v3.2.0
58
+versionname=Test_v3.2.1

Loading…
Cancel
Save