|
@@ -16,6 +16,7 @@ import com.fdkk.sxz.base.Result;
|
|
import com.fdkk.sxz.constant.CodeConstant;
|
|
import com.fdkk.sxz.constant.CodeConstant;
|
|
import com.fdkk.sxz.entity.SceneEntity;
|
|
import com.fdkk.sxz.entity.SceneEntity;
|
|
import com.fdkk.sxz.entity.SceneLightEntity;
|
|
import com.fdkk.sxz.entity.SceneLightEntity;
|
|
|
|
+import com.fdkk.sxz.entity.SceneLightStyleEntity;
|
|
import com.fdkk.sxz.entity.SceneStyleEntity;
|
|
import com.fdkk.sxz.entity.SceneStyleEntity;
|
|
import com.fdkk.sxz.other.mq.TopicRabbitConfig;
|
|
import com.fdkk.sxz.other.mq.TopicRabbitConfig;
|
|
import com.fdkk.sxz.util.*;
|
|
import com.fdkk.sxz.util.*;
|
|
@@ -70,6 +71,8 @@ public class ImportDataController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private IStatisticsService statisticsService;
|
|
private IStatisticsService statisticsService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISceneLightStyleService sceneLightStyleService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
RabbitTemplate rabbitTemplate; //使用RabbitTemplate,这提供了接收/发送等等方
|
|
RabbitTemplate rabbitTemplate; //使用RabbitTemplate,这提供了接收/发送等等方
|
|
@@ -324,13 +327,14 @@ public class ImportDataController extends BaseController {
|
|
@ApiImplicitParam(name = "buildType", value = "渲染类型,all(全屋),light(灯光预览),pano(全景图)", dataType = "String"),
|
|
@ApiImplicitParam(name = "buildType", value = "渲染类型,all(全屋),light(灯光预览),pano(全景图)", dataType = "String"),
|
|
@ApiImplicitParam(name = "isShow", value = "灯光预览是否显示在相册,0不显示,1显示", dataType = "String"),
|
|
@ApiImplicitParam(name = "isShow", value = "灯光预览是否显示在相册,0不显示,1显示", dataType = "String"),
|
|
@ApiImplicitParam(name = "quality", value = "0或1", dataType = "String"),
|
|
@ApiImplicitParam(name = "quality", value = "0或1", dataType = "String"),
|
|
- @ApiImplicitParam(name = "styleNum", value = "风格码", dataType = "String")})
|
|
|
|
|
|
+ @ApiImplicitParam(name = "styleNum", value = "风格码", dataType = "String"),
|
|
|
|
+ @ApiImplicitParam(name = "lightStyleId", value = "自定义灯光方案ID,非自定义传0", dataType = "number")})
|
|
@RequestMapping(value = "/buildChangeScene", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/buildChangeScene", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "渲染场景")
|
|
@AroundLog(name = "渲染场景")
|
|
public Result buildChangeScene(String sceneNum, String styleNum, String type,
|
|
public Result buildChangeScene(String sceneNum, String styleNum, String type,
|
|
String dateType, String buildType, String ratio,
|
|
String dateType, String buildType, String ratio,
|
|
- String isShow, String quality) {
|
|
|
|
|
|
+ String isShow, String quality, Long lightStyleId) {
|
|
try {
|
|
try {
|
|
if (StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(styleNum)) {
|
|
if (StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(styleNum)) {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
@@ -435,7 +439,16 @@ public class ImportDataController extends BaseController {
|
|
} else {
|
|
} else {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_4003, CodeConstant.FAILURE_MSG_4003);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_4003, CodeConstant.FAILURE_MSG_4003);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (ObjectUtil.isNotNull(lightStyleId) && lightStyleId > 0) {
|
|
|
|
+ SceneLightStyleEntity sceneLightStyle = sceneLightStyleService.findById(lightStyleId);
|
|
|
|
+ if (ObjectUtil.isNotNull(sceneLightStyle)) {
|
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
|
+ jsonObject.put("obj", JSON.parseObject(sceneLightStyle.getProLightJson()));
|
|
|
|
+ String result = HttpRequest.post(buildUrl + "getLightInfo")
|
|
|
|
+ .body(jsonObject.toString())
|
|
|
|
+ .execute().body();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
rabbitTemplate.convertAndSend(TopicRabbitConfig.TOPICE, TopicRabbitConfig.LIGHT,
|
|
rabbitTemplate.convertAndSend(TopicRabbitConfig.TOPICE, TopicRabbitConfig.LIGHT,
|
|
styleNum + ":;" + sceneNum + ":;" + type + ":;" + dateType + ":;" +
|
|
styleNum + ":;" + sceneNum + ":;" + type + ":;" + dateType + ":;" +
|
|
ratio + ":;" + sceneLightEntity.getId().longValue() + ":;" +
|
|
ratio + ":;" + sceneLightEntity.getId().longValue() + ":;" +
|