| | |
| | | package com.xiaopeng.operation.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.xiaopeng.operation.mapper.XpSystemSettingMapper; |
| | | import com.xiaopeng.api.model.operation.XpSystemSetting; |
| | | import com.xiaopeng.operation.service.XpSystemSettingService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void saveSystemSetting(XpSystemSetting xpSystemSetting) { |
| | | saveOrUpdate(xpSystemSetting); |
| | | if (Objects.nonNull(xpSystemSetting.getId())) { |
| | | update(xpSystemSetting, new LambdaQueryWrapper<XpSystemSetting>().eq(XpSystemSetting::getId, xpSystemSetting.getId())); |
| | | } else { |
| | | save(xpSystemSetting); |
| | | } |
| | | } |
| | | } |