package com.neusoft.smart.pos.device.persistent.repository;

import com.neusoft.smart.pos.device.persistent.domain.AppProjectConfig;
import com.neusoft.smart.pos.device.persistent.domain.AppProjectConfigExample;
import com.neusoft.smart.pos.device.persistent.mapper.AppProjectConfigMapper;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AppProjectConfigRepository {
	
	@Autowired
	private AppProjectConfigMapper appProjectConfigMapper;
	
	public AppProjectConfig queryAppProjectConfig(String sn, String appId) {
		AppProjectConfigExample example = new AppProjectConfigExample();
		example.createCriteria().andSerialNoEqualTo(sn).andAppIdEqualTo(appId);
		val appProjectConfigList = appProjectConfigMapper.selectByExampleWithBLOBs(example);
		return appProjectConfigList.size()>0?appProjectConfigList.get(0):null;
	}
	
}
