From 7182dbfb374bef1f78d0698117e97137429f96cc Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期三, 09 十一月 2022 11:21:11 +0800 Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server --- ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java b/ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java index 1ffd7d9..e52aff9 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java @@ -6,12 +6,15 @@ import com.ycl.api.CommonPage; import com.ycl.api.CommonResult; import com.ycl.common.util.UtilNumber; -import com.ycl.dto.UmsStoreInfoParam; +import com.ycl.dto.store.UmsStoreInfoParam; import com.ycl.entity.store.StoreInfo; +import com.ycl.entity.video.VideoPoint; import com.ycl.service.store.StoreInfoService; +import com.ycl.service.video.impl.IVideoPointService; import com.ycl.vo.store.StoreInfoVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -35,6 +38,10 @@ UtilNumber utilNumber; @Autowired + private IVideoPointService videoPointService; + + + @Autowired public void setUmsStoreInfoService(StoreInfoService umsStoreInfoService) { this.storeInfoService = umsStoreInfoService; } @@ -54,13 +61,16 @@ @ResponseBody public CommonResult<StoreInfo> getItem(@PathVariable Long id) { StoreInfo storeInfo = storeInfoService.getById(id); + StoreInfoVO vo = new StoreInfoVO(); + BeanUtils.copyProperties(storeInfo, vo); + vo.setVideoPoint(videoPointService.getById(storeInfo.getVideoId())); return CommonResult.success(storeInfo); } @ApiOperation(value = "娣诲姞闂ㄥ簵淇℃伅") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody - @LogSave(operationType = "闂ㄥ簵绠$悊",contain = "娣诲姞闂ㄥ簵") + @LogSave(operationType = "闂ㄥ簵绠$悊", contain = "娣诲姞闂ㄥ簵") public CommonResult<StoreInfo> add(@Validated @RequestBody UmsStoreInfoParam umsStoreInfoParam) { StoreInfo storeInfo = StoreInfo.builder() .owner(umsStoreInfoParam.getOwner()) @@ -73,6 +83,7 @@ .storeScore(umsStoreInfoParam.getStorescore()) .type(umsStoreInfoParam.getType()) .description(umsStoreInfoParam.getDescription()) + .videoId(umsStoreInfoParam.getVideoId()) .build(); boolean success = storeInfoService.save(storeInfo); if (success) { -- Gitblit v1.8.0