package com.mortals.xhx.module.favorites.service.impl;

import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.favorites.dao.FavoritesBusinesscardDao;
import com.mortals.xhx.module.favorites.model.FavoritesBusinesscardEntity;
import com.mortals.xhx.module.favorites.service.FavoritesBusinesscardService;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * FavoritesBusinesscardService
 * 收藏名片 service实现
 *
 * @author zxfei
 * @date 2023-10-07
 */
@Service("favoritesBusinesscardService")
@Slf4j
public class FavoritesBusinesscardServiceImpl extends AbstractCRUDServiceImpl<FavoritesBusinesscardDao, FavoritesBusinesscardEntity, Long> implements FavoritesBusinesscardService {

    @Autowired
    private StaffService staffService;
    @Autowired
    private UserService userService;


    @Override
    protected void findAfter(FavoritesBusinesscardEntity params, PageInfo pageInfo, Context context, List<FavoritesBusinesscardEntity> list) throws AppException {

        list.forEach(item->{
            StaffEntity staffCache = staffService.getCache(item.getStaffId().toString());


        });




    }
}