package com.neusoft.smart.pos.trade.repository;


import com.neusoft.smart.pos.trade.persistent.domain.DiningRoom;
import com.neusoft.smart.pos.trade.persistent.domain.DiningRoomExample;
import com.neusoft.smart.pos.trade.persistent.mapper.DiningRoomMapper;
import lombok.val;
import org.springframework.stereotype.Component;

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


/**
 * @author zcf
 * @date 2018-12-29 09：24
 * @description 交易商户餐厅信息管理使用Repository
 */
@Component
public class DiningRoomRepository {

	@Resource
	private DiningRoomMapper diningRoomMapper;
	
	/**
	 * 餐厅列表信息查询方法
	 * @param orgId：集团编号
	 * @return
	 */
	public List<DiningRoom> queryDiningRoomList(Integer orgId){
		val example = new DiningRoomExample();
		example.createCriteria()
				.andOrgIdEqualTo(orgId);
		example.setOrderByClause("created_at asc");
		return diningRoomMapper.selectByExample(example);
	}
}
