Merge pull request 'feat():优化' (#27) from dev.saas.yp into dev.saas

Reviewed-on: #27
dev.saas
yangpeng 2024-09-30 14:36:40 +08:00
commit eef2467a61
3 changed files with 2 additions and 40 deletions

View File

@ -77,19 +77,10 @@ public class MiddleController {
@Operation(summary = "根据围栏组的id查询绑定的围栏的中间表",description = "根据围栏组的id查询绑定的围栏的中间表") @Operation(summary = "根据围栏组的id查询绑定的围栏的中间表",description = "根据围栏组的id查询绑定的围栏的中间表")
public Result BoundFenceGroup(@RequestParam("groupId") Integer groupId){ public Result BoundFenceGroup(@RequestParam("groupId") Integer groupId){
carFenceServiceMybaits.BoundFenceGroup(groupId); carFenceServiceMybaits.BoundFenceGroup(groupId);
carFenceServiceMybaits.list(groupId);
return Result.success(); return Result.success();
} }
// /**
// * 根据围栏组和车辆的id添加中间表
// */
// @PostMapping("/addFenceGroupAddCarMiddle")
// @Operation(summary = "根据围栏组和车辆的id添加中间表",description = "根据围栏组和车辆的id添加中间表")
// public Result addFenceGroupAddCarMiddle(@RequestParam("carId") Integer carId , @RequestBody List<FenceGroup> fenceGroups ){
// boolean b = carFenceServiceMybaits.addFenceGroupAddCarMiddle(carId,fenceGroups);
// return Result.success();
// }
/** /**
* *

View File

@ -46,12 +46,8 @@ public interface CarFenceServiceMybaits extends IService<CarMiddle> {
* id * id
*/ */
List<CarFence> BoundFenceGroup(Integer groupId); List<CarFence> BoundFenceGroup(Integer groupId);
void list(Integer groupId);
// /**
// * 根据围栏组和车辆的id添加中间表
// */
// boolean addFenceGroupAddCarMiddle(Integer id, List<FenceGroup> fenceGroups);
/** /**
* *

View File

@ -96,34 +96,9 @@ public class CarFenceServiceMybaitsImpl extends ServiceImpl<CarFenceServiceMybai
return carFences; return carFences;
} }
@Override
public void list(Integer groupId) {
CarMiddle carMiddle = carFenceServiceMybaitsMapper.selectById(groupId);
Integer carFenceId = carMiddle.getCarFenceId();
System.out.println(carFenceId);
}
// /**
// * 根据围栏组和车辆的id添加中间表
// */
// @Override
// public boolean addFenceGroupAddCarMiddle(Integer id, List<FenceGroup> fenceGroups) {
// //遍历集合
// List<CarAndGroupMiddle> list = fenceGroups.stream().map(fenceGroup -> {
// CarAndGroupMiddle carAndGroupMiddle = new CarAndGroupMiddle();
// //获取围栏组的id
// carAndGroupMiddle.setGroupId(fenceGroup.getGroupId());
// carAndGroupMiddle.setCarId(id);
// return carAndGroupMiddle;
// }).toList();
//
//
// return true;
// }
/** /**
* *