From 676e322c12d733ce3beab84672fa2a12f35f244b Mon Sep 17 00:00:00 2001 From: "DESKTOP-369JRHT\\12997" <9> Date: Wed, 11 Oct 2023 18:40:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=B9=E7=AB=99=E7=AE=A1=E7=90=86-=E6=B2=B9?= =?UTF-8?q?=E7=B1=BB=E7=AE=A1=E7=90=86+=E8=B6=8B=E5=8A=BF=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OilNumberController.java | 0 .../controller/OilPresetPricesController.java | 93 +++++++++++++++++++ .../entity/OilNumber.java | 0 .../entity/OilPresetPrices.java | 34 +++++++ .../mapper/OilNumberMapper.java | 0 .../mapper/OilPresetPricesMapper.java | 0 .../mapper/xml/OilNumberMapper.xml | 0 .../mapper/xml/OilPresetPricesMapper.xml | 6 ++ .../service/OilNumberService.java | 0 .../service/OilPresetPricesService.java | 16 ++++ .../service/impl/OilNumberServiceImpl.java | 0 .../impl/OilPresetPricesServiceImpl.java | 22 +++++ 12 files changed, 171 insertions(+) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPresetPricesController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilNumber.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilPresetPrices.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNumberMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPresetPricesMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNumberService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPresetPricesService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java new file mode 100644 index 000000000..e69de29bb diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPresetPricesController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPresetPricesController.java new file mode 100644 index 000000000..38d6b7482 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPresetPricesController.java @@ -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 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 idList) { + return success(this.oilPresetPricesService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilNumber.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilNumber.java new file mode 100644 index 000000000..e69de29bb diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilPresetPrices.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilPresetPrices.java new file mode 100644 index 000000000..5b4377bd8 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/entity/OilPresetPrices.java @@ -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 { + + +// /** +// * 获取主键值 +// * +// * @return 主键值 +// */ +// @Override +// protected Serializable pkVal() { +// return this.numberId; +// } + + + } + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNumberMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilNumberMapper.java new file mode 100644 index 000000000..e69de29bb diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPresetPricesMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPresetPricesMapper.java new file mode 100644 index 000000000..e69de29bb diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilNumberMapper.xml new file mode 100644 index 000000000..e69de29bb diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml new file mode 100644 index 000000000..92b01769a --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNumberService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilNumberService.java new file mode 100644 index 000000000..e69de29bb diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPresetPricesService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPresetPricesService.java new file mode 100644 index 000000000..c8eb70be7 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPresetPricesService.java @@ -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 { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java new file mode 100644 index 000000000..e69de29bb diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java new file mode 100644 index 000000000..ae5ec5e19 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java @@ -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 implements OilPresetPricesService { + +} +