質問編集履歴
2
説明分の編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
```service
|
12
|
-
public List<
|
12
|
+
public List<User> search(UserForm form) throws Exception {
|
13
|
-
List <
|
13
|
+
List <User> result = UserRepository.findList(form.getBlNm(), form.getRoNo());
|
14
14
|
}
|
15
15
|
return result;
|
16
16
|
}
|
1
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,34 +7,11 @@
|
|
7
7
|
|
8
8
|
デッバク時にListの値を確認したところ、「値の検索中に com.sun.jdi.ObjectCollectedException が発生しました。」とエラーがでました。
|
9
9
|
|
10
|
-
```Java
|
11
|
-
@Repository
|
12
|
-
public interface MUnitRepository extends JpaRepository<MUnit, Long> {
|
13
10
|
|
14
|
-
|
15
|
-
@Query(value ="SELECT mu.unitId,mb.bldgId,mb.bldgNm,mu.roomNo,mu.layoutNum,mu.layoutKbn,mu.exclusiveArea,mu.floor,mb.builtYm,mp.prefNm,mc.cityNm,mb.town "
|
16
|
-
+ "FROM MUnit mu "
|
17
|
-
+ "INNER JOIN MBldg mb ON mu.bldgId = mb.bldgId "
|
18
|
-
+ "LEFT JOIN MBldgSta bs ON bs.bldgId = mb.bldgId "
|
19
|
-
+ "LEFT JOIN MPref mp ON mb.prefId = mp.prefId "
|
20
|
-
+ "LEFT JOIN MCity mc ON mb.cityId = mc.cityId")
|
21
|
-
public List<MUnit> findList(String bldgNm,String roomNo,String prefNm, String cityNm, String town,String cho);
|
22
|
-
}
|
23
|
-
```
|
24
|
-
|
25
11
|
```service
|
26
|
-
public List<MUnit> search(
|
12
|
+
public List<MUnit> search(UForm form) throws Exception {
|
27
|
-
List <MUnit> result =
|
13
|
+
List <MUnit> result = mURepository.findList(form.getBlNm(), form.getRoNo(), form.getPrNm(),form.getCiNm(), form.getTown(),);
|
28
14
|
}
|
29
15
|
return result;
|
30
16
|
}
|
31
|
-
```
|
32
|
-
|
33
|
-
```controller
|
34
|
-
@RequestMapping(path = "search", method = RequestMethod.GET)
|
35
|
-
//検索メソッド
|
36
|
-
public String search(UnitForm form,Model model) throws Exception {
|
37
|
-
|
38
|
-
return JsonUtil.convSearchData(unitService.search(form));
|
39
|
-
}
|
40
17
|
```
|