| | |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonPage; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.video.common.util.UtilNumber; |
| | | import com.ycl.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; |
| | |
| | | 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) |
| | | .status(umsStoreInfoParam.getStatus()) |
| | | .build(); |
| | | boolean success = storeInfoService.save(storeInfo); |
| | | if (success) { |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |