Commit 256f2579 by Daichi Sato

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

parent 0a201189
......@@ -220,7 +220,7 @@ public class ContentDao extends AbstractDao {
}
// ABookCheck用
column = cursor.getColumnIndex("categeory_id");
column = cursor.getColumnIndex("category_id");
if (column != -1) {
dto.categoryId = cursor.getInt(column);
}
......
......@@ -3,6 +3,8 @@ package jp.agentec.abook.abv.bl.dto;
import java.util.List;
public class CategoryContentDto {
public int categoryId;
public String categoryName;
public List<ContentDto> contentDtoArray;
}
......@@ -1601,7 +1601,7 @@ public class OperationLogic extends AbstractLogic {
CategoryContentDto categoryContentDto = new CategoryContentDto();
for (ContentDto contentDto : contentDtoList) {
if (contentDto.categoryNames.equals(categoryContentDto.categoryName)) {
if (contentDto.categoryId == categoryContentDto.categoryId) {
saveContentDtoArray.add(contentDto);
} else {
if (saveContentDtoArray.size() != 0) {
......@@ -1610,6 +1610,7 @@ public class OperationLogic extends AbstractLogic {
}
categoryContentDto = new CategoryContentDto();
saveContentDtoArray = new ArrayList<ContentDto>();
categoryContentDto.categoryId = contentDto.categoryId;
categoryContentDto.categoryName = contentDto.categoryNames;
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