package market.Qms.com.service.impl;

import java.util.List;

import market.Qms.com.mapper.BaseChemMapper;
import market.Qms.com.service.BaseChemService;
import market.Qms.com.vo.BaseChem;
import market.Qms.common.ReturnMsg;

import com.hnshituo.basic.service.impl.BaseServiceImpl;
import com.hnshituo.basic.spring.remoting.annotation.RemoteService;

@RemoteService(serviceInterface=BaseChemService.class)
public class BaseChemServiceImpl extends BaseServiceImpl<BaseChem, String> implements BaseChemService {

	@Override
	public ReturnMsg<List<BaseChem>> GetValidChem() {
		// TODO Auto-generated method stub
		ReturnMsg<List<BaseChem>> msg=new ReturnMsg<>();
		try{
			BaseChem chem=new BaseChem();
			chem.setValidflag("1");
			List<BaseChem> list=this.getMapper(BaseChemMapper.class).find(chem, 0, 0);
			msg.setResult(list);
			msg.setSuccess(true);
			msg.setMessage("获取数据成功");
		}catch(Exception ex){
			msg.setMessage(ex.getMessage());
			msg.setSuccess(false);
		}
		return msg;
	}
}
