Commit b644e77c authored by 李健华's avatar 李健华

删除微信记录

parent b1f8779e
......@@ -85,4 +85,7 @@ public interface IWeChatUserRepository extends JpaRepository<WechatUserInfo, Lon
@Modifying
@Query(value = "update wechat_userinfo set union_id=?3 where user_id=?1 and app_name=?2", nativeQuery = true)
int updateUserUnionId(Long userId, String appName, String unionId);
@Transactional
void deleteByUserId(Long userId);
}
......@@ -103,6 +103,9 @@ public class UserServiceImpl implements IUserService, IBaseController {
@Autowired
private IUuidPhoneMappingRepository uuidPhoneMappingRepository;
@Resource
private IWeChatUserRepository weChatUserRepository;
@Override
// @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneInDb(String phone) {
......@@ -574,6 +577,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
/* 清空缓存 */
sessionService.deleteUserCatch(user);
/* 禁用微信 Or 删除?*/
wechatService.forbiddenXyqbAndWuxiUserByUserId(user.getId());
// wechatService.forbiddenXyqbAndWuxiUserByUserId(user.getId());
weChatUserRepository.deleteByUserId(userId);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment