|
@@ -17,6 +17,7 @@ import com.chelvc.framework.common.model.Pagination;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
@@ -55,7 +56,8 @@ public class ProfitRatioConfigServiceImpl extends ServiceImpl<ProfitRatioConfigM
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void delete(Long id) {
|
|
|
+ @Transactional
|
|
|
+ public void delete(Long id, Long userId) {
|
|
|
ProfitRatioConfig profitRatioConfig = baseMapper.selectById(id);
|
|
|
if(profitRatioConfig == null){
|
|
|
throw new ResourceUnavailableException("参数错误");
|
|
@@ -64,6 +66,9 @@ public class ProfitRatioConfigServiceImpl extends ServiceImpl<ProfitRatioConfigM
|
|
|
if(status == 0){
|
|
|
throw new ResourceUnavailableException("请先停用该配置");
|
|
|
}
|
|
|
+ profitRatioConfig.setUpdater(userId);
|
|
|
+ profitRatioConfig.setUpdateTime(new Date());
|
|
|
+ baseMapper.update(profitRatioConfig, null);
|
|
|
baseMapper.deleteById(id);
|
|
|
}
|
|
|
|