From 39c683421f75449c7a85280fa499bae3a2f5241b Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 26 八月 2019 09:27:49 +0800 Subject: [PATCH] 金币领取 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java | 99 ++++++++++++------------------------------------- 1 files changed, 24 insertions(+), 75 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..d3ccb92 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 @@ -45,6 +45,7 @@ import com.yeshi.fanli.entity.bus.user.InviteUser; import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo; import com.yeshi.fanli.entity.bus.user.UserInfo; +import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum; import com.yeshi.fanli.entity.bus.user.WeiXinUser; import com.yeshi.fanli.entity.system.BusinessSystem; import com.yeshi.fanli.exception.ThreeSaleException; @@ -60,6 +61,7 @@ import com.yeshi.fanli.service.inter.user.SpreadUserImgService; import com.yeshi.fanli.service.inter.user.UserActiveLogService; import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService; +import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService; import com.yeshi.fanli.service.inter.user.UserInfoService; import com.yeshi.fanli.service.inter.user.UserRankService; import com.yeshi.fanli.util.Constant; @@ -132,6 +134,10 @@ @Resource private BindingAccountService bindingAccountService; + + @Resource + private UserInfoModifyRecordService userInfoModifyRecordService; + public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid) { List<UserInfo> list = null; @@ -726,17 +732,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) { @@ -965,7 +977,9 @@ if (!StringUtil.isNullOrEmpty(portrait) && portrait.contains("/img/user/")) { COSManager.getInstance().deleteFile(portrait); } - + + userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.portrait, fileLink); + executor.execute(new Runnable() { @Override public void run() { @@ -994,69 +1008,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