Procházet zdrojové kódy

fix(代理投票): 添加至控制器.

eric před 2 roky
rodič
revize
edaf2dc90a

+ 13 - 0
src/main/java/com/finikes/oc/vote/controller/VoteController.java

@@ -121,6 +121,19 @@ public class VoteController {
         return ApiResponse.successful();
     }
 
+    /**
+     * 代理投票
+     *
+     * @param dto 代理投票数据传输对象
+     * @return 接口返回对象
+     */
+    @PutMapping("choise/delegation")
+    public ApiResponse<Void> choiceDelegation(@RequestBody @Valid ChoiceDelegationDto dto) {
+        voteService.madeChoiceDelegation(dto);
+        return ApiResponse.successful();
+    }
+
+
     /**
      * 异常处理器
      *

+ 5 - 0
src/main/java/com/finikes/oc/vote/service/VoteService.java

@@ -62,6 +62,11 @@ public interface VoteService {
      */
     void madeChoice(ChoiceDto dto);
 
+    /**
+     * 代理投票
+     *
+     * @param dto 代理投票数据传输对象
+     */
     void madeChoiceDelegation(ChoiceDelegationDto dto);
 
 }