update 问答库-提问

This commit is contained in:
liao
2023-09-28 17:23:46 +08:00
parent 8b90d80017
commit b52cfa7755
@@ -75,9 +75,6 @@ public class LawsProblemLibraryServiceImpl extends ServiceImpl<LawsProblemLibrar
if (StringUtils.isBlank(lawsProblemLibrary.getTitle())) { if (StringUtils.isBlank(lawsProblemLibrary.getTitle())) {
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "title"); throw new JeroBootException(ResultCommon.EMPTY_COMMON, "title");
} }
if (StringUtils.isBlank(lawsProblemLibrary.getStandardNumber())) {
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "standardNumber");
}
if (StringUtils.isBlank(lawsProblemLibrary.getProblemDescription())) { if (StringUtils.isBlank(lawsProblemLibrary.getProblemDescription())) {
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "problemDescription"); throw new JeroBootException(ResultCommon.EMPTY_COMMON, "problemDescription");
} }
@@ -86,6 +83,9 @@ public class LawsProblemLibraryServiceImpl extends ServiceImpl<LawsProblemLibrar
} }
// 如果是国内、海外、企业 // 如果是国内、海外、企业
if (!"4".equals(lawsProblemLibrary.getType())) { if (!"4".equals(lawsProblemLibrary.getType())) {
if (StringUtils.isBlank(lawsProblemLibrary.getStandardNumber())) {
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "standardNumber");
}
ManyStandardSelectionBox singleStandard = lawsCommonService.getSingleStandard(lawsProblemLibrary.getStandardNumber(), null); ManyStandardSelectionBox singleStandard = lawsCommonService.getSingleStandard(lawsProblemLibrary.getStandardNumber(), null);
lawsProblemLibrary.setStandardId(singleStandard.getId()); lawsProblemLibrary.setStandardId(singleStandard.getId());
lawsProblemLibrary.setStandardName(singleStandard.getStandardName()); lawsProblemLibrary.setStandardName(singleStandard.getStandardName());