车辆列表更新

master
one 2023-12-05 19:42:41 +08:00
parent 93d3f030b4
commit 4fbc46febb
5 changed files with 10 additions and 17 deletions

View File

@ -55,7 +55,7 @@ public class CarController extends BaseController {
/**
*
*/
@GetMapping("carList/{userId}")
@GetMapping("/carList/{userId}")
public Result<?> carList(@PathVariable String userId){
log.info("功能介绍车辆信息列表查看,请求方式:{},请求路径:{},请求参数:{}",
@ -71,7 +71,7 @@ public class CarController extends BaseController {
request.getRequestURL(),
JSONObject.toJSONString(carList));
return Result.success(carList);
return carList;
}

View File

@ -1,18 +1,18 @@
package com.god.base.server.controller;
import com.god.base.domain.request.GetTopicReq;
import com.god.base.server.service.TopLineService;
import com.god.base.server.service.impl.TopLineServiceImpl;
import com.god.common.core.domain.Result;
import com.god.common.log.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 线
* @description: 线
* @Author fst
* @date 2023/11/28 23:38
*/
@ -33,11 +33,4 @@ public class TopLineController {
String topic = topLineService.getTopic(getTopicReq);
return Result.success(topic);
}
@GetMapping("getCarVinList")
@Log(title = "获取车辆vin列表")
public Result<List<String>> getCarVinList(){
List<String> carVinList = topLineService.getCarVinList();
return Result.success();
}
}

View File

@ -32,8 +32,8 @@ public interface CarMapper extends BaseMapper<Car> {
"FROM\n" +
"\tt_car\n" +
"\tJOIN t_fence ON t_car.fence_id = t_fence.fence_id\n" +
"\tJOIN t_car_type ON t_car.car_type_id = t_car_type.id where t_car.user_id = #{userId1}")
List<Car> getList(@Param("userId1") int userId);
"\tJOIN t_car_type ON t_car.car_type_id = t_car_type.id where t_car.user_id = #{userId}")
List<Car> getList(@Param("userId") int userId);
// @Select("select * from t_car where 1=1 " +
// "<if test=\"carVinId != null and carVinId != ''\"> and car_vin_id = #{carVinId}</if>" +

View File

@ -44,8 +44,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements CarSe
// if (null == userId1){
// throw new SecurityException("请先登录");
// }
int userId1 = 1;
List<Car> carList = carMapper.getList(userId1);
List<Car> carList = carMapper.getList(Integer.parseInt(userId));
return Result.success(carList);
}

View File

@ -29,11 +29,12 @@ import java.util.Set;
@Log4j2
public class CarFenceMonitor {
@Autowired
private CarService carService;
@Autowired
private FenceService fenceService;
@Autowired
private RedisService redisService;