package com.yonge.cooleshow.portal.service.impl;

import com.github.pagehelper.PageHelper;
import com.yonge.cooleshow.mbg.mapper.OmsOrderReturnReasonMapper;
import com.yonge.cooleshow.mbg.model.OmsOrderReturnReason;
import com.yonge.cooleshow.mbg.model.OmsOrderReturnReasonExample;
import com.yonge.cooleshow.portal.service.OmsOrderReturnReasonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Description
 *
 * @author liujunchi
 * @date 2022-05-06
 */
@Service
public class OmsOrderReturnReasonServiceimpl implements OmsOrderReturnReasonService {

    @Autowired
    private OmsOrderReturnReasonMapper returnReasonMapper;

    @Override
    public List<OmsOrderReturnReason> list(Integer pageSize, Integer pageNum) {
        PageHelper.startPage(pageNum, pageSize);
        OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
        example.setOrderByClause("sort desc");
        return returnReasonMapper.selectByExample(example);
    }
}
