package com.bonus.canteen.core.supply.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bonus.canteen.core.supply.constant.DrpApproveStatusEnum;
import com.bonus.canteen.core.supply.domain.DrpOrderGoods;
import com.bonus.canteen.core.supply.dto.DrpOrderGoodsPageDTO;
import com.bonus.canteen.core.supply.mapper.DrpOrderGoodsMapper;
import com.bonus.canteen.core.supply.service.DrpOrderGoodsService;
import com.bonus.canteen.core.supply.vo.DrpOrderGoodsPageVO;
import com.bonus.common.houqin.constant.DelFlagEnum;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xliu
 * @date 2025/5/13 16:40
 */
@Service
public class DrpOrderGoodsServiceImpl extends ServiceImpl<DrpOrderGoodsMapper, DrpOrderGoods> implements DrpOrderGoodsService {
    @Override
    public List<DrpOrderGoodsPageVO> getDrpOrderGoodsSupplierList(DrpOrderGoodsPageDTO content) {
        Long userId = SecurityUtils.getUserId();
        return this.baseMapper.getDrpOrderGoodsSupplierList(content, DelFlagEnum.DEL_FALSE.key(), userId, DrpApproveStatusEnum.AGREE_APPROVE.key());
    }
}
