油站管理-油类管理+趋势管理

This commit is contained in:
DESKTOP-369JRHT\12997 2023-10-11 18:40:16 +08:00
parent c963066385
commit 676e322c12
12 changed files with 171 additions and 0 deletions

View File

@ -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 OilPresetPricesController extends ApiController {
/**
* 服务对象
*/
@Resource
private OilPresetPricesService oilPresetPricesService;
/**
* 分页查询所有数据
*
* @param page 分页对象
* @return 所有数据
*/
@ApiOperation("查询所有油号")
@GetMapping("getList")
public R selectAll(Page<OilPresetPrices> page, OilPresetPrices oilPresetPrices) {
return success(this.oilPresetPricesService.page(page, new QueryWrapper<>(oilPresetPrices)));
}
/**
* 通过主键查询单条数据
*
* @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 OilPresetPrices oilNumber) {
return success(this.oilPresetPricesService.save(oilNumber));
}
/**
* 修改数据
*
* @param oilNumber 实体对象
* @return 修改结果
*/
@PutMapping
public R update(@RequestBody OilPresetPrices 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));
}
}

View File

@ -0,0 +1,34 @@
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;
import java.util.Date;
/**
* 油号表控制层
*
* @author wangh
* @since 2023-10-11 16:36:02
*/
@Data
public class OilPresetPrices extends Model<OilPresetPrices> {
// /**
// * 获取主键值
// *
// * @return 主键值
// */
// @Override
// protected Serializable pkVal() {
// return this.numberId;
// }
}

View File

@ -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.OilPresetPricesMapper">
</mapper>

View File

@ -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 OilPresetPricesService extends IService<OilPresetPrices> {
}

View File

@ -0,0 +1,22 @@
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;
/**
* (ChainStoreInfo)表服务实现类
*
* @author makejava
* @since 2023-10-11 13:17:02
*/
@Service("OilNumberService")
public class OilPresetPricesServiceImpl extends ServiceImpl<OilPresetPricesMapper, OilPresetPrices> implements OilPresetPricesService {
}