修改类名i
parent
f9878558bc
commit
e1e4e34891
|
@ -14,11 +14,7 @@ import java.util.Date;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SelFenceResp {
|
||||
/**
|
||||
* 字段属性:围栏主键id
|
||||
*/
|
||||
private Integer fenceId;
|
||||
public class FenceRes {
|
||||
/**
|
||||
* 字段属性:围栏名称
|
||||
*/
|
|
@ -6,7 +6,7 @@ import com.dragon.vehicle.fence.server.mapper.VehicleFenceMapper;
|
|||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.fence.server.service.VehicleFenceService;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceReq;
|
||||
import com.dragon.vehicle.history.domain.common.resp.SelFenceResp;
|
||||
import com.dragon.vehicle.history.domain.common.resp.FenceRes;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class VehicleFenceController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/queryBy/{vin}")
|
||||
public Result<List<SelFenceResp>> queryBy(@PathVariable String vin){
|
||||
public Result<List<FenceRes>> queryBy(@PathVariable String vin){
|
||||
return vehicleFenceService.queryBy(vin);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.dragon.vehicle.fence.server.mapper;
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.history.domain.common.FenceTag;
|
||||
import com.dragon.vehicle.history.domain.common.resp.SelFenceResp;
|
||||
import com.dragon.vehicle.history.domain.common.resp.FenceRes;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -21,5 +21,5 @@ public interface VehicleFenceMapper extends BaseMapper<Fence> {
|
|||
|
||||
List<FenceTag> queryBy(@Param("vin") String vin);
|
||||
|
||||
List<SelFenceResp> selectIdFence(@Param("vin") String vin);
|
||||
List<FenceRes> selectIdFence(@Param("vin") String vin);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.dragon.common.core.domain.Result;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceReq;
|
||||
import com.dragon.vehicle.history.domain.common.resp.SelFenceResp;
|
||||
import com.dragon.vehicle.history.domain.common.resp.FenceRes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -14,5 +14,5 @@ public interface VehicleFenceService extends IService<Fence> {
|
|||
|
||||
Fence updateFence(AddFenceReq addFenceReq);
|
||||
|
||||
Result<List<SelFenceResp>> queryBy(String vin);
|
||||
Result<List<FenceRes>> queryBy(String vin);
|
||||
}
|
||||
|
|
|
@ -7,9 +7,8 @@ import com.dragon.system.common.domain.SysUser;
|
|||
import com.dragon.vehicle.fence.server.mapper.VehicleFenceMapper;
|
||||
import com.dragon.vehicle.history.domain.common.Fence;
|
||||
import com.dragon.vehicle.fence.server.service.VehicleFenceService;
|
||||
import com.dragon.vehicle.history.domain.common.FenceTag;
|
||||
import com.dragon.vehicle.history.domain.common.req.AddFenceReq;
|
||||
import com.dragon.vehicle.history.domain.common.resp.SelFenceResp;
|
||||
import com.dragon.vehicle.history.domain.common.resp.FenceRes;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -45,7 +44,7 @@ public class VehicleFenceServiceImpl extends ServiceImpl<VehicleFenceMapper, Fen
|
|||
}
|
||||
|
||||
@Override
|
||||
public Result<List<SelFenceResp>> queryBy(String vin) {
|
||||
public Result<List<FenceRes>> queryBy(String vin) {
|
||||
// //查询vin下所有的电子围栏标签表
|
||||
// List<FenceTag> fences = vehicleFenceMapper.queryBy(vin);
|
||||
// List<SelFenceResp> fences1 = null;
|
||||
|
@ -53,7 +52,7 @@ public class VehicleFenceServiceImpl extends ServiceImpl<VehicleFenceMapper, Fen
|
|||
// fences1 = vehicleFenceMapper.selectIdFence(fence.getFenceTagId());
|
||||
// }
|
||||
// Result<List<SelFenceResp>> result = Result.success(fences1);
|
||||
List<SelFenceResp> selFenceResps = vehicleFenceMapper.selectIdFence(vin);
|
||||
List<FenceRes> selFenceResps = vehicleFenceMapper.selectIdFence(vin);
|
||||
return Result.success(selFenceResps);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
where
|
||||
c.car_vin = #{vin}
|
||||
</select>
|
||||
<select id="selectIdFence" resultType="com.dragon.vehicle.history.domain.common.resp.SelFenceResp">
|
||||
<select id="selectIdFence" resultType="com.dragon.vehicle.history.domain.common.resp.FenceRes">
|
||||
select fe.* from vehicle_tag v left join car c on v.car_vin = c.car_vin left join fence_tag f on v.fence_tag_id = f.fence_tag_id
|
||||
LEFT JOIN fence fe on fe.fence_tag_id=f.fence_tag_id
|
||||
where c.car_vin=#{vin}
|
||||
|
|
Loading…
Reference in New Issue