| @@ -7,25 +7,26 @@ import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import org.apache.log4j.Logger; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import org.springframework.web.bind.annotation.GetMapping; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.RestController; | |||
| @RestController | |||
| @RequestMapping("wxMsgValidationcode") | |||
| public class WxMsgValidationcodeController extends BaseController | |||
| { | |||
| public class WxMsgValidationcodeController extends BaseController { | |||
| private Logger logger = Logger.getLogger(WxMsgValidationcodeController.class); | |||
| @Autowired | |||
| @Autowired | |||
| private WxMsgValidationcodeService wxMsgValidationcodeService; | |||
| @GetMapping("sendvalidationcode") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="tenantId",value="租户ID",dataType="String", paramType = "query"), | |||
| @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) { | |||
| WxMsgValidationcode wxMsgValidationcode =new WxMsgValidationcode(); | |||
| @ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"), | |||
| @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) { | |||
| WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | |||
| wxMsgValidationcode.setTenantId(tenantId); | |||
| wxMsgValidationcode.setPhone(phone); | |||
| wxMsgValidationcode.setType(type); | |||
| @@ -35,13 +36,13 @@ public class WxMsgValidationcodeController extends BaseController | |||
| @GetMapping("hasvalidationcode") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name="tenantId",value="租户ID",dataType="String", paramType = "query"), | |||
| @ApiImplicitParam(name="phone",value="手机号",dataType="String", 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) { | |||
| WxMsgValidationcode wxMsgValidationcode =new WxMsgValidationcode(); | |||
| @ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"), | |||
| @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", 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) { | |||
| WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | |||
| wxMsgValidationcode.setTenantId(tenantId); | |||
| wxMsgValidationcode.setPhone(phone); | |||
| wxMsgValidationcode.setType(type); | |||
| @@ -50,5 +51,5 @@ public class WxMsgValidationcodeController extends BaseController | |||
| return wxMsgValidationcodeService.hasvalidationcode(wxMsgValidationcode); | |||
| } | |||
| } | |||