|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.gis.common.constant.CmdConstant;
|
|
import com.gis.common.constant.CmdConstant;
|
|
import com.gis.common.constant.ConfigConstant;
|
|
import com.gis.common.constant.ConfigConstant;
|
|
|
|
+import com.gis.common.constant.MsgCode;
|
|
import com.gis.common.constant.RabbitConfig;
|
|
import com.gis.common.constant.RabbitConfig;
|
|
import com.gis.common.exception.BaseRuntimeException;
|
|
import com.gis.common.exception.BaseRuntimeException;
|
|
import com.gis.common.task.AsyncTask;
|
|
import com.gis.common.task.AsyncTask;
|
|
@@ -689,21 +690,24 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
@NotBlank(message = "恒大id不能为空") String hengdaId = param.getHengdaId();
|
|
@NotBlank(message = "恒大id不能为空") String hengdaId = param.getHengdaId();
|
|
String webSite = "/hengda.html?m="+ sceneCode + "&prodId=" + hengdaId + "&houseId=" + houseId;
|
|
String webSite = "/hengda.html?m="+ sceneCode + "&prodId=" + hengdaId + "&houseId=" + houseId;
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
if ( id == null) {
|
|
if ( id == null) {
|
|
- entity = entityMapper.findByVrModelIdAndHouseId(param.getVrModelId(), houseId);
|
|
|
|
- if (entity != null){
|
|
|
|
- log.error("VrModelId已存在");
|
|
|
|
- return Result.failure(3001, "场景码已存在, 不能重复添加");
|
|
|
|
- }
|
|
|
|
|
|
|
|
// 一个VR项目不能有相同的户型
|
|
// 一个VR项目不能有相同的户型
|
|
List<SceneEntity> sceneEntities = entityMapper.findByHouseIdAndRoomId(houseId, roomId);
|
|
List<SceneEntity> sceneEntities = entityMapper.findByHouseIdAndRoomId(houseId, roomId);
|
|
if (sceneEntities.size() > 0) {
|
|
if (sceneEntities.size() > 0) {
|
|
- return Result.failure("户型已存在,不能重复添加");
|
|
|
|
|
|
+ return Result.failure(MsgCode.e3002,"户型已存在,不能重复添加");
|
|
}
|
|
}
|
|
|
|
|
|
- entity = new SceneEntity();
|
|
|
|
|
|
+ // 一个VR项目不能有相同的模型
|
|
|
|
+ entity = entityMapper.findByVrModelIdAndHouseId(param.getVrModelId(), houseId);
|
|
|
|
+ if (entity != null){
|
|
|
|
+ log.error("VrModelId已存在");
|
|
|
|
+ return Result.failure(MsgCode.e3001, "场景码已存在, 不能重复添加");
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ entity = new SceneEntity();
|
|
|
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
|
|