package com.platform.yijia.service.impl;

import com.platform.yijia.dao.IntegralOrderMapper;
import com.platform.yijia.pojo.IntegralOrder;
import com.platform.yijia.service.IntegralOrderService;
import org.springframework.stereotype.Service;

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

@Service("integralOrderService")
public class IntegralOrderServiceImpl implements IntegralOrderService {
    @Resource
    private IntegralOrderMapper integralOrderMapper;

    //更新订单
    @Override
    public void updateIntegralOrder(IntegralOrder integralOrder) {
        integralOrderMapper.updateIntegralOrder(integralOrder);
    }

    //新增积分订单
    @Override
    public boolean insertIntegralOrder(IntegralOrder integralOrder) {
        boolean boo = false;
        int i = integralOrderMapper.insertIntegralOrder(integralOrder);
        if(i == 1){
            boo = true;
        }
        return boo;
    }

    //查询个人积分订单信息
    @Override
    public List<IntegralOrder> getUserIntegralOrderList(IntegralOrder integralOrder) {
        return integralOrderMapper.getUserIntegralOrderList(integralOrder);
    }
}
