Code Monkey home page Code Monkey logo

hmingr / irh Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 20.0 2.59 MB

基于微服务和智能推荐的校园服务平台。主要使用springBoot、SpringCloud、SpringOauth2、Mybaits搭建。主要功能有出售二手商品、智能推荐、发布文章、消息通知、公益活动、校园通知、AI实名认证等集校园生活于一体的服务平台。

Home Page: http://www.imuster.top

Java 93.33% Dockerfile 0.03% FreeMarker 1.78% TSQL 4.85%
java spring spring-boot springcloud

irh's People

Contributors

hmingr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

irh's Issues

寻求

有没有数据库表,大佬

Cannot resolve com.huawei:java-sdk-core:3.0.9

@HMingR 作者您好!我在配置您项目环境的时候遇到了一个问题,想请教下您

com.huawei
java-sdk-core
3.0.9

我现在在配置maven这一块,ais和支付宝的sdk我已经在另一个issue得到了答案,但是上面这个我不知道是哪一个jar....T^T如果您看到的话可以帮忙解答一下吗?万分感谢!

在goods服务的RecommendProductServiceImpl的getRealtimeRecommend()方法

在goods服务的RecommendProductServiceImpl的getRealtimeRecommend()方法
public Message<Page> getRealtimeRecommend(Integer pageSize, Integer currentPage, Long userId) {
//如果是游客登录直接 查询发布时间最新的商品

    if(userId == null){
        log.info("智能推送{}---->商城首页"," userId == null ");
        return productInfoService.getProductBriefInfoByPage(currentPage, pageSize);
    }
    //获得存储在redis中的实时推荐的商品id的list
    String redisKey = RedisUtil.getProductRealtimeRecommendListKey(userId);
    Boolean aBoolean = redisTemplate.hasKey(redisKey);
    //直接返回redis的的数据
    if(aBoolean){
        log.info("智能推送{}---->商城首页","redis存储实时推荐商品id的list");
        return getInfoFromRedis(pageSize, currentPage, redisKey);
    }

    //MongoDB的数据,这里找不到数据所以每次推荐都是离线推荐
    ProductRealtimeRecommendDto recommendInfo = productRealtimeRecommendRepository.findByUserId(userId);
    List<MongoProductInfo> recs = null;
    if(recommendInfo != null){
        recs = recommendInfo.getRecs();
    }

    String userBrowseRecordBitmap = RedisUtil.getUserBrowseRecordBitmap(BrowserType.ES_SELL_PRODUCT, userId);
    //当实时推荐中没有商品时,转到离线推荐
    if(CollectionUtils.isEmpty(recs)) {
        log.info("智能推送{}---->商城首页","实时推荐没有商品转离线推荐");
        return getOfflineRecommendListByUserId(pageSize, currentPage, userId);
    }
    //将商品信息存入redis中
    List<Long> ids = recs.stream().map(MongoProductInfo::getProductId).collect(Collectors.toList());
    ids.stream().forEach(id -> {
        if(commands.getbit(userBrowseRecordBitmap.getBytes(), id) == null){
            redisTemplate.opsForSet().add(redisKey, id);
        }
    });
    return getInfoFromRedis(pageSize, currentPage, redisKey);
}

Originally posted by @liutao-lx in #3 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.