package com.yihu.wlyy.service.app.feedback;

import com.yihu.wlyy.entity.feedback.Feedback;
import com.yihu.wlyy.repository.feedback.FeedbackDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Reece on 2017/5/6.
 */
@Service
@Transactional
public class FeedbackService extends BaseService {
    @Autowired
    private FeedbackDao feedbackDao;

    public void saveFeedback(String doctor,String description,int type,String images,String contact,int idetity) throws Exception{
        Feedback feedback = new Feedback();
        feedback.setCode(getCode());
        feedback.setContact(contact);
        feedback.setCreater(doctor);
        feedback.setDescription(description);
        feedback.setIdentity(idetity);
        feedback.setImages(images);
        feedback.setType(type);
        feedbackDao.save(feedback);
    }

}
