Commit ecd4b4cf by 王璐琦

fix(DailyReportRecordService): 删除getDailyReportDetail中冗余非空断言

- 移除对dailyReportRecordDTO.getId的非空校验断言
- 保留对dailyReportRecordDTO整体非空的断言
- 简化代码逻辑,避免重复校验引发异常
1 parent 7e0525a4
......@@ -967,7 +967,6 @@ public class DailyReportRecordService {
*/
public DailyReportRecordDTO getDailyReportDetail(DailyReportRecordDTO dailyReportRecordDTO) {
RpcAssert.assertNotNull(dailyReportRecordDTO, DefaultErrorEnum.DATA_NULL, "dailyReportRecordDTO must not be null");
RpcAssert.assertNotNull(dailyReportRecordDTO.getId(), DefaultErrorEnum.DATA_NULL, "dailyReportRecordDTO.getId must not be null");
try {
return CommonUtil.getFirst(dailyReportRecordMapper.listDailyReportRecord(dailyReportRecordDTO));
} catch (RpcServiceException e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!