|
|
@@ -324,6 +324,7 @@ public class AppLoginController extends AppBaseController{
|
|
|
user.setCreateTime(new Date());
|
|
|
user.setAppCreateTime(new Date());
|
|
|
user.setStatus(1);
|
|
|
+ user.setAppleKey(param.getAppleKey());
|
|
|
if (StringUtils.isNotEmpty(param.getJpushId())) {
|
|
|
user.setJpushId(param.getJpushId());
|
|
|
}
|
|
|
@@ -355,6 +356,10 @@ public class AppLoginController extends AppBaseController{
|
|
|
if(user.getAppCreateTime()== null){
|
|
|
userMap.setAppCreateTime(new Date());
|
|
|
}
|
|
|
+ if(StringUtils.isBlank(user.getAppleKey())){
|
|
|
+ userMap.setAppleKey(param.getAppleKey());
|
|
|
+ }
|
|
|
+ userMap.setLoginDevice(param.getLoginDevice()!=null ? param.getLoginDevice() : null);
|
|
|
userService.updateFsUser(userMap);
|
|
|
|
|
|
if (StringUtils.isEmpty(user.getPhone())) {
|
|
|
@@ -396,7 +401,7 @@ public class AppLoginController extends AppBaseController{
|
|
|
FsUser user = userMapper.findUserByAppleKey(param.getAppleKey());
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
if (user == null) {
|
|
|
- map.put("isNew", true);
|
|
|
+ map.put("isNew", true); // 新账户,使用微信登录绑定appleKey
|
|
|
return R.ok(map);
|
|
|
} else {
|
|
|
if (StringUtils.isNotEmpty(param.getJpushId())) {
|
|
|
@@ -408,7 +413,7 @@ public class AppLoginController extends AppBaseController{
|
|
|
logger.error("发送注册优惠券失败:{}",e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(user.getPhone())) {
|
|
|
+ if (StringUtils.isEmpty(user.getUnionId())) {
|
|
|
map.put("isNew", true);
|
|
|
return R.ok(map);
|
|
|
}
|