package com.dk.mdm.service.ivt;

import com.dk.common.infrastructure.annotaiton.Pagination;
import com.dk.common.model.pojo.PageList;
import com.dk.common.response.ResponseResultVO;
import com.dk.mdm.model.pojo.ivt.IntoReturnItem;
import com.dk.mdm.mapper.ivt.IntoReturnItemMapper;
import com.dk.common.service.BaseService;
import com.dk.common.mapper.BaseMapper;
import com.dk.mdm.model.query.ivt.IntoReturnItemQuery;
import com.dk.mdm.model.response.ivt.IntoReturnItemResponse;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class IntoReturnItemService extends BaseService<IntoReturnItem> {

	@Override
	public BaseMapper<IntoReturnItem> getRepository() {
		return intoReturnItemMapper;
	}

	@Autowired
	private IntoReturnItemMapper intoReturnItemMapper;



	/**
	 * @desc : 查询
	 * @author : 于继渤
	 * @date : 2023/1/5 9:39
	 */
	@Pagination
	public ResponseResultVO<PageList<IntoReturnItemResponse>> selectByCond(IntoReturnItemQuery intoReturnItemQuery) {
		return super.mergeListWithCount(intoReturnItemQuery, intoReturnItemMapper.selectByCond(intoReturnItemQuery), intoReturnItemMapper.countByCond(intoReturnItemQuery));
	}

}
