|
|
|
@ -122,10 +122,11 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
|
|
|
|
return this.userFeignClient.saveWxFormId(saveFormId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 创建微信小程序码,并上传到oss |
|
|
|
* |
|
|
|
* @param formDto 小程序码的参数 |
|
|
|
* @param formDto 小程序码的参数 |
|
|
|
* @return java.lang.String 小程序码的下载抵制 |
|
|
|
* @author work@yujt.net.cn |
|
|
|
* @date 2019/10/22 10:14 |
|
|
|
@ -135,7 +136,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
File wxaCodeUnlimit; |
|
|
|
try { |
|
|
|
String url = "pages/index/index?gridId=" + formDto.getGridId().toString(); |
|
|
|
url = url+"&inviteUserId=" + formDto.getInviteUserId(); |
|
|
|
url = url + "&inviteUserId=" + formDto.getInviteUserId(); |
|
|
|
wxaCodeUnlimit = wxMaServiceUtils.normalWxMaService().getQrcodeService().createWxaCode(url); |
|
|
|
} catch (WxErrorException e) { |
|
|
|
throw new RenException("请求微信接口失败"); |
|
|
|
@ -151,6 +152,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
} |
|
|
|
return ossResult; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* File文件转为byte[] |
|
|
|
* |
|
|
|
@ -901,11 +903,16 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
} |
|
|
|
String sessionKey = this.getUserSessionKey(formDto.getWxCode()); |
|
|
|
WxMaUserInfo wxMaUserInfo = wxMaServiceUtils.normalWxMaService().getUserService().getUserInfo(sessionKey, formDto.getEncryptedData(), formDto.getIv()); |
|
|
|
if (StringUtils.isBlank(wxMaUserInfo.getUnionId())) { |
|
|
|
// 标准文案后续修改
|
|
|
|
return new Result().error("微信接口异常"); |
|
|
|
} |
|
|
|
UserDTO userDTO = new UserDTO(); |
|
|
|
userDTO.setId(userDetail.getUserId()); |
|
|
|
userDTO.setNickname(wxMaUserInfo.getNickName()); |
|
|
|
userDTO.setFaceImg(wxMaUserInfo.getAvatarUrl()); |
|
|
|
userDTO.setSex(wxMaUserInfo.getGender()); |
|
|
|
userDTO.setWxUnionId(wxMaUserInfo.getUnionId()); |
|
|
|
Result updateWxInfoResult = userFeignClient.updateWxInfo(userDTO); |
|
|
|
if (!updateWxInfoResult.success()) { |
|
|
|
return new Result().error("更新用户信息失败"); |
|
|
|
@ -947,11 +954,10 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 用户加入网格党员群 |
|
|
|
* |
|
|
|
* @params [userDto, lordFlag] |
|
|
|
* @return void |
|
|
|
* @params [userDto, lordFlag] |
|
|
|
* @author liuchuang |
|
|
|
* @since 2019/11/21 10:58 |
|
|
|
*/ |
|
|
|
@ -967,6 +973,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
formDto.setGridId(userDto.getGridId()); |
|
|
|
groupTask.joinGridPartyGroup(formDto); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<List<UserInvitationRecordResultDTO>> invitationRecord() { |
|
|
|
return userFeignClient.invitationRecord(); |
|
|
|
|