45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
|
|
package com.whdc.service.impl;
|
||
|
|
|
||
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||
|
|
import com.whdc.mapper.ERuleMapper;
|
||
|
|
import com.whdc.model.dto.FindRuleDto;
|
||
|
|
import com.whdc.model.entity.ERule;
|
||
|
|
import com.whdc.service.IERuleService;
|
||
|
|
import com.whdc.service.IEStationRulesService;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* <p>
|
||
|
|
* 服务实现类
|
||
|
|
* </p>
|
||
|
|
*
|
||
|
|
* @author xusan
|
||
|
|
* @since 2023-03-19
|
||
|
|
*/
|
||
|
|
@Service
|
||
|
|
public class ERuleServiceImpl extends ServiceImpl<ERuleMapper, ERule> implements IERuleService {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private IEStationRulesService ieStationRulesService;
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public IPage<ERule> page(FindRuleDto findDto) {
|
||
|
|
return baseMapper.page(findDto.getPage(), findDto);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public boolean updateById(ERule model){
|
||
|
|
|
||
|
|
boolean update = super.updateById(model);
|
||
|
|
if (update){
|
||
|
|
ieStationRulesService.delRule(model.getId());
|
||
|
|
}
|
||
|
|
|
||
|
|
return update;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|