Commit c90c3dab authored by hezhen's avatar hezhen

123

parent db43d0af
...@@ -184,9 +184,7 @@ public class AppUserRest { ...@@ -184,9 +184,7 @@ public class AppUserRest {
@PostMapping("/applet/registry") @PostMapping("/applet/registry")
public JSONObject appletRegistry(@RequestParam(value = "phone") String phone,@RequestParam("pwd") String pwd,@RequestParam("code") String code){ public JSONObject appletRegistry(@RequestParam(value = "phone") String phone,@RequestParam("pwd") String pwd,@RequestParam("code") String code){
//默认昵称 return appPermissionService.appletRegistry(phone,pwd,code);
String nickname=SystemConfig.USER_NIKENAME_DEFAULT+(int)((Math.random()*9+1)*100000);
return appPermissionService.appletRegistry(phone,nickname,pwd,code);
} }
} }
...@@ -673,12 +673,26 @@ public class AppPermissionService { ...@@ -673,12 +673,26 @@ public class AppPermissionService {
/** /**
*通过小程序注册 *通过小程序注册
* @param phone * @param username
* @param pwd * @param password
* @param code * @param mobilecode
* @return * @return
*/ */
public JSONObject appletRegistry(String phone,String nickname, String pwd,String code){ public JSONObject appletRegistry(String username,String password,String mobilecode){
return register(phone,pwd,null,nickname,code,null,null,null);
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