package com.yssh.service; import com.yssh.entity.FeedbackDetail; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.yssh.mapper.FeedbackMapper; import com.yssh.mapper.SuYuanMapper; import javax.annotation.Resource; @Service public class FeedbackService { @Resource private FeedbackMapper feedbackMapper; @Resource private SuYuanMapper suYuanMapper; @Transactional public int suYuanFeedback(Long id, String practicalId, String practicalVocsName, double practicalValue) { FeedbackDetail feedback = feedbackMapper.selectById(id); int i = suYuanMapper.update(feedback.getTableName(), practicalId, String.valueOf(practicalValue)); FeedbackDetail feedbackDetail = new FeedbackDetail(); feedbackDetail.setId(id); feedbackDetail.setPracticalId(practicalId); feedbackDetail.setPracticalVocsName(practicalVocsName); feedbackDetail.setPracticalValue(practicalValue); return feedbackMapper.update(feedbackDetail) + i; } }