From 026a027ed188978c342cda2f754c69d323d658f1 Mon Sep 17 00:00:00 2001 From: liuyuanqiang <837052308@qq.com> Date: Fri, 21 Oct 2022 16:22:48 +0800 Subject: [PATCH] add NumberCodeController --- .../controller/NumberCodeController.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 service-verificationcode/src/main/java/com/mashibing/service/controller/NumberCodeController.java diff --git a/service-verificationcode/src/main/java/com/mashibing/service/controller/NumberCodeController.java b/service-verificationcode/src/main/java/com/mashibing/service/controller/NumberCodeController.java new file mode 100644 index 0000000..4cd0e88 --- /dev/null +++ b/service-verificationcode/src/main/java/com/mashibing/service/controller/NumberCodeController.java @@ -0,0 +1,21 @@ +package com.mashibing.service.controller; + +import net.sf.json.JSONObject; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class NumberCodeController { + @GetMapping("/numberCode/{size}") + public String getNumberCode(@PathVariable("size") int size){ + System.out.println("size:" + size); + JSONObject result = new JSONObject(); + result.put("code",1); + result.put("message","success"); + JSONObject data = new JSONObject(); + data.put("numberCode",123456); + result.put("data",data); + return result.toString(); + } +}