Commit c90c3dab authored by hezhen's avatar hezhen

123

parent db43d0af
......@@ -184,9 +184,7 @@ public class AppUserRest {
@PostMapping("/applet/registry")
public JSONObject appletRegistry(@RequestParam(value = "phone") String phone,@RequestParam("pwd") String pwd,@RequestParam("code") String code){
//默认昵称
String nickname=SystemConfig.USER_NIKENAME_DEFAULT+(int)((Math.random()*9+1)*100000);
return appPermissionService.appletRegistry(phone,nickname,pwd,code);
return appPermissionService.appletRegistry(phone,pwd,code);
}
}
......@@ -673,12 +673,26 @@ public class AppPermissionService {
/**
*通过小程序注册
* @param phone
* @param pwd
* @param code
* @param username
* @param password
* @param mobilecode
* @return
*/
public JSONObject appletRegistry(String phone,String nickname, String pwd,String code){
return register(phone,pwd,null,nickname,code,null,null,null);
public JSONObject appletRegistry(String username,String password,String mobilecode){
try {
// 是否已存在
AppUserLogin user = appUserLoginBiz.checkeUserLogin(username);
JSONObject data=new JSONObject();
if (null == user) {
data=register(username, password, SystemConfig.USER_HEADER_URL_DEFAULT,SystemConfig.USER_NIKENAME_DEFAULT+(int)((Math.random()*9+1)*100000), mobilecode, null, null,0);
}else{
data=login(username,null,mobilecode,2);
}
return data;
} catch (Exception e) {
e.printStackTrace();
return JsonResultUtil.createFailedResult(ResultCode.EXCEPTION_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