From 029af9c4503d6838bddd55a6ecd6b73705ca1522 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期二, 26 十一月 2024 17:08:00 +0800
Subject: [PATCH] 1.完善接口的定义 2.完成部分接口的开发 3.集成基于Redisson的分布式锁

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
index 6aa2f8b..a651153 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
@@ -7,15 +7,13 @@
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.other.api.domain.TechnicianSubscribe;
+import com.ruoyi.other.distributedservice.DistributedTechnicianService;
 import com.ruoyi.other.service.TechnicianSubscribeService;
 import com.ruoyi.other.vo.TechnicianSubscribeVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.util.List;
@@ -34,6 +32,8 @@
 public class TechnicianSubscribeController extends BaseController {
     @Resource
     private TechnicianSubscribeService technicianSubscribeService;
+    @Resource
+    private DistributedTechnicianService distributedTechnicianService;
 
     /**
      * 预约列表
@@ -49,6 +49,16 @@
     }
 
     /**
+     * 预约技师
+     */
+    @PostMapping("/subscribe")
+    @ApiOperation(value = "预约技师", notes = "预约技师", tags = {"小程序-个人中心-门店管理-预约列表-预约技师"})
+    public R<Void> subscribe(@RequestBody TechnicianSubscribe technicianSubscribe){
+        distributedTechnicianService.subscribe(technicianSubscribe,technicianSubscribe.getTechnicianId());
+        return R.ok();
+    }
+
+    /**
      * 取消服务
      */
     @GetMapping("/cancel")

--
Gitblit v1.7.1