package cn.com.countrygarden.bi.main.service.manager.map.impl;

import cn.com.countrygarden.bi.main.core.Response;
import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.model.bd_psndoc;
import cn.com.countrygarden.bi.main.service.manager.map.ManagerMapDetailedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Condition;
import tk.mybatis.mapper.entity.Example;
import cn.com.countrygarden.bi.main.dao.performance.bdpsndocMapper;

@Service
public class ManagerMapDetailedServiceImpl implements ManagerMapDetailedService {
	@Autowired
	private bdpsndocMapper bdpsndocMapper;
	
	@Override
	public Result queryById(Integer id) {
		Condition condition = new Condition(bd_psndoc.class);
		condition.excludeProperties("PHOTO","PREVIEWPHOTO");
		Example.Criteria criteria = condition.createCriteria();
//		criteria.andEqualTo(id);
		criteria.andEqualTo("BID",id);
		return Response.response(bdpsndocMapper.selectByCondition(condition).get(0));
	}
	
	
}
