This commit is contained in:
parent
46c5e66ca3
commit
1d6b62f05b
|
|
@ -93,7 +93,7 @@ public class UsersAction {
|
||||||
* @param code
|
* @param code
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/wechatLogin",method=RequestMethod.POST)
|
@RequestMapping(value="/wechatLogin",method={RequestMethod.GET , RequestMethod.POST})
|
||||||
public JsonResult<?> wechatLogin(String code) {
|
public JsonResult<?> wechatLogin(String code) {
|
||||||
return userService.wechatLogin(code);
|
return userService.wechatLogin(code);
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +103,7 @@ public class UsersAction {
|
||||||
* @param unionId
|
* @param unionId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/wechatValidate",method=RequestMethod.POST)
|
@RequestMapping(value="/wechatValidate",method={RequestMethod.GET , RequestMethod.POST})
|
||||||
public JsonResult<?> wechatValidate(String unionId) {
|
public JsonResult<?> wechatValidate(String unionId) {
|
||||||
return userService.wechatValidate(unionId);
|
return userService.wechatValidate(unionId);
|
||||||
}
|
}
|
||||||
|
|
@ -114,7 +114,7 @@ public class UsersAction {
|
||||||
* @param phoneNum
|
* @param phoneNum
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/bindPhone",method=RequestMethod.GET)
|
@RequestMapping(value="/bindPhone",method={RequestMethod.GET , RequestMethod.POST})
|
||||||
public JsonResult<?> bindPhone(String unionId, String phoneNum, String password) {
|
public JsonResult<?> bindPhone(String unionId, String phoneNum, String password) {
|
||||||
return userService.bindPhone(unionId, phoneNum, password);
|
return userService.bindPhone(unionId, phoneNum, password);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -592,7 +592,68 @@ public class UserServiceImpl implements UserService {
|
||||||
userAssetDtoPhone.setGradeNum(7);
|
userAssetDtoPhone.setGradeNum(7);
|
||||||
userAssetDtoPhone.setGradeName("海龙王");
|
userAssetDtoPhone.setGradeName("海龙王");
|
||||||
}
|
}
|
||||||
return wechatValidate(unionId);
|
//技威参数
|
||||||
|
GwellParamDto gwellParam = getGwellInfo(userWechat.getIsRegisterGwell(), userWechat.getWechatUnionid());
|
||||||
|
if(gwellParam!=null){
|
||||||
|
userWechat.setIsRegisterGwell(gwellParam.getIsRegisterGwell());
|
||||||
|
userWechat.setP2PVerifyCode1(gwellParam.getP2PVerifyCode1());
|
||||||
|
userWechat.setP2PVerifyCode2(gwellParam.getP2PVerifyCode2());
|
||||||
|
userWechat.setGwellUserID(gwellParam.getUserID());
|
||||||
|
}
|
||||||
|
Integer userId = userWechat.getUserId();
|
||||||
|
StringBuffer msg = new StringBuffer();
|
||||||
|
msg.append("感谢您使用爱鱼奇,连接智能设备请查看下方说明书,内含操作视频:http://u.eqxiu.com/s/KmmVl87l\n");
|
||||||
|
msg.append("摄像头售后:18667812003\n睿芯插排售后:15757401229\n绚多插排售后:18857689069\n松诺插排售后:13392205468");
|
||||||
|
//如果当前设备用户未注册
|
||||||
|
if (userWechat.getIsRegisterNetease().equals(BooleanEnum.NO.getKey())) {
|
||||||
|
PushList pushList = new PushList();
|
||||||
|
pushList.setUserId(userId);
|
||||||
|
pushList.setDeviceId(0);
|
||||||
|
pushList.setPhoneType("ALL");
|
||||||
|
pushList.setShowName("");
|
||||||
|
pushList.setPushType(PushTypeEnum.qu_reply.getKey());
|
||||||
|
pushList.setPushTitle("系统通知");
|
||||||
|
pushList.setPushContext(msg.toString());
|
||||||
|
// sendPushQueueMessage(pushList);
|
||||||
|
//更新用户注册信息
|
||||||
|
userWechat.setIsRegisterNetease(BooleanEnum.YES.getKey());
|
||||||
|
userDao.update(userWechat);
|
||||||
|
}
|
||||||
|
//更新登陆参数
|
||||||
|
userDao.executeLoginUpdate(userId,userWechat.getLoginType());
|
||||||
|
//用户基本信息
|
||||||
|
UserInfoDto userInfoDto = getUserInfoDto(userWechat, gwellParam);
|
||||||
|
//用户资产信息
|
||||||
|
UserAssetDto userAssetDto = getUserAssetInfo(userId);
|
||||||
|
//返回json信息
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("userInfo", userInfoDto);
|
||||||
|
json.put("userAsset", userAssetDto);
|
||||||
|
//设备信息
|
||||||
|
DeviceInfoDto deviceInfo = getDeviceInfo(userWechat.getUserId());
|
||||||
|
/**
|
||||||
|
* 登录返回信息
|
||||||
|
*/
|
||||||
|
//用户信息
|
||||||
|
json.put("user", getUserInfo(userWechat,gwellParam));
|
||||||
|
//用户资产
|
||||||
|
json.put("userAsset", getUserAssetInfo(userId));
|
||||||
|
//金币任务
|
||||||
|
json.put("goldTasks", getGoldTaskList(userId));
|
||||||
|
|
||||||
|
//资讯信息
|
||||||
|
json.put("information", cacheService.getInformation());
|
||||||
|
//设备信息
|
||||||
|
json.put("device", deviceInfo.getDeviceList());
|
||||||
|
//摄像头信息
|
||||||
|
json.put("camera", getCameraInfo(userId));
|
||||||
|
//设备关联摄像头信息
|
||||||
|
json.put("deviceCamera", getDeviceCamera(deviceInfo.getDeviceIds()));
|
||||||
|
//商家信息(自己是商家)
|
||||||
|
json.put("shopsInfo", getShopsInfo(userId,userWechat.getUserImg()));
|
||||||
|
//看护商家信息
|
||||||
|
json.put("shopsInfo2", getShopsInfo(userWechat.getShopsUserId(),null));
|
||||||
|
return new JsonResult<JSONObject>(ResultEnum.success.getKey(), json);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateData(String sql){
|
public void updateData(String sql){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue