Commit 154393b5 authored by hezhen's avatar hezhen

Merge branch 'master_source' into dev

parents 4b7a7aef 45374ce9
...@@ -85,7 +85,7 @@ public class AuthController { ...@@ -85,7 +85,7 @@ public class AuthController {
@RequestParam(value="password",defaultValue="")String password, @RequestParam(value="password",defaultValue="")String password,
@RequestParam(value="code",defaultValue="")String code, @RequestParam(value="code",defaultValue="")String code,
@RequestParam(value="channel",defaultValue="1")Integer channel, @RequestParam(value="channel",defaultValue="1")Integer channel,
@RequestParam(value="registerSource",defaultValue="")Integer registerSource)throws Exception{ @RequestParam(value="registerSource",defaultValue="")String registerSource)throws Exception{
log.info(username+"----require register..."); log.info(username+"----require register...");
JSONObject data=appAuthService.register(username,mobilecode,password,code,channel,registerSource); JSONObject data=appAuthService.register(username,mobilecode,password,code,channel,registerSource);
if(data!=null&&data.getInteger("status")== ResultCode.SUCCESS_CODE){ if(data!=null&&data.getInteger("status")== ResultCode.SUCCESS_CODE){
...@@ -110,7 +110,7 @@ public class AuthController { ...@@ -110,7 +110,7 @@ public class AuthController {
@RequestParam(value="isQQ",defaultValue="0")Integer isQQ, @RequestParam(value="isQQ",defaultValue="0")Integer isQQ,
@RequestParam(value="code",defaultValue="")String code, @RequestParam(value="code",defaultValue="")String code,
@RequestParam(value="channel",defaultValue="1")Integer channel, @RequestParam(value="channel",defaultValue="1")Integer channel,
@RequestParam(value="registerSource",defaultValue="")Integer registerSource @RequestParam(value="registerSource",defaultValue="")String registerSource
)throws Exception{ )throws Exception{
log.info(username+"----require wxregister..."); log.info(username+"----require wxregister...");
JSONObject data=appAuthService.wxregister( username, mobilecode, password, nickname, JSONObject data=appAuthService.wxregister( username, mobilecode, password, nickname,
......
...@@ -36,7 +36,7 @@ public interface IUserService { ...@@ -36,7 +36,7 @@ public interface IUserService {
@RequestParam(value="password",defaultValue="")String password, @RequestParam(value="password",defaultValue="")String password,
@RequestParam(value="code")String code, @RequestParam(value="code")String code,
@RequestParam(value="channel",defaultValue="1")Integer channel, @RequestParam(value="channel",defaultValue="1")Integer channel,
@RequestParam(value="registerSource",defaultValue="")Integer registerSource); @RequestParam(value="registerSource",defaultValue="")String registerSource);
@RequestMapping(value = "/api/app/user/wxregister", method = RequestMethod.POST) @RequestMapping(value = "/api/app/user/wxregister", method = RequestMethod.POST)
public JSONObject wxregister( public JSONObject wxregister(
@RequestParam(value="username")String username,@RequestParam(value="mobilecode")String mobilecode, @RequestParam(value="username")String username,@RequestParam(value="mobilecode")String mobilecode,
...@@ -45,7 +45,7 @@ public interface IUserService { ...@@ -45,7 +45,7 @@ public interface IUserService {
@RequestParam(value="unionid")String unionid,@RequestParam(value="type")Integer type, @RequestParam(value="unionid")String unionid,@RequestParam(value="type")Integer type,
@RequestParam(value="isQQ")Integer isQQ,@RequestParam(value="code")String code, @RequestParam(value="isQQ")Integer isQQ,@RequestParam(value="code")String code,
@RequestParam(value="channel",defaultValue="1")Integer channel, @RequestParam(value="channel",defaultValue="1")Integer channel,
@RequestParam(value="registerSource",defaultValue="")Integer registerSource); @RequestParam(value="registerSource",defaultValue="")String registerSource);
@RequestMapping(value = "/api/app/user/checkBindWechat",method = RequestMethod.POST) @RequestMapping(value = "/api/app/user/checkBindWechat",method = RequestMethod.POST)
public JSONObject checkBindWechat( @RequestParam(value="username")String username); public JSONObject checkBindWechat( @RequestParam(value="username")String username);
@RequestMapping(value = "/api/app/user/wxlogin",method = RequestMethod.POST) @RequestMapping(value = "/api/app/user/wxlogin",method = RequestMethod.POST)
......
...@@ -11,8 +11,8 @@ public interface AuthService { ...@@ -11,8 +11,8 @@ public interface AuthService {
String refresh(String oldToken) throws Exception; String refresh(String oldToken) throws Exception;
void validate(String token) throws Exception; void validate(String token) throws Exception;
JSONObject sendsms(String username, Integer type, String pointList) throws Exception; JSONObject sendsms(String username, Integer type, String pointList) throws Exception;
JSONObject register(String username, String mobilecode, String password,String code,Integer channel,Integer registerSource) throws Exception; JSONObject register(String username, String mobilecode, String password,String code,Integer channel,String registerSource) 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,Integer registerSource) 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,String registerSource) throws Exception;
JSONObject checkBindWechat(String username) throws Exception; JSONObject checkBindWechat(String username) throws Exception;
JSONObject wxlogin(String openid,Integer isQQ,String code) 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; JSONObject tlogin(String username, String password,String mobilecode,Integer type,String code) throws Exception;
......
...@@ -72,12 +72,12 @@ public class AppAuthServiceImpl implements AuthService { ...@@ -72,12 +72,12 @@ public class AppAuthServiceImpl implements AuthService {
} }
@Override @Override
public JSONObject register(String username, String mobilecode, String password,String code,Integer channel,Integer registerSource) throws Exception { public JSONObject register(String username, String mobilecode, String password,String code,Integer channel,String registerSource) throws Exception {
return userService.register(username,mobilecode,password,code,channel,registerSource); return userService.register(username,mobilecode,password,code,channel,registerSource);
} }
@Override @Override
public JSONObject wxregister(String username, String mobilecode, String password, String nickname, String headimgurl, String openid, String unionid, Integer type,Integer isQQ,String code,Integer channel,Integer registerSource) throws Exception { public JSONObject wxregister(String username, String mobilecode, String password, String nickname, String headimgurl, String openid, String unionid, Integer type,Integer isQQ,String code,Integer channel,String registerSource) throws Exception {
return userService.wxregister(username,mobilecode,password,nickname,headimgurl,openid,unionid,type,isQQ,code,channel,registerSource); return userService.wxregister(username,mobilecode,password,nickname,headimgurl,openid,unionid,type,isQQ,code,channel,registerSource);
} }
......
...@@ -69,12 +69,12 @@ public class AuthServiceImpl implements AuthService { ...@@ -69,12 +69,12 @@ public class AuthServiceImpl implements AuthService {
return userService.sendsms(username,type, pointList); return userService.sendsms(username,type, pointList);
} }
@Override @Override
public JSONObject register(String username, String mobilecode, String password,String code,Integer channel,Integer registerSource) throws Exception { public JSONObject register(String username, String mobilecode, String password,String code,Integer channel,String registerSource) throws Exception {
return userService.register(username,mobilecode,password,code,channel,registerSource); return userService.register(username,mobilecode,password,code,channel,registerSource);
} }
@Override @Override
public JSONObject wxregister(String username, String mobilecode, String password, String nickname, String headimgurl, String openid, String unionid, Integer type,Integer isQQ,String code,Integer channel,Integer registerSource) throws Exception { public JSONObject wxregister(String username, String mobilecode, String password, String nickname, String headimgurl, String openid, String unionid, Integer type,Integer isQQ,String code,Integer channel,String registerSource) throws Exception {
return userService.wxregister(username,mobilecode,password,nickname,headimgurl,openid,unionid,type,isQQ,code,channel,registerSource); return userService.wxregister(username,mobilecode,password,nickname,headimgurl,openid,unionid,type,isQQ,code,channel,registerSource);
} }
......
...@@ -85,5 +85,5 @@ public class AppUserDetail { ...@@ -85,5 +85,5 @@ public class AppUserDetail {
@ApiModelProperty(value = "注册来源") @ApiModelProperty(value = "注册来源")
@Column(name = "register_source") @Column(name = "register_source")
private Integer registerSource; private String registerSource;
} }
...@@ -90,7 +90,7 @@ public class AppUserRest { ...@@ -90,7 +90,7 @@ public class AppUserRest {
@RequestParam(value="password",defaultValue="")String password, @RequestParam(value="password",defaultValue="")String password,
@RequestParam(value="code",defaultValue="")String code, @RequestParam(value="code",defaultValue="")String code,
@RequestParam(value="channel",defaultValue="1")Integer channel, @RequestParam(value="channel",defaultValue="1")Integer channel,
@RequestParam(value="registerSource",defaultValue="")Integer registerSource @RequestParam(value="registerSource",defaultValue="")String registerSource
){ ){
//默认昵称 //默认昵称
String nickname=SystemConfig.USER_NIKENAME_DEFAULT+(int)((Math.random()*9+1)*100000); String nickname=SystemConfig.USER_NIKENAME_DEFAULT+(int)((Math.random()*9+1)*100000);
...@@ -125,7 +125,7 @@ public class AppUserRest { ...@@ -125,7 +125,7 @@ public class AppUserRest {
@RequestParam(value="isQQ",defaultValue="0")Integer isQQ, @RequestParam(value="isQQ",defaultValue="0")Integer isQQ,
@RequestParam(value="code",defaultValue="")String code, @RequestParam(value="code",defaultValue="")String code,
@RequestParam(value="channel",defaultValue="1")Integer channel, @RequestParam(value="channel",defaultValue="1")Integer channel,
@RequestParam(value="registerSource",defaultValue="")Integer registerSource @RequestParam(value="registerSource",defaultValue="")String registerSource
){ ){
if(StringUtils.isBlank(headimgurl)){ if(StringUtils.isBlank(headimgurl)){
headimgurl=SystemConfig.USER_HEADER_URL_DEFAULT; headimgurl=SystemConfig.USER_HEADER_URL_DEFAULT;
......
...@@ -251,7 +251,7 @@ public class AppPermissionService { ...@@ -251,7 +251,7 @@ public class AppPermissionService {
*/ */
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public JSONObject register(String username, String password, String headimgurl, public JSONObject register(String username, String password, String headimgurl,
String nickname, String mobilecode, String openId, String unionid, Integer type,String code,Integer channel,Integer registerSource) { String nickname, String mobilecode, String openId, String unionid, Integer type,String code,Integer channel,String registerSource) {
log.info("register------code====="+code+"----开始进入方法---time===="+System.currentTimeMillis()/1000L); log.info("register------code====="+code+"----开始进入方法---time===="+System.currentTimeMillis()/1000L);
String activityCode = null; String activityCode = null;
// 判断参数和验证码 // 判断参数和验证码
...@@ -567,7 +567,7 @@ public class AppPermissionService { ...@@ -567,7 +567,7 @@ public class AppPermissionService {
*/ */
@Transactional @Transactional
public JSONObject weCahtRegister(String username, String password, String openId, public JSONObject weCahtRegister(String username, String password, String openId,
String unionid, String nickname, String headimgurl, int type, String mobilecode, Integer isQQ,String code,Integer channel,Integer registerSource) { String unionid, String nickname, String headimgurl, int type, String mobilecode, Integer isQQ,String code,Integer channel,String registerSource) {
// 校验参数和验证码 // 校验参数和验证码
if (StringUtils.isBlank(username) || StringUtils.isBlank(mobilecode)) { if (StringUtils.isBlank(username) || StringUtils.isBlank(mobilecode)) {
return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空"); return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空");
......
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