package org.ta.pddserver.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.ta.pddserver.entity.CollectOrderEntity;
import org.ta.pddserver.mapper.CollectOrderMapper;
import org.ta.pddserver.model.api.response.CollectOrderListResponse;
import org.ta.pddserver.model.api.response.CollectOrderResponse;
import org.ta.pddserver.service.CollectOrderService;

import java.util.List;

@Service
public class CollectOrderImpl extends ServiceImpl<CollectOrderMapper, CollectOrderEntity> implements CollectOrderService {


    public CollectOrderResponse getByOrderCode(String orderCode) {
        return this.baseMapper.findByOrderCode(orderCode);
    }

    public int updateOrderStatus(int status, String uid) {
        return this.baseMapper.updateOrderStatusById(status, uid);
    }

    public List<CollectOrderListResponse> getList(String orderCode, int status) {
        return baseMapper.getList(orderCode, status);
    }

    public CollectOrderResponse getInfoByOrderCode(String orderCode) {
        return baseMapper.getInfoByOrderCode(orderCode);
    }
}