| | |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonPage; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.common.util.UtilNumber; |
| | | import com.ycl.controller.video.common.util.UtilNumber; |
| | | 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; |
| | |
| | | @ApiOperation("根据id获取门店信息") |
| | | @RequestMapping(value = "/{id}", method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public CommonResult<StoreInfo> getItem(@PathVariable Long id) { |
| | | public CommonResult<StoreInfoVO> getItem(@PathVariable Long id) { |
| | | StoreInfo storeInfo = storeInfoService.getById(id); |
| | | StoreInfoVO vo = new StoreInfoVO(); |
| | | BeanUtils.copyProperties(storeInfo,vo); |
| | | BeanUtils.copyProperties(storeInfo, vo); |
| | | vo.setVideoPoint(videoPointService.getById(storeInfo.getVideoId())); |
| | | return CommonResult.success(storeInfo); |
| | | return CommonResult.success(vo); |
| | | } |
| | | |
| | | @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()) |