Commit 7cb58ff6 authored by jiaorz's avatar jiaorz

Merge branch 'master-captcha-branch' into dev

# Conflicts:
#	ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/AuthService.java
parents f8f292f0 9996c05c
......@@ -5,22 +5,14 @@ import com.github.wxiaoqi.security.auth.service.AuthService;
import com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest;
import com.github.wxiaoqi.security.common.constant.RequestTypeConstants;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.ClientUtil;
import com.github.wxiaoqi.security.common.util.EntityUtils;
import com.github.wxiaoqi.security.common.util.IpUtil;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
......@@ -83,9 +75,9 @@ public class AuthController {
return new ObjectRestResponse<>();
}
@RequestMapping(value = "/sendsms", method = RequestMethod.POST)
public JSONObject sendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type)throws Exception{
public JSONObject sendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type, String pointList)throws Exception{
log.info(username+"----require sendsms...");
return appAuthService.sendsms(username,type);
return appAuthService.sendsms(username,type,pointList);
}
@RequestMapping(value = "/register", method = RequestMethod.POST)
public JSONObject register(@RequestParam(value="username",defaultValue="")String username,
......@@ -180,7 +172,7 @@ public class AuthController {
@RequestMapping(value = "other/sendsms", method = RequestMethod.GET)
public JSONObject otherSendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type)throws Exception{
log.info(username+"----require sendsms...");
return appAuthService.sendsms(username,type);
return appAuthService.sendsms(username,type, "");
}
@RequestMapping(value = "/otherLogin", method = RequestMethod.POST)
......
......@@ -29,7 +29,7 @@ public interface IUserService {
AppUserInfo AppValidate(@RequestBody JwtAuthenticationRequest authenticationRequest);
@RequestMapping(value = "/api/app/user/sendsms", method = RequestMethod.POST)
public JSONObject sendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type);
public JSONObject sendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type, @RequestParam(value="pointList")String pointList);
@RequestMapping(value = "/api/app/user/register", method = RequestMethod.POST)
public JSONObject register( @RequestParam(value="username",defaultValue="")String username,
@RequestParam(value="mobilecode",defaultValue="")String mobilecode,
......
......@@ -4,18 +4,15 @@ package com.github.wxiaoqi.security.auth.service;
import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletRequest;
public interface AuthService {
String login(JwtAuthenticationRequest authenticationRequest) throws Exception;
ObjectRestResponse loginSmall(JwtAuthenticationRequest authenticationRequest) throws Exception;
String refresh(String oldToken) throws Exception;
void validate(String token) throws Exception;
JSONObject sendsms(String username, Integer type) throws Exception;
JSONObject register(String username, String mobilecode, String password,String code,Integer channel) throws Exception;
JSONObject wxregister( String username, String mobilecode, String password, String nickname, String headimgurl, String openid, String unionid, Integer type,Integer isQQ,String code,Integer channel) throws Exception;
JSONObject sendsms(String username, Integer type, String pointList) throws Exception;
JSONObject register(String username, String mobilecode, String password,String code) throws Exception;
JSONObject wxregister( String username, String mobilecode, String password, String nickname, String headimgurl, String openid, String unionid, Integer type,Integer isQQ,String code) throws Exception;
JSONObject checkBindWechat(String username) throws Exception;
JSONObject wxlogin(String openid,Integer isQQ,String code) throws Exception;
JSONObject tlogin(String username, String password,String mobilecode,Integer type,String code) throws Exception;
......
......@@ -13,14 +13,11 @@ import com.github.wxiaoqi.security.common.constant.RequestTypeConstants;
import com.github.wxiaoqi.security.common.exception.auth.UserInvalidException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
/**
* @author keliii
*/
......@@ -69,8 +66,8 @@ public class AppAuthServiceImpl implements AuthService {
jwtTokenUtil.getInfoFromToken(token);
}
@Override
public JSONObject sendsms(String username, Integer type) throws Exception {
return userService.sendsms(username,type);
public JSONObject sendsms(String username, Integer type, String pointList) throws Exception {
return userService.sendsms(username,type,pointList);
}
@Override
......
......@@ -71,7 +71,7 @@ public class AppUserRest {
*/
@RequestMapping(value = "/user/sendsms", method = RequestMethod.POST)
public @ResponseBody
JSONObject sendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type, String pointList){
JSONObject sendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type, @RequestParam(value="pointList")String pointList){
return appPermissionService.sendSMS(username,type, pointList);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment