...
|
...
|
@@ -20,11 +20,15 @@ public class ScoreSknRuleService { |
|
|
return scoreSknRuleMapper.deleteByPrimaryKey(id);
|
|
|
}
|
|
|
|
|
|
public int insert(ScoreSknRule record){
|
|
|
if (scoreSknRuleMapper.selectBySkn(record.getSkn()) != null) {
|
|
|
return 1;
|
|
|
public int insertOrUpdate(ScoreSknRule record){
|
|
|
ScoreSknRule scoreSknRule = scoreSknRuleMapper.selectBySkn(record.getSkn());
|
|
|
if (scoreSknRule == null) {
|
|
|
return scoreSknRuleMapper.insert(record);
|
|
|
}
|
|
|
return scoreSknRuleMapper.insert(record);
|
|
|
scoreSknRule.setUpdateTime(record.getUpdateTime());
|
|
|
scoreSknRuleMapper.updateByPrimaryKey(scoreSknRule);
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
public ScoreSknRule selectById(Integer id){
|
...
|
...
|
|