| | |
| | | return queryWrapper; |
| | | } |
| | | |
| | | /** |
| | | * 通过id查询单条数据 |
| | | * |
| | | * @param id |
| | | * @author sgj |
| | | * @date 2025/12/10 |
| | | */ |
| | | public Patrol selectById(String id) { |
| | | return patrolMapper.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param param |
| | | * @author sgj |
| | | * @date 2025/12/10 |
| | | */ |
| | | public int insertData(Patrol param) { |
| | | if (StringUtils.isEmpty(param.getId())) { |
| | | param.setId(ContextUtil.generateId()); |
| | |
| | | return patrolMapper.insert(param); |
| | | } |
| | | |
| | | /** |
| | | * 更新数据 |
| | | * |
| | | * @param param |
| | | * @author sgj |
| | | * @date 2025/12/10 |
| | | */ |
| | | public int updateData(Patrol param) { |
| | | return patrolMapper.updateById(param); |
| | | } |
| | | |
| | | public void deleteDataById( String ids) { |
| | | /** |
| | | * 通过id删除一条数据 |
| | | * |
| | | * @param ids |
| | | * @author sgj |
| | | * @date 2025/12/10 |
| | | */ |
| | | public void deleteDataById(String ids) { |
| | | String[] recordIds = Convert.toStrArray(ids); |
| | | for (String recordId : recordIds) { |
| | | patrolMapper.deleteById(recordId); |