燕山石化溯源三维电子沙盘-【后端】-服务
13693261870
2023-04-25 ecd0ef5c6a78ac091b3fc2d42035cd0582c93a3f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
    }
 
}