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

import com.yihu.wlyy.entity.feedback.Appeal;
import com.yihu.wlyy.repository.feedback.AppealDao;
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 AppealService extends BaseService {
    @Autowired
    private AppealDao appealDao;

    public void saveAppeal(String doctor,String description,int type,String images,String phone,int identity) throws Exception{
        Appeal appeal = new Appeal();
        appeal.setCode(getCode());
        appeal.setPhone(phone);
        appeal.setCreater(doctor);
        appeal.setDescription(description);
        appeal.setIdentity(identity);
        appeal.setImages(images);
        appeal.setType(type);
        appealDao.save(appeal);
    }
}
