| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public Integer addController(PrController po) { |
| | | return prControllerMapper.insert(po); |
| | | } |
| | | |
| | | /** |
| | | * 根据控制器编号获取控制器列表 |
| | | * @param controllerCode |
| | | * @return |
| | | */ |
| | | public List<Map<String, Object>> getControllersByCode(String controllerCode) { |
| | | return prControllerMapper.getControllersByCode(controllerCode); |
| | | } |
| | | |
| | | /** |
| | | * 根据控制器编号逻辑删除控制 |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | public Integer deleteControllerById(Long controllerId) { |
| | | return prControllerMapper.deleteControllerById(controllerId); |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件导出控制器列表 |
| | | * @param queryVo |
| | | * @return |
| | | */ |
| | | public List<VoController> export(QueryVo queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | List<VoController> rsVo = new ArrayList<>(); |
| | | rsVo = prControllerMapper.getControllers(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | public Integer getRecordCountOfController(Long controllerId) { |
| | | return prControllerMapper.getRecordCountOfController(controllerId); |
| | | } |
| | | } |