修改因提交代码时丢掉代码的错误
This commit is contained in:
parent
212e2d5cca
commit
0fdf41abb6
@ -0,0 +1,93 @@
|
||||
package com.fuint.business.petrolStationManagement.controller;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.api.ApiController;
|
||||
import com.baomidou.mybatisplus.extension.api.R;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPresetPrices;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNumberService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilPresetPricesService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 油号表控制层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2023-10-11 16:36:02
|
||||
*/
|
||||
@Api(tags="油站管理-油号管理")
|
||||
@RestController
|
||||
@RequestMapping("/business/petrolStationManagement/oilNumber")
|
||||
public class OilNumberController extends ApiController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private OilNumberService oilPresetPricesService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @return 所有数据
|
||||
*/
|
||||
@ApiOperation("查询所有油号")
|
||||
@GetMapping("getList")
|
||||
public R selectAll(Page<OilNumber> page, OilNumber oilNumber) {
|
||||
return success(this.oilPresetPricesService.page(page, new QueryWrapper<>(oilNumber)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public R selectOne(@PathVariable Serializable id) {
|
||||
return success(this.oilPresetPricesService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param oilNumber 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public R insert(@RequestBody OilNumber oilNumber) {
|
||||
return success(this.oilPresetPricesService.save(oilNumber));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param oilNumber 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
public R update(@RequestBody OilNumber oilNumber) {
|
||||
return success(this.oilPresetPricesService.updateById(oilNumber));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键结合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
public R delete(@RequestParam("idList") List<Long> idList) {
|
||||
return success(this.oilPresetPricesService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.fuint.business.petrolStationManagement.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 油号表控制层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2023-10-11 16:36:02
|
||||
*/
|
||||
@Data
|
||||
public class OilNumber extends Model<OilNumber> {
|
||||
public Long numberId;
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
package com.fuint.business.petrolStationManagement.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.fuint.business.petrolStationManagement.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNumberService;
|
||||
|
||||
/**
|
||||
* (ChainStoreInfo)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-11 13:17:02
|
||||
*/
|
||||
public interface OilNumberMapper extends BaseMapper<OilNumber> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.fuint.business.petrolStationManagement.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPresetPrices;
|
||||
|
||||
/**
|
||||
* (ChainStoreInfo)表数据库访问层
|
||||
*
|
||||
* @since 2023-10-11 13:17:02
|
||||
*/
|
||||
public interface OilPresetPricesMapper extends BaseMapper<OilPresetPrices> {
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<?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.petrolStationManagement.mapper.OilNumberMapper">
|
||||
</mapper>
|
@ -3,4 +3,4 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.petrolStationManagement.mapper.OilPresetPricesMapper">
|
||||
</mapper>
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
package com.fuint.business.petrolStationManagement.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPresetPrices;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-11 13:17:02
|
||||
*/
|
||||
public interface OilNumberService extends IService<OilNumber> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.fuint.business.petrolStationManagement.service.impl;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilNumberMapper;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNumberService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (ChainStoreInfo)表服务实现类
|
||||
*
|
||||
* @author
|
||||
* @since 2023-10-11 13:17:02
|
||||
*/
|
||||
@Service("OilNumberService")
|
||||
public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber> implements OilNumberService {
|
||||
|
||||
}
|
@ -1,11 +1,8 @@
|
||||
package com.fuint.business.petrolStationManagement.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPresetPrices;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilNumberMapper;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilPresetPricesMapper;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNumberService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilPresetPricesService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -19,4 +16,3 @@ import org.springframework.stereotype.Service;
|
||||
public class OilPresetPricesServiceImpl extends ServiceImpl<OilPresetPricesMapper, OilPresetPrices> implements OilPresetPricesService {
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user