提交
This commit is contained in:
@ -172,4 +172,30 @@ public class TbZdxlFgdwController {
|
||||
return ResponseResult.success(tbZdxlFgdwService.getSquarePoints(longitude, latitude, distance));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单条(逻辑删除)
|
||||
* @param id 主键ID
|
||||
* @return ResponseResult 删除结果
|
||||
*/
|
||||
@ApiOperation(value = "删除单条")
|
||||
@DeleteMapping("/{id}")
|
||||
@JwtSysUser
|
||||
@Log(title = "指导巡逻-方格点位接口-删除单条", businessType = BusinessType.DELETE)
|
||||
public ResponseResult<Integer> deleteById(@PathVariable("id") Long id) {
|
||||
return ResponseResult.success(tbZdxlFgdwService.deleteById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除(逻辑删除)
|
||||
* @param ids 主键ID列表
|
||||
* @return ResponseResult 删除结果
|
||||
*/
|
||||
@ApiOperation(value = "批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
@JwtSysUser
|
||||
@Log(title = "指导巡逻-方格点位接口-批量删除", businessType = BusinessType.DELETE)
|
||||
public ResponseResult<Integer> deleteByIds(@RequestParam List<Long> ids) {
|
||||
return ResponseResult.success(tbZdxlFgdwService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import com.mosty.base.model.vo.base.DeptInfoVo;
|
||||
import com.mosty.base.model.vo.yjzl.TbZdxlFgdwVO;
|
||||
import com.mosty.base.utils.PageUtils;
|
||||
import com.mosty.base.utils.QueryWrapperUtils;
|
||||
import com.mosty.base.utils.UUIDGenerator;
|
||||
import com.mosty.yjzl.mapper.TbZdxlFgdwMapper;
|
||||
import com.mosty.yjzl.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.yjzl.service.TbZdxlFgdwService;
|
||||
@ -249,4 +250,25 @@ public class TbZdxlFgdwServiceImpl extends ServiceImpl<TbZdxlFgdwMapper, TbZdxlF
|
||||
return squareMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteById(Long id) {
|
||||
if (ObjectUtils.isEmpty(id)) {
|
||||
return 0;
|
||||
}
|
||||
return this.baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer deleteByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return 0;
|
||||
}
|
||||
int count = 0;
|
||||
for (Long id : ids) {
|
||||
count += this.deleteById(id);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -76,4 +76,18 @@ public interface TbZdxlFgdwService {
|
||||
*/
|
||||
Map<String, BigDecimal> getSquarePoints(double longitude, double latitude, double distance);
|
||||
|
||||
/**
|
||||
* 删除单条(逻辑删除)
|
||||
* @param id 主键ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
Integer deleteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除(逻辑删除)
|
||||
* @param ids 主键ID列表
|
||||
* @return 删除结果
|
||||
*/
|
||||
Integer deleteByIds(List<Long> ids);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user