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(); + } +}