bug
This commit is contained in:
parent
791a71899b
commit
70021a9843
@ -0,0 +1,87 @@
|
||||
package com.fuint.business.deviceManage.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deviceManage.entity.OilEngineConfig;
|
||||
import com.fuint.business.deviceManage.service.OilEngineConfigService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilEngineConfig)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("oilEngineConfig")
|
||||
public class OilEngineConfigController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private OilEngineConfigService oilEngineConfigService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param oilEngineConfig
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(OilEngineConfig oilEngineConfig,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(oilEngineConfigService.queryPage(page,oilEngineConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(oilEngineConfigService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param oilEngineConfig 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody OilEngineConfig oilEngineConfig) {
|
||||
return getSuccessResult(oilEngineConfigService.insert(oilEngineConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param oilEngineConfig 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody OilEngineConfig oilEngineConfig) {
|
||||
return getSuccessResult(oilEngineConfigService.update(oilEngineConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(oilEngineConfigService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
package com.fuint.business.deviceManage.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilEngineConfig)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:07
|
||||
*/
|
||||
@Data
|
||||
@TableName("oil_engine_config")
|
||||
@ApiModel(value = "OilEngineConfig", description = "油机汽机配置")
|
||||
public class OilEngineConfig extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 设备类型: 选项为BY、DD、LY
|
||||
*/
|
||||
private String deviceType;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.fuint.business.deviceManage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deviceManage.entity.OilEngineConfig;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilEngineConfig)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:07
|
||||
*/
|
||||
public interface OilEngineConfigMapper extends BaseMapper<OilEngineConfig> {
|
||||
|
||||
/**
|
||||
* 分页查询订单信息
|
||||
* @param page
|
||||
* @param oilEngineConfig
|
||||
* @return
|
||||
*/
|
||||
IPage<OilEngineConfig> queryPage(Page page, @Param("entity") OilEngineConfig oilEngineConfig);
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.deviceManage.mapper.OilEngineConfigMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.deviceManage.entity.OilEngineConfig">
|
||||
SELECT * FROM oil_engine_config
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.fuint.business.deviceManage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deviceManage.entity.OilEngineConfig;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilEngineConfig)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:09
|
||||
*/
|
||||
public interface OilEngineConfigService {
|
||||
|
||||
/**
|
||||
* 分页查询订单信息
|
||||
* @param page
|
||||
* @param oilEngineConfig
|
||||
* @return
|
||||
*/
|
||||
IPage<OilEngineConfig> queryPage(Page page,OilEngineConfig oilEngineConfig);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
OilEngineConfig queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param oilEngineConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(OilEngineConfig oilEngineConfig);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param oilEngineConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(OilEngineConfig oilEngineConfig);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.fuint.business.deviceManage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.deviceManage.entity.OilEngineConfig;
|
||||
import com.fuint.business.deviceManage.mapper.OilEngineConfigMapper;
|
||||
import com.fuint.business.deviceManage.service.OilEngineConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilEngineConfig)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:09
|
||||
*/
|
||||
@Service("oilEngineConfigService")
|
||||
public class OilEngineConfigServiceImpl extends ServiceImpl<OilEngineConfigMapper,OilEngineConfig> implements OilEngineConfigService {
|
||||
|
||||
@Override
|
||||
public IPage<OilEngineConfig> queryPage(Page page, OilEngineConfig oilEngineConfig) {
|
||||
return baseMapper.queryPage(page,oilEngineConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public OilEngineConfig queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param oilEngineConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(OilEngineConfig oilEngineConfig) {
|
||||
return baseMapper.insert(oilEngineConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param oilEngineConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(OilEngineConfig oilEngineConfig) {
|
||||
return baseMapper.updateById(oilEngineConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user