From f22c4b9230808fed4fec80c435eccb4c833349a0 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期五, 21 十月 2022 18:36:38 +0800
Subject: [PATCH] 2022.10.21 1.环境守法小程序后台功能首发版本完成

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/WxUserController.kt |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/WxUserController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/WxUserController.kt
index 9dc1b94..b196366 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/WxUserController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/WxUserController.kt
@@ -1,14 +1,12 @@
 package cn.flightfeather.supervision.lightshare.web
 
 import cn.flightfeather.supervision.lightshare.service.WxUserService
+import cn.flightfeather.supervision.lightshare.vo.AccessTokenPW
 import cn.flightfeather.supervision.lightshare.vo.AccessTokenWX
 import io.swagger.annotations.Api
 import io.swagger.annotations.ApiOperation
 import io.swagger.annotations.ApiParam
-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
+import org.springframework.web.bind.annotation.*
 
 @Api(tags = ["寰俊鐢ㄦ埛淇℃伅API鎺ュ彛"])
 @RestController
@@ -20,4 +18,26 @@
     fun loginWx(
         @ApiParam("鐧诲綍淇℃伅") @RequestBody accessTokenWX: AccessTokenWX
     ) = wxUserService.loginWx(accessTokenWX)
+
+
+    @ApiOperation(value = "鐧诲綍")
+    @PostMapping("/loginPW")
+    fun loginPW(
+            @ApiParam("鐧诲綍淇℃伅") @RequestBody accessTokenPW: AccessTokenPW
+    ) = wxUserService.loginPw(accessTokenPW)
+
+    @ApiOperation(value = "寰俊鎺ュ叆楠岃瘉")
+    @GetMapping("/message/subscribe/result")
+    fun subscribeCheck(
+        @ApiParam("寰俊鍔犲瘑绛惧悕") @RequestParam signature: String,
+        @ApiParam("鏃堕棿鎴�") @RequestParam timestamp: String,
+        @ApiParam("闅忔満鏁�") @RequestParam nonce: String,
+        @ApiParam("闅忔満瀛楃涓�") @RequestParam echostr: String,
+    ) = wxUserService.subscribeCheck(signature, timestamp, nonce, echostr)
+
+    @ApiOperation(value = "寰俊鐢ㄦ埛璁㈤槄娑堟伅缁撴灉鎺ㄩ��", notes = "寰俊浼氬皢鐢ㄦ埛璁㈤槄娑堟伅銆佹秷鎭帹閫佹儏鍐电瓑淇℃伅閫氳繃姝ゆ帴鍙e彂閫佽繃鏉�")
+    @PostMapping("/message/subscribe/result")
+    fun subscribeResult(
+        @ApiParam("娑堟伅") @RequestBody msg: String
+    ) = wxUserService.subscribeResult(msg)
 }
\ No newline at end of file

--
Gitblit v1.9.3