From d28bed1a1275131a5ca37f7da37961e2b518ac07 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 26 八月 2019 13:44:00 +0800 Subject: [PATCH] 淘礼金创建异常处理 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java | 89 +++++++------------------------------------- 1 files changed, 15 insertions(+), 74 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java index 0f5ba56..bf2e8fe 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java @@ -726,17 +726,23 @@ userInfoVO.setLastLoginTime(null); } - /* - * 鏄剧ず鐢ㄦ埛寰俊 娣樺疂 鑰佺増鏈瓨鍦� String wxUnionId = userInfoVO.getWxUnionId(); if - * (wxUnionId == null || wxUnionId.trim().length() == 0) { - * userInfoVO.setWxName(null); } - * - * String taoBaoUid = userInfoVO.getTaoBaoUid(); if (taoBaoUid == null - * || taoBaoUid.trim().length() == 0) { userInfoVO.setTbName(null); } - */ + + //鏄剧ず鐢ㄦ埛寰俊 娣樺疂 鑰佺増鏈瓨鍦� + String wxUnionId = userInfoVO.getWxUnionId(); + if (wxUnionId == null || wxUnionId.trim().length() == 0) { + userInfoVO.setWxName(null); + } + + // 鏄惁缁戝畾鏀粯瀹濓紙璐拱 + 鍒嗕韩鏉冮檺锛� + String taoBaoUid = userInfoVO.getTaoBaoUid(); + String tbSpecialId = userInfoVO.getTbSpecialId(); + String tbRelationId = userInfoVO.getTbRelationId(); + if (StringUtil.isNullOrEmpty(taoBaoUid) || StringUtil.isNullOrEmpty(tbSpecialId) || StringUtil.isNullOrEmpty(tbRelationId)) { + userInfoVO.setTbName(null); + userInfoVO.setTaoBaoUid(null); + } Long uid = userInfoVO.getId(); - /* 缁戝畾鏀舵璐﹀彿淇℃伅 */ List<BindingAccount> account = bindingAccountMapper.selectByUid(uid); if (account != null && account.size() > 0) { @@ -994,69 +1000,4 @@ userInfoMapper.updateByPrimaryKeySelective(userInfo); } - @Override - public void forbiddenUser(Long uid, String reason) { - UserInfo currentInfo = userInfoService.selectByPKey(uid); - if (currentInfo == null) { - return; - } - if (currentInfo.getState() != UserInfo.STATE_NORMAL) { - return; - } - - currentInfo.setState(UserInfo.STATE_FORBIDDEN); - currentInfo.setStateDesc(reason); - userInfoService.updateByPrimaryKeySelective(currentInfo); - - // 鍔犲叆灏佺鐨勮处鍙峰垪琛� - ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); - forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId); - forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId()); - forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName()); - try { - forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); - } catch (ForbiddenUserIdentifyCodeException e) { - e.printStackTrace(); - } - - // 鐢佃瘽鍙风爜 - forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); - forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone); - forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone()); - try { - forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); - } catch (ForbiddenUserIdentifyCodeException e) { - e.printStackTrace(); - } - - // 娣樺疂 - UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid); - if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) { - forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); - forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid); - forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid()); - try { - forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); - } catch (ForbiddenUserIdentifyCodeException e) { - e.printStackTrace(); - } - } - - // 鏌ヨ鏀粯瀹濈粦瀹� - List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid); - if (list != null) { - for (BindingAccount ba : list) { - forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); - forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount); - forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount()); - forbiddenUserIdentifyCode.setBeiZhu(ba.getName()); - try { - forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); - } catch (ForbiddenUserIdentifyCodeException e) { - e.printStackTrace(); - } - } - } - - } } -- Gitblit v1.8.0