|
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
|
12
|
12
|
|
13
|
13
|
import javax.annotation.Resource;
|
14
|
14
|
import java.util.ArrayList;
|
|
15
|
+import java.util.HashMap;
|
15
|
16
|
import java.util.List;
|
16
|
17
|
import java.util.Map;
|
17
|
18
|
import java.util.stream.Collectors;
|
|
@@ -146,4 +147,31 @@ public class SchoolStypeService {
|
146
|
147
|
}
|
147
|
148
|
return rtnlst;
|
148
|
149
|
}
|
|
150
|
+
|
|
151
|
+ /*
|
|
152
|
+ * @Description 获取学校样式(设置登录页面获取数据)
|
|
153
|
+ * @Date 2023/11/21 10:39:18
|
|
154
|
+ * @Author WN
|
|
155
|
+ * @Param [stype]
|
|
156
|
+ * @Return java.util.Map<java.lang.String,java.util.List<com.xhkjedu.sapi.model.system.TSchoolStype>>
|
|
157
|
+ **/
|
|
158
|
+ public Map<String,List<TSchoolStype>> listSchoolStypeAndDefault(TSchoolStype stype) {
|
|
159
|
+ List<TSchoolStype> lst = schoolStypeMapper.findAll2(stype);
|
|
160
|
+
|
|
161
|
+ Map<String,List<TSchoolStype>> rtnMap = new HashMap<>();
|
|
162
|
+ if(N_Utils.isListNotEmpty(lst)){
|
|
163
|
+ //获取学校设置的
|
|
164
|
+ List<TSchoolStype> schoolStypes = lst.stream().filter(s -> stype.getSchoolid().equals(s.getSchoolid())).collect(Collectors.toList());
|
|
165
|
+ //默认地址
|
|
166
|
+ List<TSchoolStype> defaultStypes = lst.stream().filter(s -> "default".equals(s.getSchooldomain())).collect(Collectors.toList());
|
|
167
|
+
|
|
168
|
+ rtnMap.put("school",schoolStypes);
|
|
169
|
+ rtnMap.put("default",defaultStypes);
|
|
170
|
+ }else{
|
|
171
|
+ rtnMap.put("school",new ArrayList<>());
|
|
172
|
+ rtnMap.put("default",new ArrayList<>());
|
|
173
|
+ }
|
|
174
|
+
|
|
175
|
+ return rtnMap;
|
|
176
|
+ }
|
149
|
177
|
}
|