|
@@ -129,7 +129,7 @@ public class TourismProjectServiceImpl extends BaseService<TourismProject, Strin
|
|
|
public boolean update(TourismProject tourismProject, TourismProject originalTourismProject) {
|
|
|
MyModelUtil.fillCommonsForUpdate(tourismProject, originalTourismProject);
|
|
|
// 这里重点提示,在执行主表数据更新之前,如果有哪些字段不支持修改操作,请用原有数据对象字段替换当前数据字段。
|
|
|
- UpdateWrapper<TourismProject> uw = this.createUpdateQueryForNullValue(tourismProject, tourismProject.getId());
|
|
|
+ UpdateWrapper<TourismProject> uw = this.createUpdateQueryForNullValue(tourismProject, String.valueOf(tourismProject.getId()));
|
|
|
return tourismProjectMapper.update(tourismProject, uw) == 1;
|
|
|
}
|
|
|
|
|
@@ -149,13 +149,13 @@ public class TourismProjectServiceImpl extends BaseService<TourismProject, Strin
|
|
|
// 对于一对一新增或更新,如果主键值为空就新增,否则就更新,同时更新updateTime和updateUserId。
|
|
|
TourismFile tourismFile = relationData.getObject("tourismFile", TourismFile.class);
|
|
|
if (tourismFile != null) {
|
|
|
- tourismFile.setAssociationTableId(tourismProject.getId());
|
|
|
+ tourismFile.setAssociationTableId(String.valueOf(tourismProject.getId()));
|
|
|
tourismFileService.saveNewOrUpdate(tourismFile,
|
|
|
tourismFileService::saveNew, tourismFileService::update);
|
|
|
}
|
|
|
TourismContent tourismContent = relationData.getObject("tourismContent", TourismContent.class);
|
|
|
if (tourismContent != null) {
|
|
|
- tourismContent.setAssociationId(tourismProject.getId());
|
|
|
+ tourismContent.setAssociationId(String.valueOf(tourismProject.getId()));
|
|
|
tourismContentService.saveNewOrUpdate(tourismContent,
|
|
|
tourismContentService::saveNew, tourismContentService::update);
|
|
|
}
|
|
@@ -270,7 +270,7 @@ public class TourismProjectServiceImpl extends BaseService<TourismProject, Strin
|
|
|
|
|
|
private TourismProject buildDefaultValue(TourismProject tourismProject) {
|
|
|
if (tourismProject.getId() == null) {
|
|
|
- tourismProject.setId(idGenerator.nextStringId());
|
|
|
+ tourismProject.setId(idGenerator.nextLongId());
|
|
|
}
|
|
|
MyModelUtil.fillCommonsForInsert(tourismProject);
|
|
|
tourismProject.setDataState(GlobalDeletedFlag.NORMAL);
|