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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.example.fuzzControll.service.impl;
import com.example.fuzzControll.domain.bo.FuzzParams;
import com.example.fuzzControll.mapper.FuzzParamsMapper;
import com.example.fuzzControll.service.FuzzParamsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@Service("FuzzParamsService")
public class FuzzParamsServiceImpl implements FuzzParamsService {
@Autowired
FuzzParamsMapper fuzzParamsMapper;
@Override
public List<FuzzParams> getFuzzParamsList() {
List<FuzzParams> list = null;
try {
list = fuzzParamsMapper.getFuzzParamsList();
} catch (Exception e) {
log.error("FuzzParamsService.getFuzzParamsList error:{}",e.getMessage());
throw new RuntimeException(e);
}
return list;
}
@Override
public FuzzParams getFuzzParamById(int missionId) {
FuzzParams fuzzParams = null;
try {
fuzzParams = fuzzParamsMapper.getFuzzParamsById(missionId);
} catch (Exception e) {
log.error("FuzzParamsService.getFuzzParamById error:{}",e.getMessage());
throw new RuntimeException(e);
}
return fuzzParams;
}
@Override
public boolean saveFuzzParams(FuzzParams fuzzParams) {
return fuzzParamsMapper.saveFuzzParams(fuzzParams);
}
@Override
public boolean editFuzzParams(FuzzParams fuzzParams) {
return fuzzParamsMapper.editFuzzParams(fuzzParams.getId(),fuzzParams.getParams(),fuzzParams.getProtocol());
}
}