|
@@ -10,6 +10,8 @@ import com.huiju.estateagents.common.SMSUtils;
|
10
|
10
|
import com.huiju.estateagents.common.StringUtils;
|
11
|
11
|
import com.huiju.estateagents.service.IMiniAppService;
|
12
|
12
|
import com.huiju.estateagents.service.ITdMiniappTemplateTypeService;
|
|
13
|
+import io.swagger.annotations.Api;
|
|
14
|
+import io.swagger.annotations.ApiOperation;
|
13
|
15
|
import org.apache.ibatis.annotations.Mapper;
|
14
|
16
|
import org.springframework.beans.factory.annotation.Autowired;
|
15
|
17
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -24,6 +26,7 @@ import java.util.Map;
|
24
|
26
|
|
25
|
27
|
@RestController
|
26
|
28
|
@RequestMapping("/api")
|
|
29
|
+@Api(value = "公共接口", tags = "公共接口")
|
27
|
30
|
public class CommonController extends BaseController {
|
28
|
31
|
@Autowired
|
29
|
32
|
SMSUtils smsUtils;
|
|
@@ -39,6 +42,7 @@ public class CommonController extends BaseController {
|
39
|
42
|
* @param multipartFile
|
40
|
43
|
* @return
|
41
|
44
|
*/
|
|
45
|
+ @ApiOperation(value = "图片上传", notes = "图片上传")
|
42
|
46
|
@PostMapping("/{plat}/image")
|
43
|
47
|
public ResponseBean uploadImage(@RequestParam("file") MultipartFile multipartFile) {
|
44
|
48
|
try {
|
|
@@ -112,6 +116,7 @@ public class CommonController extends BaseController {
|
112
|
116
|
return result;
|
113
|
117
|
}
|
114
|
118
|
|
|
119
|
+ @ApiOperation(value = "发送验证码", notes = "发送验证码")
|
115
|
120
|
@PostMapping("{plat}/captcha")
|
116
|
121
|
public ResponseBean sendCaptcha(@RequestParam String tel) {
|
117
|
122
|
boolean success = smsUtils.sendCaptcha(tel);
|
|
@@ -122,6 +127,7 @@ public class CommonController extends BaseController {
|
122
|
127
|
}
|
123
|
128
|
}
|
124
|
129
|
|
|
130
|
+ @ApiOperation(value = "校验验证码", notes = "校验验证码")
|
125
|
131
|
@PostMapping("{plat}/check/captcha")
|
126
|
132
|
public ResponseBean sendCaptcha(@RequestParam String tel,@RequestParam String captcha) {
|
127
|
133
|
boolean success = smsUtils.checkCaptcha(tel,captcha);
|