From 245b425a9e81e626256e0add18c39f3549b6eb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Wed, 1 Nov 2023 13:59:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=82=A8=E5=80=BC=E5=8D=A1=E3=80=81=E7=A4=BC?= =?UTF-8?q?=E5=93=81=E5=8D=A1=E3=80=81=E5=9B=A4=E6=B2=B9=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CardFuelDieselController.java | 92 +++++ .../CardFuelGasolineController.java | 93 +++++ .../cardFule/entity/CardFuelDiesel.java | 211 ++++++++++++ .../cardFule/entity/CardFuelGasoline.java | 212 ++++++++++++ .../cardFule/mapper/CardFuelDieselMapper.java | 15 + .../mapper/CardFuelGasolineMapper.java | 16 + .../service/CardFuelDieselService.java | 15 + .../service/CardFuelGasolineService.java | 16 + .../impl/CardFuelDieselServiceImpl.java | 19 ++ .../impl/CardFuelGasolineServiceImpl.java | 20 ++ .../controller/CardGiftController.java | 101 ++++++ .../cardGift/entity/CardGift.java | 180 ++++++++++ .../cardGift/mapper/CardGiftMapper.java | 19 ++ .../cardGift/mapper/xml/CardGiftMapper.xml | 34 ++ .../cardGift/service/CardGiftService.java | 31 ++ .../service/impl/CardGiftServiceImpl.java | 86 +++++ .../controller/CardValueController.java | 103 ++++++ .../controller/CardValueRecordController.java | 95 ++++++ .../cardValue/entity/CardValue.java | 321 ++++++++++++++++++ .../cardValue/entity/CardValueRecord.java | 271 +++++++++++++++ .../cardValue/mapper/CardValueMapper.java | 15 + .../mapper/CardValueRecordMapper.java | 15 + .../service/CardValueRecordService.java | 23 ++ .../cardValue/service/CardValueService.java | 15 + .../impl/CardValueRecordServiceImpl.java | 28 ++ .../service/impl/CardValueServiceImpl.java | 19 ++ .../controller/OilDepotConfigController.java | 92 +++++ .../entity/OilDepotConfig.java | 110 ++++++ .../mapper/OilDepotConfigMapper.java | 15 + .../service/OilDepotConfigService.java | 15 + .../impl/OilDepotConfigServiceImpl.java | 19 ++ .../controller/TerminalStationController.java | 85 +++++ .../member/mapper/TerminalStaffMapper.java | 67 ++++ .../member/mapper/xml/TerminalStaffMapper.xml | 158 +++++++++ .../member/service/TerminalStaffService.java | 53 +++ .../impl/TerminalStaffServiceImpl.java | 90 +++++ 36 files changed, 2769 insertions(+) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelGasolineController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelDiesel.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelGasoline.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelDieselMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelGasolineMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelDieselService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelGasolineService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelGasolineServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/CardGiftMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/xml/CardGiftMapper.xml create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/CardGiftService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueRecordMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/controller/OilDepotConfigController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/entity/OilDepotConfig.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/mapper/OilDepotConfigMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/OilDepotConfigService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/impl/OilDepotConfigServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/controller/TerminalStationController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/TerminalStaffMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/xml/TerminalStaffMapper.xml create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/TerminalStaffService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/impl/TerminalStaffServiceImpl.java diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java new file mode 100644 index 000000000..b38722d2e --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java @@ -0,0 +1,92 @@ +package com.fuint.business.marketingActivity.cardFule.controller; + + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel; +import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 柴油屯油卡(CardFuelDiesel)表控制层 + * + * @author makejava + * @since 2023-10-31 13:54:26 + */ +@RestController +@RequestMapping("business/marketingActivity/cardFuelDiesel") +public class CardFuelDieselController extends BaseController { + /** + * 服务对象 + */ + @Resource + private CardFuelDieselService cardFuelDieselService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param cardFuelDiesel + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("cardFuelDiesel") CardFuelDiesel cardFuelDiesel) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.cardFuelDieselService.page(page, new QueryWrapper<>(cardFuelDiesel))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.cardFuelDieselService.getById(id)); + } + + /** + * 新增数据 + * + * @param cardFuelDiesel 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody CardFuelDiesel cardFuelDiesel) { + return getSuccessResult(this.cardFuelDieselService.save(cardFuelDiesel)); + } + + /** + * 修改数据 + * + * @param cardFuelDiesel 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody CardFuelDiesel cardFuelDiesel) { + return getSuccessResult(this.cardFuelDieselService.updateById(cardFuelDiesel)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.cardFuelDieselService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelGasolineController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelGasolineController.java new file mode 100644 index 000000000..e61ef8872 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelGasolineController.java @@ -0,0 +1,93 @@ +package com.fuint.business.marketingActivity.cardFule.controller; + + + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelGasoline; +import com.fuint.business.marketingActivity.cardFule.service.CardFuelGasolineService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 汽油屯油卡(CardFuelGasoline)表控制层 + * + * @author makejava + * @since 2023-10-31 13:55:05 + */ +@RestController +@RequestMapping("business/marketingActivity/cardFuelGasoline") +public class CardFuelGasolineController extends BaseController { + /** + * 服务对象 + */ + @Resource + private CardFuelGasolineService cardFuelGasolineService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param cardFuelGasoline + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("cardFuelGasoline") CardFuelGasoline cardFuelGasoline) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.cardFuelGasolineService.page(page, new QueryWrapper<>(cardFuelGasoline))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.cardFuelGasolineService.getById(id)); + } + + /** + * 新增数据 + * + * @param cardFuelGasoline 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody CardFuelGasoline cardFuelGasoline) { + return getSuccessResult(this.cardFuelGasolineService.save(cardFuelGasoline)); + } + + /** + * 修改数据 + * + * @param cardFuelGasoline 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody CardFuelGasoline cardFuelGasoline) { + return getSuccessResult(this.cardFuelGasolineService.updateById(cardFuelGasoline)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.cardFuelGasolineService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelDiesel.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelDiesel.java new file mode 100644 index 000000000..f5e90b227 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelDiesel.java @@ -0,0 +1,211 @@ +package com.fuint.business.marketingActivity.cardFule.entity; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 柴油屯油卡(CardFuelDiesel)表实体类 + * + * @author makejava + * @since 2023-10-31 13:54:27 + */ +@SuppressWarnings("serial") +public class CardFuelDiesel extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //储值卡状态 1:在用 2:挂失 3:停用 + private String status; + //油品类型:0:0# 1:-10# 2:京0# + private String oilType; + //锁价单价 + private Double lockupPrice; + //充值金额 + private Double rechargeBalance; + //所得升数 + private Double incomeLitres; + //赠送积分 + private Integer points; + //活动时间 1:不限时间 2:自定义时间 + private String activeTime; + //活动开始时间 + private Date startTime; + //活动结束时间 + private Date endTime; + //活动进度 + private String activityProgress; + //活动状态 1:启用 2:禁用 + private String activeStatus; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getOilType() { + return oilType; + } + + public void setOilType(String oilType) { + this.oilType = oilType; + } + + public Double getLockupPrice() { + return lockupPrice; + } + + public void setLockupPrice(Double lockupPrice) { + this.lockupPrice = lockupPrice; + } + + public Double getRechargeBalance() { + return rechargeBalance; + } + + public void setRechargeBalance(Double rechargeBalance) { + this.rechargeBalance = rechargeBalance; + } + + public Double getIncomeLitres() { + return incomeLitres; + } + + public void setIncomeLitres(Double incomeLitres) { + this.incomeLitres = incomeLitres; + } + + public Integer getPoints() { + return points; + } + + public void setPoints(Integer points) { + this.points = points; + } + + public String getActiveTime() { + return activeTime; + } + + public void setActiveTime(String activeTime) { + this.activeTime = activeTime; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public String getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(String activeStatus) { + this.activeStatus = activeStatus; + } + + public String getActivityProgress() { + return activityProgress; + } + + public void setActivityProgress(String activityProgress) { + this.activityProgress = activityProgress; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelGasoline.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelGasoline.java new file mode 100644 index 000000000..bbdb52865 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelGasoline.java @@ -0,0 +1,212 @@ +package com.fuint.business.marketingActivity.cardFule.entity; + + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 汽油屯油卡(CardFuelGasoline)表实体类 + * + * @author makejava + * @since 2023-10-31 13:55:06 + */ +@SuppressWarnings("serial") +public class CardFuelGasoline extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //储值卡状态 1:在用 2:挂失 3:停用 + private String status; + //油品类型:0:92# 1:95# 2:98# 3:京92# 4:京95# + private String oilType; + //锁价单价 + private Double lockupPrice; + //充值金额 + private Double rechargeBalance; + //所得升数 + private Double incomeLitres; + //赠送积分 + private Integer points; + //活动时间 1:不限时间 2:自定义时间 + private String activeTime; + //活动开始时间 + private Date startTime; + //活动结束时间 + private Date endTime; + //活动进度 + private String activityProgress; + //活动状态 1:启用 2:禁用 + private String activeStatus; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getOilType() { + return oilType; + } + + public void setOilType(String oilType) { + this.oilType = oilType; + } + + public Double getLockupPrice() { + return lockupPrice; + } + + public void setLockupPrice(Double lockupPrice) { + this.lockupPrice = lockupPrice; + } + + public Double getRechargeBalance() { + return rechargeBalance; + } + + public void setRechargeBalance(Double rechargeBalance) { + this.rechargeBalance = rechargeBalance; + } + + public Double getIncomeLitres() { + return incomeLitres; + } + + public void setIncomeLitres(Double incomeLitres) { + this.incomeLitres = incomeLitres; + } + + public Integer getPoints() { + return points; + } + + public void setPoints(Integer points) { + this.points = points; + } + + public String getActiveTime() { + return activeTime; + } + + public void setActiveTime(String activeTime) { + this.activeTime = activeTime; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public String getActivityProgress() { + return activityProgress; + } + + public void setActivityProgress(String activityProgress) { + this.activityProgress = activityProgress; + } + + public String getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(String activeStatus) { + this.activeStatus = activeStatus; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelDieselMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelDieselMapper.java new file mode 100644 index 000000000..7fe052f82 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelDieselMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.cardFule.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel; + +/** + * 柴油屯油卡(CardFuelDiesel)表数据库访问层 + * + * @author makejava + * @since 2023-10-31 13:54:27 + */ +public interface CardFuelDieselMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelGasolineMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelGasolineMapper.java new file mode 100644 index 000000000..7b427d29f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelGasolineMapper.java @@ -0,0 +1,16 @@ +package com.fuint.business.marketingActivity.cardFule.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelGasoline; + +/** + * 汽油屯油卡(CardFuelGasoline)表数据库访问层 + * + * @author makejava + * @since 2023-10-31 13:55:06 + */ +public interface CardFuelGasolineMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelDieselService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelDieselService.java new file mode 100644 index 000000000..f2e2b53e0 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelDieselService.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.cardFule.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel; + +/** + * 柴油屯油卡(CardFuelDiesel)表服务接口 + * + * @author makejava + * @since 2023-10-31 13:54:28 + */ +public interface CardFuelDieselService extends IService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelGasolineService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelGasolineService.java new file mode 100644 index 000000000..5d55594a9 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelGasolineService.java @@ -0,0 +1,16 @@ +package com.fuint.business.marketingActivity.cardFule.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelGasoline; + +/** + * 汽油屯油卡(CardFuelGasoline)表服务接口 + * + * @author makejava + * @since 2023-10-31 13:55:06 + */ +public interface CardFuelGasolineService extends IService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java new file mode 100644 index 000000000..7f80c3eb4 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java @@ -0,0 +1,19 @@ +package com.fuint.business.marketingActivity.cardFule.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelDieselMapper; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel; +import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService; +import org.springframework.stereotype.Service; + +/** + * 柴油屯油卡(CardFuelDiesel)表服务实现类 + * + * @author makejava + * @since 2023-10-31 13:54:28 + */ +@Service("cardFuelDieselService") +public class CardFuelDieselServiceImpl extends ServiceImpl implements CardFuelDieselService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelGasolineServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelGasolineServiceImpl.java new file mode 100644 index 000000000..f611a3684 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelGasolineServiceImpl.java @@ -0,0 +1,20 @@ +package com.fuint.business.marketingActivity.cardFule.service.impl; + + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelGasolineMapper; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelGasoline; +import com.fuint.business.marketingActivity.cardFule.service.CardFuelGasolineService; +import org.springframework.stereotype.Service; + +/** + * 汽油屯油卡(CardFuelGasoline)表服务实现类 + * + * @author makejava + * @since 2023-10-31 13:55:07 + */ +@Service("cardFuelGasolineService") +public class CardFuelGasolineServiceImpl extends ServiceImpl implements CardFuelGasolineService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java new file mode 100644 index 000000000..b58716539 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java @@ -0,0 +1,101 @@ +package com.fuint.business.marketingActivity.cardGift.controller; + + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.cardGift.entity.CardGift; +import com.fuint.business.marketingActivity.cardGift.service.CardGiftService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 礼品卡(CardGift)表控制层 + * + * @author makejava + * @since 2023-10-31 13:55:27 + */ +@RestController +@RequestMapping("business/marketingActivity/cardGift") +public class CardGiftController extends BaseController { + /** + * 服务对象 + */ + @Resource + private CardGiftService cardGiftService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param cardGift + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("cardGift") CardGift cardGift) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.cardGiftService.page(page, new QueryWrapper<>(cardGift))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.cardGiftService.getById(id)); + } + + /** + * 新增数据 + * + * @param cardGift 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody CardGift cardGift) { + return getSuccessResult(this.cardGiftService.insert(cardGift)); + } + + /** + * 修改数据 + * + * @param cardGift 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody CardGift cardGift) { + return getSuccessResult(this.cardGiftService.updateById(cardGift)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.cardGiftService.removeByIds(idList)); + } + + /** + * 统计礼品卡数量/额度 + * @return + */ + @GetMapping("/list/{storeId}") + public ResponseObject selectStatistics(@PathVariable Integer storeId) { + return getSuccessResult(this.cardGiftService.selectStatistics(storeId)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java new file mode 100644 index 000000000..7cd11418f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java @@ -0,0 +1,180 @@ +package com.fuint.business.marketingActivity.cardGift.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; +import java.util.Date; + +/** + * 礼品卡(CardGift)表实体类 + * + * @author makejava + * @since 2023-10-31 13:55:29 + */ +@SuppressWarnings("serial") +public class CardGift extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //批次号 + private String batchNumber; + //礼品卡编号 + private String number; + //兑换卡密 + private String cardPassword; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //礼品卡状态 1:在用 2:挂失 3:停用 + private String status; + //激活状态 + private String activateStatus; + //生成数量 + private Integer quantity; + //礼品卡金额 + private Double cardAmount; + //礼品卡描述 + private String remark; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBatchNumber() { + return batchNumber; + } + + public void setBatchNumber(String batchNumber) { + this.batchNumber = batchNumber; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + public String getCardPassword() { + return cardPassword; + } + + public void setCardPassword(String cardPassword) { + this.cardPassword = cardPassword; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getActivateStatus() { + return activateStatus; + } + + public void setActivateStatus(String activateStatus) { + this.activateStatus = activateStatus; + } + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Double getCardAmount() { + return cardAmount; + } + + public void setCardAmount(Double cardAmount) { + this.cardAmount = cardAmount; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/CardGiftMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/CardGiftMapper.java new file mode 100644 index 000000000..b93461fc8 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/CardGiftMapper.java @@ -0,0 +1,19 @@ +package com.fuint.business.marketingActivity.cardGift.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardGift.entity.CardGift; + +import java.util.HashMap; +import java.util.Map; + +/** + * 礼品卡(CardGift)表数据库访问层 + * + * @author makejava + * @since 2023-10-31 13:55:28 + */ +public interface CardGiftMapper extends BaseMapper { + + HashMap selectStatistics(Integer storeId); +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/xml/CardGiftMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/xml/CardGiftMapper.xml new file mode 100644 index 000000000..c515642c8 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/mapper/xml/CardGiftMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/CardGiftService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/CardGiftService.java new file mode 100644 index 000000000..cee040110 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/CardGiftService.java @@ -0,0 +1,31 @@ +package com.fuint.business.marketingActivity.cardGift.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardGift.entity.CardGift; +import com.fuint.business.petrolStationManagement.entity.OilGun; + +import java.util.Map; + +/** + * 礼品卡(CardGift)表服务接口 + * + * @author makejava + * @since 2023-10-31 13:55:29 + */ +public interface CardGiftService extends IService { + + /** + * 新增数据 + * + * @param CardGift 实例对象 + * @return 实例对象 + */ + boolean insert(CardGift cardGift); + + /** + * 统计礼品卡数量/额度 + * @return + */ + Map selectStatistics(Integer storeId); +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java new file mode 100644 index 000000000..8d253dccc --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java @@ -0,0 +1,86 @@ +package com.fuint.business.marketingActivity.cardGift.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardGift.mapper.CardGiftMapper; +import com.fuint.business.marketingActivity.cardGift.entity.CardGift; +import com.fuint.business.marketingActivity.cardGift.service.CardGiftService; +import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig; +import com.fuint.business.oilDepotConfiguration.service.OilDepotConfigService; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +/** + * 礼品卡(CardGift)表服务实现类 + * + * @author makejava + * @since 2023-10-31 13:55:30 + */ +@Service("cardGiftService") +public class CardGiftServiceImpl extends ServiceImpl implements CardGiftService { + + @Resource + private CardGiftMapper cardGiftMapper; + + @Resource + private OilDepotConfigService oilDepotConfigService; + + /** + * 新增数据 + * + * @param cardGift + * @return + */ + @Override + public boolean insert(CardGift cardGift) { + boolean save = false; + //设置批次号 + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); + cardGift.setBatchNumber(dateFormat.format(new Date()) + String.format("%05d", new Random().nextInt(100000))); + //生成数量 + for (int i = 0; i < cardGift.getQuantity(); i++) { + //礼品卡编号 + cardGift.setNumber(String.format("%08d", new Random().nextInt(100000000))); + //卡密 + cardGift.setCardPassword(String.format("%09d", new Random().nextInt(1000000000)) + "-LjZhYz"); + save = save(cardGift); + } + return save; + } + + /** + * 统计礼品卡数量/额度 + * + * @return + */ + @Override + public Map selectStatistics(Integer storeId) { + HashMap map = new HashMap<>(); + if (ObjectUtils.isNotEmpty(storeId)) { + //获取礼品卡数量 + map = cardGiftMapper.selectStatistics(storeId); + //获取礼品卡总额度 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(OilDepotConfig::getStoreId, storeId); + OilDepotConfig oilDepotConfig = oilDepotConfigService.getOne(queryWrapper); + if (ObjectUtils.isNotEmpty(oilDepotConfig)) { + map.put("total_amount", (long) oilDepotConfig.getTotalAmount()); + //礼品卡剩余额度 + map.put("remaining_amount", (long) oilDepotConfig.getTotalAmount() - map.get("tatol")); + }else { + map.put("total_amount",0L); + map.put("remaining_amount",0L); + } + return map; + } + return map; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java new file mode 100644 index 000000000..581b42337 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java @@ -0,0 +1,103 @@ +package com.fuint.business.marketingActivity.cardValue.controller; + + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.cardValue.entity.CardValue; +import com.fuint.business.marketingActivity.cardValue.service.CardValueService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 储值卡表(CardValue)表控制层 + * + * @author makejava + * @since 2023-10-31 09:41:56 + */ +@RestController +@RequestMapping("business/marketingActivity/cardValue") +public class CardValueController extends BaseController { + /** + * 服务对象 + */ + @Resource + private CardValueService cardValueService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param cardValue + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("cardValue") CardValue cardValue) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.cardValueService.page(page, new QueryWrapper<>(cardValue))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.cardValueService.getById(id)); + } + + /** + * 通过主键查询单条数据(充值) + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("/selectById/{id}") + public ResponseObject selectById(@PathVariable Serializable id) { + return getSuccessResult(this.cardValueService.getById(id)); + } + + /** + * 新增数据 + * + * @param cardValue 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody CardValue cardValue) { + return getSuccessResult(this.cardValueService.save(cardValue)); + } + + /** + * 修改数据 + * + * @param cardValue 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody CardValue cardValue) { + return getSuccessResult(this.cardValueService.updateById(cardValue)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.cardValueService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java new file mode 100644 index 000000000..60fcf8310 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java @@ -0,0 +1,95 @@ +package com.fuint.business.marketingActivity.cardValue.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.marketingActivity.cardValue.entity.CardValue; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; +import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 储值充值表(CardValueRecord)表控制层 + * + * @author makejava + * @since 2023-10-31 11:30:09 + */ +@RestController +@RequestMapping("cardValueRecord") +public class CardValueRecordController extends BaseController { + /** + * 服务对象 + */ + @Resource + private CardValueRecordService cardValueRecordService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param cardValueRecord + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("cardValueRecord") CardValueRecord cardValueRecord) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.cardValueRecordService.page(page, new QueryWrapper<>(cardValueRecord))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.cardValueRecordService.getById(id)); + } + + /** + * 新增数据 + * + * @param cardValueRecord 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody CardValueRecord cardValueRecord) { + return getSuccessResult(this.cardValueRecordService.insert(cardValueRecord)); + } + + /** + * 修改数据 + * + * @param cardValueRecord 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody CardValueRecord cardValueRecord) { + return getSuccessResult(this.cardValueRecordService.updateById(cardValueRecord)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.cardValueRecordService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java new file mode 100644 index 000000000..8eaa530a5 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java @@ -0,0 +1,321 @@ +package com.fuint.business.marketingActivity.cardValue.entity; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 储值卡表(CardValue)表实体类 + * + * @author makejava + * @since 2023-10-31 09:42:02 + */ +@SuppressWarnings("serial") +public class CardValue extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //储值卡状态 1:在用 2:挂失 3:停用 + private String status; + //储值卡面值 + private Double bidBalance; + //储值卡实际售价 + private Double rechargeBalance; + //储值卡赠送金额 + private Double giftBalance; + //赠送积分 + private Integer points; + //赠送成长值 + private Integer growthValue; + //赠送加油金 + private Integer refuelMoney; + //卡券 + private String couponIds; + //附加福利 + private String fringeBenefit; + //参与次数 + private Integer participationNo; + //员工提成 1:仅会员首次充值提成 2:会员每次充值提成 + private String employeeCommission; + //提成类型 1:无 2:按提成金额 3:按充值金额提成比例 + private String royaltyType; + //提成金额 + private Double amountCommission; + //提成比例 + private Double percentageCommissions; + //活动时间 1:不限时间 2:自定义时间 + private String activeTime; + //活动开始时间 + private Date startTime; + //活动结束时间 + private Date endTime; + //活动状态 1:启用 2:禁用 + private String activeStatus; + //支付储值 1:启用 2:禁用 + private String paymentValue; + //面向群体 1:普通群体 2:等级会员 + private String groupOriented; + //会员等级 会员等级 0:新人会员 1:V1会员 2:V2会员..... + private String membershipLevel; + //排序 (数值越大,顺序越在前) + private Integer sort; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Double getBidBalance() { + return bidBalance; + } + + public void setBidBalance(Double bidBalance) { + this.bidBalance = bidBalance; + } + + public Double getRechargeBalance() { + return rechargeBalance; + } + + public void setRechargeBalance(Double rechargeBalance) { + this.rechargeBalance = rechargeBalance; + } + + public Double getGiftBalance() { + return giftBalance; + } + + public void setGiftBalance(Double giftBalance) { + this.giftBalance = giftBalance; + } + + public Integer getPoints() { + return points; + } + + public void setPoints(Integer points) { + this.points = points; + } + + public Integer getGrowthValue() { + return growthValue; + } + + public void setGrowthValue(Integer growthValue) { + this.growthValue = growthValue; + } + + public Integer getRefuelMoney() { + return refuelMoney; + } + + public void setRefuelMoney(Integer refuelMoney) { + this.refuelMoney = refuelMoney; + } + + public String getCouponIds() { + return couponIds; + } + + public void setCouponIds(String couponIds) { + this.couponIds = couponIds; + } + + public String getFringeBenefit() { + return fringeBenefit; + } + + public void setFringeBenefit(String fringeBenefit) { + this.fringeBenefit = fringeBenefit; + } + + public Integer getParticipationNo() { + return participationNo; + } + + public void setParticipationNo(Integer participationNo) { + this.participationNo = participationNo; + } + + public String getEmployeeCommission() { + return employeeCommission; + } + + public void setEmployeeCommission(String employeeCommission) { + this.employeeCommission = employeeCommission; + } + + public String getRoyaltyType() { + return royaltyType; + } + + public void setRoyaltyType(String royaltyType) { + this.royaltyType = royaltyType; + } + + public Double getPercentageCommissions() { + return percentageCommissions; + } + + public void setPercentageCommissions(Double percentageCommissions) { + this.percentageCommissions = percentageCommissions; + } + + public Double getAmountCommission() { + return amountCommission; + } + + public void setAmountCommission(Double amountCommission) { + this.amountCommission = amountCommission; + } + + public String getActiveTime() { + return activeTime; + } + + public void setActiveTime(String activeTime) { + this.activeTime = activeTime; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public String getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(String activeStatus) { + this.activeStatus = activeStatus; + } + + public String getPaymentValue() { + return paymentValue; + } + + public void setPaymentValue(String paymentValue) { + this.paymentValue = paymentValue; + } + + public String getGroupOriented() { + return groupOriented; + } + + public void setGroupOriented(String groupOriented) { + this.groupOriented = groupOriented; + } + + public String getMembershipLevel() { + return membershipLevel; + } + + public void setMembershipLevel(String membershipLevel) { + this.membershipLevel = membershipLevel; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java new file mode 100644 index 000000000..766c346e6 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java @@ -0,0 +1,271 @@ +package com.fuint.business.marketingActivity.cardValue.entity; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 储值充值表(CardValueRecord)表实体类 + * + * @author makejava + * @since 2023-10-31 11:30:10 + */ +@SuppressWarnings("serial") +public class CardValueRecord extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //会员id + private Integer mtUserId; + //会员名字 + private String name; + //会员手机号码 + private String mobile; + //员工id + private Integer mtStaffId; + //员工姓名 + private String realName; + //员工手机号码 + private String staffMobile; + //储值卡id + private Integer cardValueId; + //充值类型 0:充值卡 1:自定义 + private String rechargeType; + //自定义充值金额 + private Double amount; + //储值卡面值 + private Double bidBalance; + //储值卡实际售价 + private Double rechargeBalance; + //储值卡赠送金额 + private Double giftBalance; + //积分 + private Integer points; + //成长值 + private Integer growthValue; + //赠送加油金 + private Integer refuelMoney; + //附加福利 + private String fringeBenefit; + //提成类型 1:无 2:按提成金额 3:按充值金额提成比例 + private String royaltyType; + //提成比例 + private Double percentageCommissions; + //员工提成金额 + private Double amountCommission; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getMtUserId() { + return mtUserId; + } + + public void setMtUserId(Integer mtUserId) { + this.mtUserId = mtUserId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public Integer getMtStaffId() { + return mtStaffId; + } + + public void setMtStaffId(Integer mtStaffId) { + this.mtStaffId = mtStaffId; + } + + public String getRealName() { + return realName; + } + + public void setRealName(String realName) { + this.realName = realName; + } + + public String getStaffMobile() { + return staffMobile; + } + + public void setStaffMobile(String staffMobile) { + this.staffMobile = staffMobile; + } + + public Integer getCardValueId() { + return cardValueId; + } + + public void setCardValueId(Integer cardValueId) { + this.cardValueId = cardValueId; + } + + public String getRechargeType() { + return rechargeType; + } + + public void setRechargeType(String rechargeType) { + this.rechargeType = rechargeType; + } + + public Double getAmount() { + return amount; + } + + public void setAmount(Double amount) { + this.amount = amount; + } + + public Double getBidBalance() { + return bidBalance; + } + + public void setBidBalance(Double bidBalance) { + this.bidBalance = bidBalance; + } + + public Double getRechargeBalance() { + return rechargeBalance; + } + + public void setRechargeBalance(Double rechargeBalance) { + this.rechargeBalance = rechargeBalance; + } + + public Double getGiftBalance() { + return giftBalance; + } + + public void setGiftBalance(Double giftBalance) { + this.giftBalance = giftBalance; + } + + public Integer getPoints() { + return points; + } + + public void setPoints(Integer points) { + this.points = points; + } + + public Integer getGrowthValue() { + return growthValue; + } + + public void setGrowthValue(Integer growthValue) { + this.growthValue = growthValue; + } + + public Integer getRefuelMoney() { + return refuelMoney; + } + + public void setRefuelMoney(Integer refuelMoney) { + this.refuelMoney = refuelMoney; + } + + public String getFringeBenefit() { + return fringeBenefit; + } + + public void setFringeBenefit(String fringeBenefit) { + this.fringeBenefit = fringeBenefit; + } + + public String getRoyaltyType() { + return royaltyType; + } + + public void setRoyaltyType(String royaltyType) { + this.royaltyType = royaltyType; + } + + public Double getPercentageCommissions() { + return percentageCommissions; + } + + public void setPercentageCommissions(Double percentageCommissions) { + this.percentageCommissions = percentageCommissions; + } + + public Double getAmountCommission() { + return amountCommission; + } + + public void setAmountCommission(Double amountCommission) { + this.amountCommission = amountCommission; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java new file mode 100644 index 000000000..338ecd379 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.cardValue.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardValue.entity.CardValue; + +/** + * 储值卡表(CardValue)表数据库访问层 + * + * @author makejava + * @since 2023-10-31 09:41:57 + */ +public interface CardValueMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueRecordMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueRecordMapper.java new file mode 100644 index 000000000..0c84eb565 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueRecordMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.cardValue.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; + +/** + * 储值充值表(CardValueRecord)表数据库访问层 + * + * @author makejava + * @since 2023-10-31 11:30:10 + */ +public interface CardValueRecordMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java new file mode 100644 index 000000000..b80d0ce59 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java @@ -0,0 +1,23 @@ +package com.fuint.business.marketingActivity.cardValue.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; +import com.fuint.business.petrolStationManagement.entity.OilGun; + +/** + * 储值充值表(CardValueRecord)表服务接口 + * + * @author makejava + * @since 2023-10-31 11:30:11 + */ +public interface CardValueRecordService extends IService { + + /** + * 储值卡充值(新增) + * @param cardValueRecord + * @return + */ + boolean insert(CardValueRecord cardValueRecord); + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java new file mode 100644 index 000000000..b65c76ae8 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.cardValue.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardValue.entity.CardValue; + +/** + * 储值卡表(CardValue)表服务接口 + * + * @author makejava + * @since 2023-10-31 09:42:03 + */ +public interface CardValueService extends IService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java new file mode 100644 index 000000000..0c4e6d346 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java @@ -0,0 +1,28 @@ +package com.fuint.business.marketingActivity.cardValue.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; +import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService; +import org.springframework.stereotype.Service; + +/** + * 储值充值表(CardValueRecord)表服务实现类 + * + * @author makejava + * @since 2023-10-31 11:30:11 + */ +@Service("cardValueRecordService") +public class CardValueRecordServiceImpl extends ServiceImpl implements CardValueRecordService { + + /** + * 储值卡充值(新增) + * @param cardValueRecord + * @return + */ + @Override + public boolean insert(CardValueRecord cardValueRecord) { + return false; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java new file mode 100644 index 000000000..96f84bb10 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java @@ -0,0 +1,19 @@ +package com.fuint.business.marketingActivity.cardValue.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardValue.mapper.CardValueMapper; +import com.fuint.business.marketingActivity.cardValue.entity.CardValue; +import com.fuint.business.marketingActivity.cardValue.service.CardValueService; +import org.springframework.stereotype.Service; + +/** + * 储值卡表(CardValue)表服务实现类 + * + * @author makejava + * @since 2023-10-31 09:42:04 + */ +@Service("cardValueService") +public class CardValueServiceImpl extends ServiceImpl implements CardValueService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/controller/OilDepotConfigController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/controller/OilDepotConfigController.java new file mode 100644 index 000000000..847eb38cc --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/controller/OilDepotConfigController.java @@ -0,0 +1,92 @@ +package com.fuint.business.oilDepotConfiguration.controller; + + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig; +import com.fuint.business.oilDepotConfiguration.service.OilDepotConfigService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 油站配置表(OilDepotConfig)表控制层 + * + * @author makejava + * @since 2023-10-31 16:04:32 + */ +@RestController +@RequestMapping("business/oilDepotConfiguration") +public class OilDepotConfigController extends BaseController { + /** + * 服务对象 + */ + @Resource + private OilDepotConfigService oilDepotConfigService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param oilDepotConfig + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("oilDepotConfig") OilDepotConfig oilDepotConfig) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.oilDepotConfigService.page(page, new QueryWrapper<>(oilDepotConfig))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.oilDepotConfigService.getById(id)); + } + + /** + * 新增数据 + * + * @param oilDepotConfig 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody OilDepotConfig oilDepotConfig) { + return getSuccessResult(this.oilDepotConfigService.save(oilDepotConfig)); + } + + /** + * 修改数据 + * + * @param oilDepotConfig 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody OilDepotConfig oilDepotConfig) { + return getSuccessResult(this.oilDepotConfigService.updateById(oilDepotConfig)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.oilDepotConfigService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/entity/OilDepotConfig.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/entity/OilDepotConfig.java new file mode 100644 index 000000000..abc93b92d --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/entity/OilDepotConfig.java @@ -0,0 +1,110 @@ +package com.fuint.business.oilDepotConfiguration.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; +import java.util.Date; + +/** + * 油站配置表(OilDepotConfig)表实体类 + * + * @author makejava + * @since 2023-10-31 16:04:35 + */ +@SuppressWarnings("serial") +public class OilDepotConfig extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //礼品卡数量总额度 + private Integer totalAmount; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public Integer getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(Integer totalAmount) { + this.totalAmount = totalAmount; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/mapper/OilDepotConfigMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/mapper/OilDepotConfigMapper.java new file mode 100644 index 000000000..9ab5c254d --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/mapper/OilDepotConfigMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.oilDepotConfiguration.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig; + +/** + * 油站配置表(OilDepotConfig)表数据库访问层 + * + * @author makejava + * @since 2023-10-31 16:04:34 + */ +public interface OilDepotConfigMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/OilDepotConfigService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/OilDepotConfigService.java new file mode 100644 index 000000000..b98385e13 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/OilDepotConfigService.java @@ -0,0 +1,15 @@ +package com.fuint.business.oilDepotConfiguration.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig; + +/** + * 油站配置表(OilDepotConfig)表服务接口 + * + * @author makejava + * @since 2023-10-31 16:04:36 + */ +public interface OilDepotConfigService extends IService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/impl/OilDepotConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/impl/OilDepotConfigServiceImpl.java new file mode 100644 index 000000000..53bb6786b --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/oilDepotConfiguration/service/impl/OilDepotConfigServiceImpl.java @@ -0,0 +1,19 @@ +package com.fuint.business.oilDepotConfiguration.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.oilDepotConfiguration.mapper.OilDepotConfigMapper; +import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig; +import com.fuint.business.oilDepotConfiguration.service.OilDepotConfigService; +import org.springframework.stereotype.Service; + +/** + * 油站配置表(OilDepotConfig)表服务实现类 + * + * @author makejava + * @since 2023-10-31 16:04:36 + */ +@Service("oilDepotConfigService") +public class OilDepotConfigServiceImpl extends ServiceImpl implements OilDepotConfigService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/controller/TerminalStationController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/controller/TerminalStationController.java new file mode 100644 index 000000000..9c4909871 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/controller/TerminalStationController.java @@ -0,0 +1,85 @@ +package com.fuint.terminalStation.member.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.member.entity.LJStaff; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import com.fuint.terminalStation.member.service.TerminalStaffService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +@RestController +@RequestMapping("/terminalStation/member/staff") +public class TerminalStationController extends BaseController { + @Autowired + private TerminalStaffService terminalStaffService; + + /** + * 根据条件分页查询员工信息 + * @param staff + * @param pageNo + * @param pageSize + * @return + */ + @GetMapping("/list") + public ResponseObject list(LJStaff staff, + @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){ + Page page =new Page(pageNo,pageSize); + IPage list = terminalStaffService.selectStaffList(page,staff); + return getSuccessResult(list); + } + + /** + * 根据id查询员工信息 + * @param id + * @return + */ + @GetMapping("/{id}") + public ResponseObject staffInfo(@PathVariable Integer id){ + LJStaff staff = terminalStaffService.selectStaffById(id); + return getSuccessResult(staff); + } + + /** + * 批量删除员工信息 + * @return + */ + @DeleteMapping("/{id}") + public ResponseObject remove(@PathVariable Integer id){ + terminalStaffService.deleteStaffById(id); + return getSuccessResult("操作成功"); + } + + /** + * 添加员工信息 + * @param staff + * @return + */ + @PostMapping + public ResponseObject add(@Validated @RequestBody LJStaff staff){ + return getSuccessResult(terminalStaffService.insertStaff(staff)); + } + + /** + * 修改员工信息 + * @param staff + * @return + */ + @PutMapping + public ResponseObject edit(@Validated @RequestBody LJStaff staff){ + return getSuccessResult(terminalStaffService.updateStaff(staff)); + } + + /** + * 查询权限 + * @param auditPrem + * @return + */ + @GetMapping("auditPrem") + public ResponseObject auditPrem(String auditPrem) { + return getSuccessResult(terminalStaffService.auditPrem(auditPrem)); + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/TerminalStaffMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/TerminalStaffMapper.java new file mode 100644 index 000000000..3a3836994 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/TerminalStaffMapper.java @@ -0,0 +1,67 @@ +package com.fuint.terminalStation.member.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.member.entity.LJStaff; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; + +/** + * 店铺员工表 Mapper 接口 + * + * Created by FSQ + * CopyRight https://www.fuint.cn + */ +@Mapper +public interface TerminalStaffMapper extends BaseMapper { + /** + * 根据条件分页查询员工信息 + * @param page + * @param staff + * @return + */ + public IPage selectLJStaffList(Page page, @Param("staff") LJStaff staff); + + /** + * 根据id查询员工信息 + * @param id + * @return + */ + public LJStaff selectLJStaffById(@Param("id") int id); + + /** + * 根据id删除员工信息 + * @param id + * @return + */ + public int deleteStaffById(@Param("id") int id); + + /** + * 添加员工信息 + * @param staff + * @return + */ + public int insertStaff(LJStaff staff); + + /** + * 修改员工信息 + * @param staff + * @return + */ + public int updateStaff(LJStaff staff); + + int updateStatus(@Param("id") Integer id, @Param("status") String status, @Param("updateTime") Date updateTime); + + LJStaff queryStaffByMobile(@Param("mobile") String mobile); + + LJStaff queryStaffByUserId(@Param("userId") Integer userId); + + /** + * 查询员工权限 + */ + int auditPrem(@Param("id")Integer id,@Param("auditPrem") String auditPrem); + +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/xml/TerminalStaffMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/xml/TerminalStaffMapper.xml new file mode 100644 index 000000000..61d54acc6 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/mapper/xml/TerminalStaffMapper.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select * from mt_staff + + + + + + + + delete from mt_staff where id = #{id} + + + + insert into mt_staff( + merchant_id, + store_id, + user_id, + category, + mobile, + real_name, + wechat, + update_time, + audited_status, + audited_time, + description, + create_user, + update_user, + is_refuel, + handover_mode, + handover_prem, + out, + record, + merchant_status, + screen, + pos_prem, + applet_prem, + notice, + oil_gun_id, + time_frame, + refund, + transaction, + write_off, + special_prem, + official, + create_time + )values ( + #{merchantId}, + #{storeId}, + #{userId}, + #{category}, + #{mobile}, + #{realName}, + #{wechat}, + #{updateTime}, + #{auditedStatus}, + #{auditedTime}, + #{description}, + #{createUser}, + #{updateUser}, + #{isRefuel}, + #{handoverMode}, + #{handoverPrem}, + #{out}, + #{record}, + #{merchantStatus}, + #{screen}, + #{posPrem}, + #{appletPrem}, + #{notice}, + #{oilGunId}, + #{time_frame}, + #{refund}, + #{transaction}, + #{write_off}, + #{special_prem}, + #{official}, + sysdate() + ) + + + + + + update mt_staff p set p.AUDITED_STATUS = #{status}, p.UPDATE_TIME = #{updateTime} where p.ID = #{id} + + + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/TerminalStaffService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/TerminalStaffService.java new file mode 100644 index 000000000..ec06209d1 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/TerminalStaffService.java @@ -0,0 +1,53 @@ +package com.fuint.terminalStation.member.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.member.entity.LJStaff; + +/** + * 员工管理 业务层 + */ +public interface TerminalStaffService extends IService { + /** + * 根据条件分页查询员工信息 + * @param page + * @return + */ + public IPage selectStaffList(Page page, LJStaff LJStaff); + + /** + * 根据id查询员工信息 + * @param id + * @return + */ + public LJStaff selectStaffById(int id); + + /** + * 批量删除员工信息 + * @param ids + */ + public void deleteStaffByIds(Integer[] ids); + + /** + * 根据id删除员工信息 + * @param id + */ + public void deleteStaffById(Integer id); + + /** + * 增加员工信息 + * @param staff + * @return + */ + public int insertStaff(LJStaff staff); + + /** + * 修改员工信息 + * @param staff + * @return + */ + public int updateStaff(LJStaff staff); + + public int auditPrem(String auditPrem); +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/impl/TerminalStaffServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/impl/TerminalStaffServiceImpl.java new file mode 100644 index 000000000..39e3e292d --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/terminalStation/member/service/impl/TerminalStaffServiceImpl.java @@ -0,0 +1,90 @@ +package com.fuint.terminalStation.member.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.member.entity.LJStaff; +import com.fuint.business.member.mapper.LJStaffMapper; +import com.fuint.common.dto.AccountInfo; +import com.fuint.common.util.TokenUtil; +import com.fuint.terminalStation.member.service.TerminalStaffService; +import org.springframework.stereotype.Service; + +/** + * 员工管理 业务层 + */ +@Service +public class TerminalStaffServiceImpl extends ServiceImpl implements TerminalStaffService { + /** + * 根据条件分页查询员工信息 + * @param page + * @param staff + * @return + */ + @Override + public IPage selectStaffList(Page page, LJStaff staff) { + return baseMapper.selectLJStaffList(page,staff); + } + + /** + * 根据id查询员工信息 + * @param id + * @return + */ + @Override + public LJStaff selectStaffById(int id) { + return baseMapper.selectById(id); + } + + /** + * 根据id批量删除员工信息 + * @param ids + */ + @Override + public void deleteStaffByIds(Integer[] ids) { + for (int id : ids){ + baseMapper.deleteById(id); + } + } + + /** + * 根据id删除员工信息 + * @param id + */ + @Override + public void deleteStaffById(Integer id) { + baseMapper.deleteById(id); + } + + /** + * 添加用户信息 + * @param staff + * @return + */ + @Override + public int insertStaff(LJStaff staff) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + Integer storeId = nowAccountInfo.getStoreId(); + staff.setStoreId(storeId); + int row = baseMapper.insert(staff); + return row; + } + + /** + * 修改用户信息 + * @param staff + * @return + */ + @Override + public int updateStaff(LJStaff staff) { + int row = baseMapper.updateById(staff); + return row; + } + + @Override + public int auditPrem(String auditPrem) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + int row = baseMapper.auditPrem(nowAccountInfo.getStaffId(),auditPrem); + return row; + } +}