Commit d8ae4ffb by jscat

nyx: 注册功能调整

1. 将生成userid的功能调整到小程序客户端
因为有了userid之后,小程序的key.js页面才能去initSocket,
而无需等到后台返回后在去initSocket
因为之前程序在等待userid的过程中,socketTask.open已经触发了
可是socket并未init成功。
parent dc0b0a4e
package cn.com.fun.nyxkey.api.service;
package cn.com.fun.nyxkey.api.service;
......@@ -16,7 +16,7 @@ import java.util.Map;
public interface Rockwell_userService {
JSONResult wxLogin(String encryptedData, String iv, String code, String userId);
JSONResult Rockwell_userServiceReg();
JSONResult Rockwell_userServiceReg(String userId);
JSONResult Rockwell_userServiceGetT_userinfo(String userId);
}
package cn.com.fun.nyxkey.api.service.impl;
package cn.com.fun.nyxkey.api.service.impl;
......@@ -153,12 +153,12 @@ public class Rockwell_userServiceImpl implements Rockwell_userService {
/*
注册新用户
*/
public JSONResult Rockwell_userServiceReg()
public JSONResult Rockwell_userServiceReg(String userId)
{
JSONResult jsonResult = new JSONResult();
Rockwell_userT_user user = new Rockwell_userT_user();
String userId ="uid_"+UUID.randomUUID().toString();
// String userId ="uid_"+UUID.randomUUID().toString();
user.setId(userId);
user.setOpenid("");
user.setAuthStatus("0"); //未授权
......
package cn.com.fun.nyxkey.api.web.controller;
package cn.com.fun.nyxkey.api.web.controller;
......@@ -51,12 +51,14 @@ public class UserApiController {
// 注册新用户,并返回userId, authStatus, userInfo
@ApiOperation(value="reg new user", notes="reg new user")
@ApiImplicitParams({
@ApiImplicitParam(name = "userid", value = "userid", required = true, dataType = "String", defaultValue = "0")
})
@RequestMapping(value = "/nyx/user/reg", method = RequestMethod.GET)
public JSONResult RockwellUserReg(
@RequestParam(value = "userid", required = true, defaultValue = "0") String userid
) {
return userService.Rockwell_userServiceReg();
return userService.Rockwell_userServiceReg(userid);
}
@ApiOperation(value="获取userInfo", notes="获取userInfo")
......
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
......@@ -276,7 +276,7 @@ limitations under the License.
order by city asc, district DESC
</select>
<!-- post api 4.1 从 view_post_info 获取 post信息
<!-- post api 4.1 从 view_post_info 获取 post信息,
-->
<select id="getMemberPos" parameterType="cn.com.fun.nyxkey.api.domain.query.Rockwell_keyT_areaQuery" resultType="cn.com.fun.nyxkey.api.domain.Rockwell_keyV_member_pos">
SELECT * FROM view_member_pos
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论