|
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.keao.edu.common.controller.BaseController;
|
|
|
import com.keao.edu.common.page.QueryInfo;
|
|
|
+import com.keao.edu.common.service.IdGeneratorService;
|
|
|
import com.keao.edu.user.entity.TenantApply;
|
|
|
import com.keao.edu.user.service.TenantApplyService;
|
|
|
|
|
@@ -27,6 +28,9 @@ public class TenantApplyController extends BaseController {
|
|
|
@Autowired
|
|
|
private TenantApplyService tenantApplyService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IdGeneratorService smsCodeService;
|
|
|
+
|
|
|
@ApiOperation("分页查询")
|
|
|
@GetMapping(value = "/list")
|
|
|
@PreAuthorize("@pcs.hasPermissions('tenantApply/list')")
|
|
@@ -45,6 +49,12 @@ public class TenantApplyController extends BaseController {
|
|
|
@ApiOperation("新增")
|
|
|
@PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
public Object add(TenantApply tenantApply) {
|
|
|
+
|
|
|
+ boolean b = smsCodeService.verifyValidCode(tenantApply.getMobileNo(), tenantApply.getSmsCode());
|
|
|
+ if (!b) {
|
|
|
+ return failed("验证码不正确");
|
|
|
+ }
|
|
|
+
|
|
|
tenantApply.setCreateTime(new Date());
|
|
|
tenantApplyService.insert(tenantApply);
|
|
|
return succeed();
|