|
@@ -1,7 +1,9 @@
|
|
|
package com.fdkankan.scene.controller;
|
|
|
|
|
|
+import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.constant.SceneInfoReqType;
|
|
|
import com.fdkankan.common.controller.BaseController;
|
|
|
+import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.scene.service.ISceneEditInfoService;
|
|
|
import com.fdkankan.scene.service.ISceneEditService;
|
|
|
import com.fdkankan.scene.service.ISceneProService;
|
|
@@ -11,6 +13,7 @@ import com.fdkankan.common.response.ResultData;
|
|
|
import java.util.List;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -31,6 +34,8 @@ public class SceneEditController extends BaseController {
|
|
|
private ISceneUploadService sceneUploadService;
|
|
|
@Autowired
|
|
|
private ISceneEditService sceneEditService;
|
|
|
+ @Value("${spring.profiles.active}")
|
|
|
+ private String env;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -855,6 +860,9 @@ public class SceneEditController extends BaseController {
|
|
|
**/
|
|
|
@PostMapping(value = "/locales")
|
|
|
public ResultData locales(@RequestBody @Validated LocalesParamVO param) throws Exception {
|
|
|
+ if("pro".equals(env)){
|
|
|
+ throw new BusinessException(ErrorCode.HAVE_NO_RIGHT);
|
|
|
+ }
|
|
|
return sceneEditService.locales(param);
|
|
|
}
|
|
|
|