Commit 256f2579 by Daichi Sato

#59888 同名ジャンルがまとまってしまう問題(Checkでも同様の事象発生するため併せて修正)

parent 0a201189
...@@ -220,7 +220,7 @@ public class ContentDao extends AbstractDao { ...@@ -220,7 +220,7 @@ public class ContentDao extends AbstractDao {
} }
// ABookCheck用 // ABookCheck用
column = cursor.getColumnIndex("categeory_id"); column = cursor.getColumnIndex("category_id");
if (column != -1) { if (column != -1) {
dto.categoryId = cursor.getInt(column); dto.categoryId = cursor.getInt(column);
} }
......
...@@ -3,6 +3,8 @@ package jp.agentec.abook.abv.bl.dto; ...@@ -3,6 +3,8 @@ package jp.agentec.abook.abv.bl.dto;
import java.util.List; import java.util.List;
public class CategoryContentDto { public class CategoryContentDto {
public int categoryId;
public String categoryName; public String categoryName;
public List<ContentDto> contentDtoArray; public List<ContentDto> contentDtoArray;
} }
...@@ -1601,7 +1601,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1601,7 +1601,7 @@ public class OperationLogic extends AbstractLogic {
CategoryContentDto categoryContentDto = new CategoryContentDto(); CategoryContentDto categoryContentDto = new CategoryContentDto();
for (ContentDto contentDto : contentDtoList) { for (ContentDto contentDto : contentDtoList) {
if (contentDto.categoryNames.equals(categoryContentDto.categoryName)) { if (contentDto.categoryId == categoryContentDto.categoryId) {
saveContentDtoArray.add(contentDto); saveContentDtoArray.add(contentDto);
} else { } else {
if (saveContentDtoArray.size() != 0) { if (saveContentDtoArray.size() != 0) {
...@@ -1610,6 +1610,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1610,6 +1610,7 @@ public class OperationLogic extends AbstractLogic {
} }
categoryContentDto = new CategoryContentDto(); categoryContentDto = new CategoryContentDto();
saveContentDtoArray = new ArrayList<ContentDto>(); saveContentDtoArray = new ArrayList<ContentDto>();
categoryContentDto.categoryId = contentDto.categoryId;
categoryContentDto.categoryName = contentDto.categoryNames; categoryContentDto.categoryName = contentDto.categoryNames;
saveContentDtoArray.add(contentDto); saveContentDtoArray.add(contentDto);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment