|
@@ -5,17 +5,22 @@ import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.platform.annotation.CanUserUpdateRecord;
|
|
import com.platform.annotation.CanUserUpdateRecord;
|
|
-import com.platform.entity.*;
|
|
|
|
|
|
+import com.platform.entity.BrandEntity;
|
|
|
|
+import com.platform.entity.GoodsEntity;
|
|
|
|
+import com.platform.entity.Result;
|
|
|
|
+import com.platform.entity.SysUserEntity;
|
|
import com.platform.service.BrandService;
|
|
import com.platform.service.BrandService;
|
|
import com.platform.service.GoodsService;
|
|
import com.platform.service.GoodsService;
|
|
-import com.platform.service.SceneService;
|
|
|
|
import com.platform.service.SysUserService;
|
|
import com.platform.service.SysUserService;
|
|
import com.platform.service.custom.MySysUserBrandService;
|
|
import com.platform.service.custom.MySysUserBrandService;
|
|
import com.platform.service.custom.TmBrandTypeService;
|
|
import com.platform.service.custom.TmBrandTypeService;
|
|
|
|
+import com.platform.service.impl.ZhiHouseService;
|
|
import com.platform.utils.*;
|
|
import com.platform.utils.*;
|
|
import com.platform.vo.BrandBindUserVo;
|
|
import com.platform.vo.BrandBindUserVo;
|
|
import com.platform.vo.BrandRspVo;
|
|
import com.platform.vo.BrandRspVo;
|
|
-import io.swagger.annotations.*;
|
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -49,7 +54,7 @@ public class BrandController extends AbstractController{
|
|
private BrandService brandService;
|
|
private BrandService brandService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private SceneService sceneService;
|
|
|
|
|
|
+ private ZhiHouseService zhiHouseService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private GoodsService goodsService;
|
|
private GoodsService goodsService;
|
|
@@ -137,9 +142,9 @@ public class BrandController extends AbstractController{
|
|
if (!CollectionUtils.isEmpty(nameList)) {
|
|
if (!CollectionUtils.isEmpty(nameList)) {
|
|
brandRspVo.setBindShowerNameList(nameList.stream().collect(Collectors.joining(";")));
|
|
brandRspVo.setBindShowerNameList(nameList.stream().collect(Collectors.joining(";")));
|
|
}
|
|
}
|
|
- SceneEntity scene = sceneService.queryByScene(brandEntity.getSceneNum());
|
|
|
|
- brandRspVo.setSceneName(scene.getName());
|
|
|
|
- brandRspVo.setSceneUrl(scene.getSceneUrl());
|
|
|
|
|
|
+ JSONObject jsonObject = zhiHouseService.queryBySceneNum(brandEntity.getSceneNum());
|
|
|
|
+ brandRspVo.setSceneName(jsonObject.getString("sceneName"));
|
|
|
|
+ brandRspVo.setSceneUrl(jsonObject.getString("webSite"));
|
|
return brandRspVo;
|
|
return brandRspVo;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
return Result.success(PageUtilsPlus.page(rspBrandList,resultPage));
|
|
return Result.success(PageUtilsPlus.page(rspBrandList,resultPage));
|
|
@@ -157,9 +162,9 @@ public class BrandController extends AbstractController{
|
|
BrandEntity brand = brandService.queryObject(brandEntity.getId().intValue());
|
|
BrandEntity brand = brandService.queryObject(brandEntity.getId().intValue());
|
|
BrandRspVo brandRspVo = new BrandRspVo();
|
|
BrandRspVo brandRspVo = new BrandRspVo();
|
|
BeanUtils.copyProperties(brand,brandRspVo);
|
|
BeanUtils.copyProperties(brand,brandRspVo);
|
|
- SceneEntity scene = sceneService.queryByScene(brand.getSceneNum());
|
|
|
|
- brandRspVo.setSceneUrl(scene.getSceneUrl());
|
|
|
|
- brandRspVo.setSceneName(scene.getName());
|
|
|
|
|
|
+ JSONObject jsonObject = zhiHouseService.queryBySceneNum(brand.getSceneNum());
|
|
|
|
+ brandRspVo.setSceneUrl(jsonObject.getString("webSite"));
|
|
|
|
+ brandRspVo.setSceneName(jsonObject.getString("sceneName"));
|
|
return Result.success( brandRspVo);
|
|
return Result.success( brandRspVo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -176,8 +181,8 @@ public class BrandController extends AbstractController{
|
|
if(ObjectUtils.isEmpty(params.getSceneNum())){
|
|
if(ObjectUtils.isEmpty(params.getSceneNum())){
|
|
return Result.failure("场景码为空!");
|
|
return Result.failure("场景码为空!");
|
|
}
|
|
}
|
|
- SceneEntity scene = sceneService.queryByScene(params.getSceneNum());
|
|
|
|
- if(ObjectUtils.isEmpty(scene)){
|
|
|
|
|
|
+ JSONObject jsonObject = zhiHouseService.queryBySceneNum(params.getSceneNum());
|
|
|
|
+ if(ObjectUtils.isEmpty(jsonObject)){
|
|
return Result.failure("场景码错误!");
|
|
return Result.failure("场景码错误!");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -200,7 +205,7 @@ public class BrandController extends AbstractController{
|
|
brand.setType(0);
|
|
brand.setType(0);
|
|
}
|
|
}
|
|
// 生成直播间地址
|
|
// 生成直播间地址
|
|
- String liveRoomUrl = scene.getSceneUrl().replaceAll("smobile.html", "shop.html");
|
|
|
|
|
|
+ String liveRoomUrl = jsonObject.getString("webSite").replaceAll("smobile.html", "shop.html");
|
|
brand.setLiveRoomUrl(liveRoomUrl);
|
|
brand.setLiveRoomUrl(liveRoomUrl);
|
|
|
|
|
|
brandService.save(brand,true);
|
|
brandService.save(brand,true);
|
|
@@ -243,12 +248,12 @@ public class BrandController extends AbstractController{
|
|
//场景码有变更 将新场景的分享二维码更新
|
|
//场景码有变更 将新场景的分享二维码更新
|
|
String wxShareQrCodeUrl = brandService.generalWxShareQrCode(brand, false);
|
|
String wxShareQrCodeUrl = brandService.generalWxShareQrCode(brand, false);
|
|
brand.setShareWxQrCode(wxShareQrCodeUrl);
|
|
brand.setShareWxQrCode(wxShareQrCodeUrl);
|
|
- SceneEntity scene = sceneService.queryByScene(brand.getSceneNum());
|
|
|
|
- if(ObjectUtils.isEmpty(scene)){
|
|
|
|
|
|
+ JSONObject jsonObject = zhiHouseService.queryBySceneNum(brand.getSceneNum());
|
|
|
|
+ if(ObjectUtils.isEmpty(jsonObject)){
|
|
return Result.failure("场景码错误!");
|
|
return Result.failure("场景码错误!");
|
|
}
|
|
}
|
|
// 生成直播间地址
|
|
// 生成直播间地址
|
|
- String liveRoomUrl = scene.getSceneUrl().replaceAll("smobile.html", "shop.html");
|
|
|
|
|
|
+ String liveRoomUrl = jsonObject.getString("webSite").replaceAll("smobile.html", "shop.html");
|
|
brand.setLiveRoomUrl(liveRoomUrl);
|
|
brand.setLiveRoomUrl(liveRoomUrl);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -345,8 +350,8 @@ public class BrandController extends AbstractController{
|
|
}
|
|
}
|
|
sceneNum = brand.getSceneNum();
|
|
sceneNum = brand.getSceneNum();
|
|
|
|
|
|
- SceneEntity sceneEntity = sceneService.queryByScene(sceneNum);
|
|
|
|
- sceneName = sceneEntity.getName();
|
|
|
|
|
|
+ JSONObject sceneEntity = zhiHouseService.queryBySceneNum(sceneNum);
|
|
|
|
+ sceneName = sceneEntity.getString("sceneName");
|
|
|
|
|
|
getResult = util.doGet(sceneData + "data/data" + sceneNum + "/hot.json");
|
|
getResult = util.doGet(sceneData + "data/data" + sceneNum + "/hot.json");
|
|
if(StringUtils.isEmpty(getResult)){
|
|
if(StringUtils.isEmpty(getResult)){
|