查询车辆故障表信息列表
parent
695e825d70
commit
f0eca2995b
|
@ -1,27 +0,0 @@
|
|||
package com.february.fault.controller;/**
|
||||
* @program: february-fault-information
|
||||
* @description: 故障警告
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 09:28
|
||||
**/
|
||||
|
||||
/**
|
||||
* @description: 故障警告
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 09:28
|
||||
**/
|
||||
|
||||
import com.february.common.core.domain.Result;
|
||||
import com.february.fault.domain.FaultAlarm;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障警告
|
||||
*/
|
||||
@RestController
|
||||
public class FaultAlarmController {
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.february.fault.controller;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description: 车辆故障码控制层
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 14:48
|
||||
**/
|
||||
|
||||
import com.february.common.core.domain.Result;
|
||||
import com.february.fault.domain.FaultCode;
|
||||
import com.february.fault.service.FaultCodeService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆故障码控制层
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/faultCode")
|
||||
public class FaultCodeController {
|
||||
@Autowired
|
||||
private FaultCodeService faultCodeService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
|
||||
/**
|
||||
* 查询车辆故障表信息列表
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Result<List<FaultCode>> faultCodeList(){
|
||||
log.info("功能名称:车辆故障码列表,请求路径:{},请求方式:{}",request.getRequestURI(),request.getMethod());
|
||||
Result<List<FaultCode>> result=faultCodeService.faultCodeList();
|
||||
log.info("响应结果:{}",result);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.february.fault.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.february.fault.domain.FaultCode;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description:
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 14:52
|
||||
**/
|
||||
public interface FaultCodeMapper extends BaseMapper<FaultCode> {
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.february.fault.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.february.common.core.domain.Result;
|
||||
import com.february.fault.domain.FaultCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description:
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 14:51
|
||||
**/
|
||||
public interface FaultCodeService extends IService<FaultCode> {
|
||||
|
||||
Result<List<FaultCode>> faultCodeList();
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.february.fault.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.february.common.core.domain.Result;
|
||||
import com.february.fault.domain.FaultCode;
|
||||
import com.february.fault.mapper.FaultCodeMapper;
|
||||
import com.february.fault.service.FaultCodeService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @program: february-fault-information
|
||||
* @description:
|
||||
* @author: Mr.Wang
|
||||
* @create: 2023-11-21 14:52
|
||||
**/
|
||||
@Log4j2
|
||||
@Service
|
||||
public class FaultCodeServiceImpl extends ServiceImpl<FaultCodeMapper, FaultCode> implements FaultCodeService {
|
||||
@Autowired
|
||||
private FaultCodeMapper faultCodeMapper;
|
||||
@Override
|
||||
public Result<List<FaultCode>> faultCodeList() {
|
||||
QueryWrapper<FaultCode> faultCodeQueryWrapper = new QueryWrapper<>();
|
||||
List<FaultCode> faultCodes = faultCodeMapper.selectList(faultCodeQueryWrapper);
|
||||
return Result.success(faultCodes);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue