HomePageManager.java 1.03 KB
Newer Older
张辰's avatar
张辰 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
package com.tanpu.community.manager;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tanpu.community.dao.entity.community.FansRelEntity;
import com.tanpu.community.dao.mapper.community.FansRelMapper;
import com.tanpu.community.service.FansRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HomePageManager {

    @Autowired
    private FansRelService fansRelService;

    public List<FansRelEntity> queryFansByFollowerId(String followerId) {
        return fansRelService.queryFansByFollowerId(followerId);

        // todo 组装粉丝的头像等信息
    }

    public List<FansRelEntity> queryFansByIdolId(String idolId) {
        return fansRelService.queryFansByIdolId(idolId);

        // todo 组装粉丝的头像等信息
    }

    public void addIdol(String idolId, String followerId) {
        fansRelService.addFans(idolId, followerId);
    }
}