package com.yssh.service.impl;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import com.yssh.dao.FeedbackMapper;
|
import com.yssh.dao.SuYuanMapper;
|
import com.yssh.entity.FeedbackDetail;
|
import com.yssh.service.IFeedbackService;
|
|
@Service
|
public class FeedbackServiceImpl implements IFeedbackService {
|
|
@Autowired
|
private FeedbackMapper feedbackMapper;
|
|
@Autowired
|
private SuYuanMapper suYuanMapper;
|
|
@Override
|
@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;
|
}
|
|
}
|