Przeglądaj źródła

feat(mini): 添加小程序客户注册功能

- 新增 MiniCustomerRegisterController 控制器
- 实现验证密码与验证码接口 /validate
- 实现小程序客户注册接口 /registerMiniCustomer
hurx 18 godzin temu
rodzic
commit
d87d74c176

+ 46 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/mini/MiniCustomerRegisterController.java

@@ -0,0 +1,46 @@
+package org.dromara.customer.controller.mini;
+
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.customer.domain.bo.CustomerRegisterBo;
+import org.dromara.customer.service.ICustomerInfoService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * mini端  客户注册
+ *
+ * @author
+ * @date 2026/04/20 下午15:58
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/miniCustomer")
+public class MiniCustomerRegisterController {
+
+
+    private final ICustomerInfoService customerInfoService;
+
+    /**
+     * 验证密码与验证码
+     */
+    @PostMapping("/validate")
+    public R<Void> verifyCodeAndPassword(@RequestBody CustomerRegisterBo bo) {
+        customerInfoService.verifyCodeAndPassword(bo);
+        return R.ok();
+    }
+
+    /**
+     * mini端 客户注册
+     */
+    @PostMapping("/registerMiniCustomer")
+    public R<Void> register(@RequestBody CustomerRegisterBo bo) {
+        customerInfoService.register(bo);
+        return R.ok();
+    }
+
+}