Просмотр исходного кода

[手机号验证][新增]:c端手机号验证

release_toaliyun_real
Stormeye.Wu 7 лет назад
Родитель
Сommit
0b04d81434
1 измененных файлов: 11 добавлений и 13 удалений
  1. +11
    -13
      mallinkCApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java

+ 11
- 13
mallinkCApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java Просмотреть файл

@@ -1,6 +1,7 @@
package com.simple.controller; package com.simple.controller;


import com.simple.common.ResultData; import com.simple.common.ResultData;
import com.simple.domain.po.WxCUser;
import com.simple.domain.po.WxMsgValidationcode; import com.simple.domain.po.WxMsgValidationcode;
import com.simple.service.WxMerchantBUserService; import com.simple.service.WxMerchantBUserService;
import com.simple.service.WxMerchantService; import com.simple.service.WxMerchantService;
@@ -33,34 +34,31 @@ public class WxMsgValidationcodeController extends BaseController {


@GetMapping("sendvalidationcode") @GetMapping("sendvalidationcode")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true),
@ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", paramType = "query", required = true),
@ApiImplicitParam(name = "appid", value = "appid", dataType = "String", paramType = "query", required = true)})
public ResultData sendvalidationcode(String tenantId, String phone, Integer type, String appid) {

@ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", paramType = "query", required = true)})
public ResultData sendvalidationcode(String phone, Integer type) {
WxCUser user = getUser();
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setTenantId(tenantId);
wxMsgValidationcode.setTenantId(user.getTenantId());
wxMsgValidationcode.setPhone(phone); wxMsgValidationcode.setPhone(phone);
wxMsgValidationcode.setType(type); wxMsgValidationcode.setType(type);
wxMsgValidationcode.setAppid(appid);
wxMsgValidationcode.setAppid(user.getAppId());
return wxMsgValidationcodeService.sendvalidationcode(wxMsgValidationcode); return wxMsgValidationcodeService.sendvalidationcode(wxMsgValidationcode);
} }


@GetMapping("hasvalidationcode") @GetMapping("hasvalidationcode")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true),
@ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", paramType = "query", required = true),
@ApiImplicitParam(name = "code", value = "验证码", dataType = "String", paramType = "query", required = true),
@ApiImplicitParam(name = "appid", value = "appid", dataType = "String", paramType = "query", required = true)})
public ResultData hasvalidationcode(String tenantId, String phone, Integer type, String code, String appid) {
@ApiImplicitParam(name = "code", value = "验证码", dataType = "String", paramType = "query", required = true)})
public ResultData hasvalidationcode(String phone, Integer type, String code) {
WxCUser user = getUser();
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setTenantId(tenantId);
wxMsgValidationcode.setTenantId(user.getTenantId());
wxMsgValidationcode.setPhone(phone); wxMsgValidationcode.setPhone(phone);
wxMsgValidationcode.setType(type); wxMsgValidationcode.setType(type);
wxMsgValidationcode.setCode(code); wxMsgValidationcode.setCode(code);
wxMsgValidationcode.setAppid(appid);
wxMsgValidationcode.setAppid(user.getAppId());
return wxMsgValidationcodeService.hasvalidationcode(wxMsgValidationcode); return wxMsgValidationcodeService.hasvalidationcode(wxMsgValidationcode);
} }




Загрузка…
Отмена
Сохранить