Browse Source

完善附属学校接口

tags/正式版本
王宁 2 years ago
parent
commit
45172790eb

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/controller/system/SchoolController.java View File

@@ -153,7 +153,7 @@ public class SchoolController {
153 153
     public ResultVo getFschoolids(@RequestBody SchoolParams params) {
154 154
         Integer schoolid = params.getSchoolid();
155 155
         N_Utils.validation(new Object[]{schoolid, "学校id", 1});
156
-        List<Integer> list = schoolService.listFSchoolidsBySchoolid(schoolid);
156
+        List<Map> list = schoolService.listFSchoolidsBySchoolid(schoolid);
157 157
         return new ResultVo(0, "获取成功",list);
158 158
     }
159 159
 

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/mapper/system/SchoolFriendMapper.java View File

@@ -17,7 +17,7 @@ import java.util.Map;
17 17
 public interface SchoolFriendMapper extends TkMapper<TSchoolFriend> {
18 18
 
19 19
     //获取关联学校id
20
-    List<Integer> listFSchoolidsBySchoolid(@Param("schoolid")Integer schoolid);
20
+    List<Map> listFSchoolidsBySchoolid(@Param("schoolid")Integer schoolid);
21 21
 
22 22
     //删除学校附属学校
23 23
     void deleteBySchoolid(@Param("schoolid")Integer schoolid);

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/service/system/SchoolService.java View File

@@ -444,7 +444,7 @@ public class SchoolService {
444 444
     }
445 445
 
446 446
     //获取学校附属学校
447
-    public List<Integer> listFSchoolidsBySchoolid(Integer schoolid){
447
+    public List<Map> listFSchoolidsBySchoolid(Integer schoolid){
448 448
         return schoolFriendMapper.listFSchoolidsBySchoolid(schoolid);
449 449
     }
450 450
 

+ 3
- 2
sapi/src/main/resources/mapper/system/SchoolFriendMapper.xml View File

@@ -2,8 +2,9 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.xhkjedu.sapi.mapper.system.SchoolFriendMapper">
4 4
     <!--获取关联学校id-->
5
-    <select id="listFSchoolidsBySchoolid" resultType="java.lang.Integer">
6
-        select fschoolid from t_school_friend where schoolid=#{schoolid} order by schoolid
5
+    <select id="listFSchoolidsBySchoolid" resultType="java.util.Map">
6
+        select f.fschoolid as schoolid,s.schoolname from t_school_friend f
7
+            left join t_school s on s.schoolid=f.fschoolid  where f.schoolid=#{schoolid} order by f.schoolid
7 8
     </select>
8 9
 
9 10
     <!--删除学校附属学校-->

Loading…
Cancel
Save