Эх сурвалжийг харах

[fix]
1、完善后台管理系统的审核列表的目的地展示

chenchen 4 сар өмнө
parent
commit
dcbf594e14

+ 4 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourismProjectTravelNotesWriteController.java

@@ -10,6 +10,7 @@ import com.tourism.common.core.upload.UploadStoreInfo;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.model.constant.AuditState;
 import com.tourism.webadmin.back.vo.*;
 import com.tourism.webadmin.back.dto.*;
 import com.tourism.webadmin.back.model.*;
@@ -121,6 +122,9 @@ public class TourismProjectTravelNotesWriteController {
         if (errorMessage != null) {
             return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
         }
+        if(tourismProjectTravelNotesWriteDto.getState().equals(AuditState.UNAUDITSTATE)){
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, "审核状态不能为未审核");
+        }
         TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite = MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto, TourismProjectTravelNotesWrite.class);
         TourismProjectTravelNotesWrite originalTourismProjectTravelNotesWrite = tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWrite.getId());
         if (originalTourismProjectTravelNotesWrite == null) {

+ 4 - 2
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourismProjectTravelNotesWrite.java

@@ -196,9 +196,11 @@ public class TourismProjectTravelNotesWrite extends BaseModel {
         this.searchString = MyCommonUtil.replaceSqlWildcard(searchString);
     }
 
-    @RelationConstDict(
+    @RelationDict(
             masterIdField = "endPlace",
-            constantDictClass = DirectoryInfo.class)
+            slaveModelClass = DirectoryInfo.class,
+            slaveIdField = "id",
+            slaveNameField = "menuName")
     @TableField(exist = false)
     private Map<String, Object> endPlaceDictMap;