package com.fjhx.victoriatourist.service.jd.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fjhx.victoriatourist.entity.jd.po.JdOrderDetails;
import com.fjhx.victoriatourist.entity.jd.vo.JdOrderDetailsVo;
import com.fjhx.victoriatourist.mapper.jd.JdOrderDetailsMapper;
import com.fjhx.victoriatourist.service.jd.JdOrderDetailsService;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p>
 * 京东订单明细 服务实现类
 * </p>
 *
 * @author 
 * @since 2023-04-20
 */
@Service
public class JdOrderDetailsServiceImpl extends ServiceImpl<JdOrderDetailsMapper, JdOrderDetails> implements JdOrderDetailsService {

    @Override
    public List<JdOrderDetailsVo> findListByJdOrderId(Long jdOrderId) {
        List<JdOrderDetails> list = lambdaQuery().eq(JdOrderDetails::getJdOrderId, jdOrderId).list();
        return BeanUtil.copyToList(list, JdOrderDetailsVo.class);
    }
}
