燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2024-11-20 8185e5cdc2bbdf7fb4ca46a10864106893a01ed3
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
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;
    }
}