Explorar el Código

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

tags/正式3.2.0
王宁 hace 2 años
padre
commit
74cb9793c1

+ 17
- 19
suser/src/main/java/com/xhkjedu/suser/service/gradeclass/GradeService.java Ver fichero

@@ -1,10 +1,10 @@
1 1
 package com.xhkjedu.suser.service.gradeclass;
2 2
 
3 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 5
 import com.xhkjedu.suser.model.gradeclass.TGrade;
6
-import com.xhkjedu.utils.N_Utils;
7 6
 import com.xhkjedu.suser.vo.gradeclass.GradeVo;
7
+import com.xhkjedu.utils.N_Utils;
8 8
 import org.springframework.stereotype.Service;
9 9
 
10 10
 import javax.annotation.Resource;
@@ -13,15 +13,15 @@ import java.util.List;
13 13
 /**
14 14
  * @author ywx
15 15
  * @classname TGradeService
16
- * @description 
16
+ * @description
17 17
  * @date 2020/6/2 14:53
18 18
  **/
19 19
 @Service
20 20
 public class GradeService {
21 21
     @Resource
22 22
     private GradeMapper gradeMapper;
23
-    //@Resource
24
-    //private SchoolMapper schoolMapper;
23
+    @Resource
24
+    private SchoolMapper schoolMapper;
25 25
 
26 26
     //添加
27 27
     public Integer save(TGrade model) {
@@ -46,42 +46,40 @@ public class GradeService {
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 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 58
      * @Param [schoolid, year]
58 59
      * @Author ywx
59 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 71
      * @Param [schoolid, year]
71 72
      * @Author ywx
72 73
      * @Date 2020/6/13 15:42
73
-     * @return java.util.List<com.xhkjedu.suser.vo.gradeclass.GradeVo>
74 74
      **/
75 75
     public List<GradeVo> listTeacher(Integer schoolid) {
76
-        //Integer year = schoolMapper.getYearById(schoolid);
77
-        Integer year = 2021;
76
+        Integer year = schoolMapper.getYearById(schoolid);
78 77
         return gradeMapper.listTeacher(schoolid, year);
79 78
     }
80 79
 
81 80
     //获取行政班和提高班
82 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 Ver fichero

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