|
@@ -8,6 +8,7 @@ import com.tourism.common.core.object.*;
|
|
|
import com.tourism.common.core.util.MyCommonUtil;
|
|
|
import com.tourism.common.core.util.MyModelUtil;
|
|
|
import com.tourism.common.core.util.MyPageUtil;
|
|
|
+import com.tourism.common.core.validator.UpdateGroup;
|
|
|
import com.tourism.common.log.annotation.OperationLog;
|
|
|
import com.tourism.common.log.model.constant.SysOperationLogType;
|
|
|
import com.tourism.common.sequence.wrapper.IdGeneratorWrapper;
|
|
@@ -188,7 +189,7 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
@PostMapping("/publishDraft")
|
|
|
@Transactional
|
|
|
public ResponseResult<Void> publishDraft(@RequestBody TourismProjectTravelNotesWriteDto tourismProjectTravelNotesWriteDto) {
|
|
|
- String errorMessage = MyCommonUtil.getModelValidationError(tourismProjectTravelNotesWriteDto);
|
|
|
+ String errorMessage = MyCommonUtil.getModelValidationError(tourismProjectTravelNotesWriteDto,UpdateGroup.class);
|
|
|
if (errorMessage != null) {
|
|
|
return ResponseResult.success(null);
|
|
|
}
|
|
@@ -340,6 +341,10 @@ public class WebSiteTourismTravelNotesPublishController {
|
|
|
@OperationLog(type = SysOperationLogType.UPDATE)
|
|
|
@PostMapping("/savePerfect")
|
|
|
public ResponseResult<Void> savePerfect(@RequestBody WebsiteTourUserDto websiteTourUserDto) {
|
|
|
+ String errorMessage = MyCommonUtil.getModelValidationError(websiteTourUserDto, UpdateGroup.class);
|
|
|
+ if (errorMessage != null) {
|
|
|
+ return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
|
|
+ }
|
|
|
Long userId = TokenData.takeFromRequest().getUserId();
|
|
|
TourUser tourUser = tourUserService.getById(userId);
|
|
|
TourUser tourUserModel = MyModelUtil.copyTo(tourUser, TourUser.class);
|