TdCMsgTemplateServiceImpl.java 1.12 KB
package com.zteits.pay.biz;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;

import com.zteits.clouds.api.apibase.bean.BizResult;
import com.zteits.clouds.api.dto.pay.TdCMsgTemplateDTO;
import com.zteits.clouds.api.dto.pay.param.TdCMsgTemplateRequest;
import com.zteits.clouds.api.service.pay.TdCMsgTemplateService;
import com.zteits.pay.dao.TdCMsgTemplateDao;
import com.zteits.pay.domain.TdCMsgTemplate;
import org.springframework.stereotype.Service;

@Service("com.zteits.pay.biz.TdCMsgTemplateServiceImpl")
public class TdCMsgTemplateServiceImpl implements TdCMsgTemplateService{
	@Autowired
	private TdCMsgTemplateDao tdCMsgTemplateDao;
	@Override
	public BizResult<TdCMsgTemplateDTO> queryMsgTempleteByTempleteId(TdCMsgTemplateRequest request) {
		TdCMsgTemplateDTO tdCMsgTemplateDTO = new TdCMsgTemplateDTO();
		TdCMsgTemplate tdCMsgTemplate = tdCMsgTemplateDao.queryMsgTempleteByTempleteId(request.getTemplateId());
		if(tdCMsgTemplate !=null){
			BeanUtils.copyProperties(tdCMsgTemplate, tdCMsgTemplateDTO);
		}
		return new BizResult<TdCMsgTemplateDTO>(tdCMsgTemplateDTO);
	}

}