From 68b182ab510ef8d323ab8cb5f5ebc8bd108d19ca Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 29 八月 2024 13:52:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master-v2' into master-v2
---
src/main/java/com/mzl/flower/web/point/CustomerPointDetailController.java | 62 +++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/mzl/flower/web/point/CustomerPointDetailController.java b/src/main/java/com/mzl/flower/web/point/CustomerPointDetailController.java
new file mode 100644
index 0000000..73bcba0
--- /dev/null
+++ b/src/main/java/com/mzl/flower/web/point/CustomerPointDetailController.java
@@ -0,0 +1,62 @@
+package com.mzl.flower.web.point;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mzl.flower.base.BaseController;
+import com.mzl.flower.base.R;
+import com.mzl.flower.base.ReturnDataDTO;
+import com.mzl.flower.dto.request.point.CustomerPointDetailDTO;
+import com.mzl.flower.dto.request.point.CustomerPointDetailQueryDTO;
+import com.mzl.flower.dto.response.point.CustomerPointDetailVO;
+import com.mzl.flower.service.point.CustomerPointDetailService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.constraints.NotNull;
+
+@RestController
+@RequestMapping("/api/customer")
+@Api(value = "用户积分记录", tags = "用户积分记录")
+@Validated
+@Slf4j
+@RequiredArgsConstructor
+public class CustomerPointDetailController extends BaseController {
+
+ private final CustomerPointDetailService customerPointDetailService;
+
+
+ @PostMapping("/point/save")
+ @ApiOperation(value = "新增", notes = "新增")
+ public ResponseEntity<ReturnDataDTO> save(@Validated @RequestBody CustomerPointDetailDTO customerPointDetailDTO) {
+ customerPointDetailService.save(customerPointDetailDTO);
+ return returnData(R.SUCCESS.getCode(), null);
+ }
+
+ @PostMapping("/point/update")
+ @ApiOperation(value = "修改", notes = "修改")
+ public ResponseEntity<ReturnDataDTO> update(@Validated @RequestBody CustomerPointDetailDTO customerPointDetailDTO) {
+ customerPointDetailService.update(customerPointDetailDTO);
+ return returnData(R.SUCCESS.getCode(), null);
+ }
+
+
+ @GetMapping("/point/delete")
+ @ApiOperation(value = "删除", notes = "删除")
+ public ResponseEntity<ReturnDataDTO> delete(@NotNull(message = "id不能为空") Long id) {
+ customerPointDetailService.delete(id);
+ return returnData(R.SUCCESS.getCode(), null);
+ }
+
+
+ @GetMapping("/point/page")
+ @ApiOperation(value = "查询-分页", notes = "查询-分页")
+ public ResponseEntity<ReturnDataDTO<Page<CustomerPointDetailVO>>> queryPage(CustomerPointDetailQueryDTO dto, Page page) {
+ return returnData(R.SUCCESS.getCode(), customerPointDetailService.queryPage(dto, page));
+ }
+
+
+}
--
Gitblit v1.9.3