Commit 43dfb2a4fc2a5108eb66fe21b4d8661f485d8406
1 parent
6f6f947d
Exists in
master
no message
Showing
1 changed file
with
33 additions
and
0 deletions
Show diff stats
springboot/src/main/java/com/sincre/springboot/controller/Yinshi/DeviceControl.java
0 → 100644
@@ -0,0 +1,33 @@ | @@ -0,0 +1,33 @@ | ||
1 | +package com.sincre.springboot.controller.Yinshi; | ||
2 | + | ||
3 | +import com.sincre.springboot.ApiPlatform.YinShiServiceConfig; | ||
4 | +import com.sincre.springboot.common.MD5; | ||
5 | +import com.sincre.springboot.utils.ApiHelper; | ||
6 | +import io.swagger.annotations.ApiOperation; | ||
7 | +import org.springframework.web.bind.annotation.GetMapping; | ||
8 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
9 | +import org.springframework.web.bind.annotation.RequestParam; | ||
10 | +import org.springframework.web.bind.annotation.RestController; | ||
11 | + | ||
12 | +import java.util.HashMap; | ||
13 | +import java.util.Map; | ||
14 | + | ||
15 | +@RestController | ||
16 | +@RequestMapping("/YinShiDevice") | ||
17 | +public class DeviceControl { | ||
18 | + | ||
19 | + | ||
20 | + @ApiOperation(value = "增加子账号") | ||
21 | + @GetMapping("/addDevice") | ||
22 | + public String addDevice(@RequestParam String deviceSerial, @RequestParam String validateCode) { | ||
23 | + | ||
24 | + String url = YinShiServiceConfig.HostUrl + "lapp/device/add"; | ||
25 | + Map<String, Object> map = new HashMap<>(); | ||
26 | + map.put("accessToken", YinShiServiceConfig.AccessToken); | ||
27 | + map.put("deviceSerial", deviceSerial); | ||
28 | + map.put("validateCode", validateCode); | ||
29 | + String result = ApiHelper.doPost(url, new HashMap<String, String>(), map); | ||
30 | + System.out.println("result:"+result); | ||
31 | + return result;//ResultUtils.getInstance().resturnResultYingshi(result); | ||
32 | + } | ||
33 | +} |