From a4047b6048ebfe09e66a765b58ea12b5bd0e2e6e Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期一, 28 十一月 2022 16:18:10 +0800 Subject: [PATCH] 店铺管理优化 --- ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 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 5470875..2657d6e 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 @@ -8,6 +8,7 @@ import com.ycl.controller.video.common.util.UtilNumber; import com.ycl.dto.store.UmsStoreInfoParam; import com.ycl.entity.store.StoreInfo; +import com.ycl.entity.store.StoreScore; import com.ycl.service.store.StoreInfoService; import com.ycl.service.video.impl.IVideoPointService; import com.ycl.vo.store.StoreInfoVO; @@ -48,6 +49,7 @@ @ApiOperation("鏍规嵁闂ㄥ簵鍚嶇О鍒嗛〉鑾峰彇闂ㄥ簵鍒楄〃鍒楄〃") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody + @LogSave(operationType = "闂ㄥ簵绠$悊", contain = "鏌ヨ闂ㄥ簵") public CommonResult<CommonPage<StoreInfoVO>> list(@RequestParam(value = "keyword", required = false) String keyword, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { @@ -58,6 +60,7 @@ @ApiOperation("鏍规嵁id鑾峰彇闂ㄥ簵淇℃伅") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody + @LogSave(operationType = "闂ㄥ簵绠$悊", contain = "鏌ヨ闂ㄥ簵") public CommonResult<StoreInfoVO> getItem(@PathVariable Long id) { StoreInfo storeInfo = storeInfoService.getById(id); StoreInfoVO vo = new StoreInfoVO(); @@ -73,16 +76,16 @@ public CommonResult<StoreInfo> add(@Validated @RequestBody UmsStoreInfoParam umsStoreInfoParam) { StoreInfo storeInfo = StoreInfo.builder() .owner(umsStoreInfoParam.getOwner()) - .storeName(umsStoreInfoParam.getStorename()) + .storeName(umsStoreInfoParam.getStoreName()) .contact(umsStoreInfoParam.getContact()) - .storeAddress(umsStoreInfoParam.getStoreaddr()) + .storeAddress(umsStoreInfoParam.getStoreAddress()) .storePhoto(umsStoreInfoParam.getStorephoto()) .idCardInfo(umsStoreInfoParam.getIdcardinfo()) .storeNumber(utilNumber.createShopCode()) - .storeScore(umsStoreInfoParam.getStorescore()) .type(umsStoreInfoParam.getType()) .description(umsStoreInfoParam.getDescription()) - .videoId(umsStoreInfoParam.getVideoId()) + .videoId(umsStoreInfoParam.getRelationVideo()) + .storeScore(100.0) .build(); boolean success = storeInfoService.save(storeInfo); if (success) { @@ -95,6 +98,7 @@ @ApiOperation(value = "鏍规嵁id鍒犻櫎闂ㄥ簵淇℃伅") @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) @ResponseBody + @LogSave(operationType = "闂ㄥ簵绠$悊", contain = "鍒犻櫎闂ㄥ簵") public CommonResult delete(@PathVariable Long id) { boolean success = storeInfoService.removeById(id); if (success) { @@ -107,6 +111,7 @@ @ApiOperation(value = "淇敼闂ㄥ簵淇℃伅") @RequestMapping(value = "/update", method = RequestMethod.PUT) @ResponseBody + @LogSave(operationType = "闂ㄥ簵绠$悊", contain = "淇敼闂ㄥ簵") public CommonResult update(@RequestBody StoreInfo storeInfo) { boolean success = storeInfoService.updateById(storeInfo); if (success) { @@ -119,6 +124,7 @@ @ApiOperation(value = "鏍规嵁excel妯℃澘鎵归噺瀵煎叆闂ㄥ簵淇℃伅") @RequestMapping(value = "/add/excel", method = RequestMethod.POST) @ResponseBody + @LogSave(operationType = "闂ㄥ簵绠$悊", contain = "瀵煎叆闂ㄥ簵") public CommonResult addByExcel(MultipartFile file) { boolean success = storeInfoService.addByExcel(file); if (success) { @@ -127,5 +133,16 @@ return CommonResult.failed(); } } + + @ApiOperation("鏍规嵁id鑾峰彇闂ㄥ簵绉垎璇︽儏") + @RequestMapping(value = "/{id}/storeScore", method = RequestMethod.GET) + @ResponseBody + @LogSave(operationType = "闂ㄥ簵绉垎璇︽儏", contain = "闂ㄥ簵绉垎璇︽儏") + public CommonResult<Page<StoreScore>> getScoreList(@PathVariable Long id, + @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, + @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { + Page<StoreScore> page = storeInfoService.getScoreList(id, pageSize, pageNum); + return CommonResult.success(page); + } } -- Gitblit v1.8.0