package com.dk.mdm.service.sys;

import com.dk.common.infrastructure.annotaiton.Pagination;
import com.dk.common.mapper.BaseMapper;
import com.dk.common.model.pojo.PageList;
import com.dk.common.response.ResponseResultVO;
import com.dk.common.service.BaseService;
import com.dk.mdm.mapper.sys.BarcodeItemMapper;
import com.dk.mdm.model.pojo.sys.BarcodeItem;
import com.dk.mdm.model.query.sys.BarcodeItemQuery;
import com.dk.mdm.model.response.sys.BarcodeItemResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class BarcodeItemService extends BaseService<BarcodeItem> {

	@Override
	public BaseMapper<BarcodeItem> getRepository() {
		return barcodeItemMapper;
	}

	@Autowired
	private BarcodeItemMapper barcodeItemMapper;


	/**
	 * @desc : 条件查询
	 * @date : 2023/4/3 13:45
	 * @author : 寇珊珊
	 */
	@Pagination
	public ResponseResultVO<PageList<BarcodeItemResponse>> selectByCond(BarcodeItemQuery barcodeItemQuery) {
		return super.mergeListWithCount(barcodeItemMapper, barcodeItemMapper.selectByCond(barcodeItemQuery), barcodeItemMapper.countByCond(barcodeItemQuery));
	}



}
