update 编辑标协会议时没有酒店报错

This commit is contained in:
lijiarao
2022-10-26 14:29:59 +08:00
parent f5f5c33d39
commit e6be4a0ee0
2 changed files with 9 additions and 3 deletions
@@ -84,13 +84,13 @@ public class HotelManagementServiceImpl extends ServiceImpl<HotelManagementMappe
public Boolean edit(HotelManagement hotelManagement) {
//判断主键是否存在
if (StringUtils.isBlank(hotelManagement.getId())) {
throw new JeroBootException(Result.NULL_ID);
return false;
}
//判断Entity是否存在
if (hotelManagement == null) {
throw new JeroBootException(Result.NULL_DATA);
}
HotelManagement hotelManagementDB = hotelManagementService.getById(hotelManagement.getId());
//HotelManagement hotelManagementDB = hotelManagementService.getById(hotelManagement.getId());
//获取召开时间
try {
@@ -1,5 +1,6 @@
package com.jero.standards.xuanguan.stablecrosstraining.service.impl;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
@@ -26,6 +27,8 @@ import com.jero.standards.meetingNews.entity.MeetingNews;
import com.jero.standards.meetingNews.service.IMeetingNewsService;
import com.jero.standards.xuanguan.stablecrosstraining.entity.WebMeetingStandard;
import com.jero.standards.xuanguan.stablecrosstraining.service.IWebMeetingStandardService;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import com.jero.standards.xuanguan.attendmeetings.entity.AttendMeetings;
import com.jero.standards.xuanguan.attendmeetings.service.IAttendMeetingsService;
@@ -297,7 +300,10 @@ public class StableCrossTrainingServiceImpl extends ServiceImpl<StableCrossTrain
.setPlace(stableCrossTraining.getConvokeLocale()).setPlaceName(stableCrossTraining.getPlaceName())
.setHotelName(stableCrossTraining.getHotelName()).setAddress(stableCrossTraining.getHotelAddress())
// .setContactPerson(stableCrossTraining.getContactPerson()).setContactNumber(stableCrossTraining.getContactNumber())
.setMeetingType(1).setId(hotelManagements.get(0).getId());
.setMeetingType(1);
if (!hotelManagements.isEmpty()) {
hotelManagement.setId(hotelManagements.get(0).getId());
}
hotelManagementService.edit(hotelManagement);
webMeetingStandardService.remove(new LambdaQueryWrapper<WebMeetingStandard>().eq(WebMeetingStandard::getStableCrossId,stableCrossTraining.getId()));
if(!CollectionUtils.isEmpty(stableCrossTraining.getQuestionList())){