储值卡、礼品卡、囤油卡
This commit is contained in:
parent
906b804b2b
commit
245b425a9e
@ -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<Long> idList) {
|
||||
return getSuccessResult(this.cardFuelDieselService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -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<Long> idList) {
|
||||
return getSuccessResult(this.cardFuelGasolineService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -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<CardFuelDiesel> {
|
||||
//主键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;
|
||||
}
|
||||
}
|
||||
|
@ -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<CardFuelGasoline> {
|
||||
//主键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;
|
||||
}
|
||||
}
|
||||
|
@ -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<CardFuelDiesel> {
|
||||
|
||||
}
|
||||
|
@ -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<CardFuelGasoline> {
|
||||
|
||||
}
|
||||
|
@ -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<CardFuelDiesel> {
|
||||
|
||||
}
|
||||
|
@ -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<CardFuelGasoline> {
|
||||
|
||||
}
|
||||
|
@ -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<CardFuelDieselMapper, CardFuelDiesel> implements CardFuelDieselService {
|
||||
|
||||
}
|
||||
|
@ -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<CardFuelGasolineMapper, CardFuelGasoline> implements CardFuelGasolineService {
|
||||
|
||||
}
|
||||
|
@ -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<Long> idList) {
|
||||
return getSuccessResult(this.cardGiftService.removeByIds(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计礼品卡数量/额度
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list/{storeId}")
|
||||
public ResponseObject selectStatistics(@PathVariable Integer storeId) {
|
||||
return getSuccessResult(this.cardGiftService.selectStatistics(storeId));
|
||||
}
|
||||
}
|
||||
|
@ -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<CardGift> {
|
||||
//主键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;
|
||||
}
|
||||
}
|
||||
|
@ -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<CardGift> {
|
||||
|
||||
HashMap<String,Long> selectStatistics(Integer storeId);
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.marketingActivity.cardGift.mapper.CardGiftMapper">
|
||||
|
||||
<resultMap type="com.fuint.business.petrolStationManagement.entity.OilGun" id="OilGunMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="batchNumber" column="batch_number"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="cardPassword" column="card_password"/>
|
||||
<result property="chainStorId" column="chain_stor_id"/>
|
||||
<result property="storeId" column="store_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="activateStatus" column="activate_status"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="cardAmount" column="card_amount"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectStatistics" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
count( id ) tatol,
|
||||
( SELECT count( id ) FROM card_gift
|
||||
WHERE store_id = #{store_id}
|
||||
and activate_status = "1" ) alreadyTatal
|
||||
FROM
|
||||
card_gift
|
||||
where store_id = #{store_id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -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<CardGift> {
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param CardGift 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
boolean insert(CardGift cardGift);
|
||||
|
||||
/**
|
||||
* 统计礼品卡数量/额度
|
||||
* @return
|
||||
*/
|
||||
Map<String, Long> selectStatistics(Integer storeId);
|
||||
}
|
||||
|
@ -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<CardGiftMapper, CardGift> 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<String, Long> selectStatistics(Integer storeId) {
|
||||
HashMap<String, Long> map = new HashMap<>();
|
||||
if (ObjectUtils.isNotEmpty(storeId)) {
|
||||
//获取礼品卡数量
|
||||
map = cardGiftMapper.selectStatistics(storeId);
|
||||
//获取礼品卡总额度
|
||||
LambdaQueryWrapper<OilDepotConfig> 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;
|
||||
}
|
||||
}
|
||||
|
@ -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<Long> idList) {
|
||||
return getSuccessResult(this.cardValueService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -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<Long> idList) {
|
||||
return getSuccessResult(this.cardValueRecordService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -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<CardValue> {
|
||||
//主键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;
|
||||
}
|
||||
}
|
||||
|
@ -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<CardValueRecord> {
|
||||
//主键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;
|
||||
}
|
||||
}
|
||||
|
@ -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<CardValue> {
|
||||
|
||||
}
|
||||
|
@ -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<CardValueRecord> {
|
||||
|
||||
}
|
||||
|
@ -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<CardValueRecord> {
|
||||
|
||||
/**
|
||||
* 储值卡充值(新增)
|
||||
* @param cardValueRecord
|
||||
* @return
|
||||
*/
|
||||
boolean insert(CardValueRecord cardValueRecord);
|
||||
|
||||
}
|
||||
|
@ -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<CardValue> {
|
||||
|
||||
}
|
||||
|
@ -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<CardValueRecordMapper, CardValueRecord> implements CardValueRecordService {
|
||||
|
||||
/**
|
||||
* 储值卡充值(新增)
|
||||
* @param cardValueRecord
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean insert(CardValueRecord cardValueRecord) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -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<CardValueMapper, CardValue> implements CardValueService {
|
||||
|
||||
}
|
||||
|
@ -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<Long> idList) {
|
||||
return getSuccessResult(this.oilDepotConfigService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -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<OilDepotConfig> {
|
||||
//主键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;
|
||||
}
|
||||
}
|
||||
|
@ -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<OilDepotConfig> {
|
||||
|
||||
}
|
||||
|
@ -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<OilDepotConfig> {
|
||||
|
||||
}
|
||||
|
@ -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<OilDepotConfigMapper, OilDepotConfig> implements OilDepotConfigService {
|
||||
|
||||
}
|
||||
|
@ -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<LJStaff> 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));
|
||||
}
|
||||
}
|
@ -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<LJStaff> {
|
||||
/**
|
||||
* 根据条件分页查询员工信息
|
||||
* @param page
|
||||
* @param staff
|
||||
* @return
|
||||
*/
|
||||
public IPage<LJStaff> 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);
|
||||
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.terminalStation.member.mapper.TerminalStaffMapper">
|
||||
<resultMap type="com.fuint.business.member.entity.LJStaff" id="LJStaffResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="merchantId" column="merchant_id" />
|
||||
<result property="storeId" column="store_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="category" column="category" />
|
||||
<result property="mobile" column="mobile" />
|
||||
<result property="realName" column="real_name" />
|
||||
<result property="wechat" column="wechat" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="auditedStatus" column="audited_status" />
|
||||
<result property="auditedTime" column="audited_time" />
|
||||
<result property="description" column="description" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="isRefuel" column="is_refuel" />
|
||||
<result property="handoverMode" column="handover_mode" />
|
||||
<result property="handoverPrem" column="handover_prem" />
|
||||
<result property="handoverOut" column="handover_out" />
|
||||
<result property="record" column="record" />
|
||||
<result property="merchantStatus" column="merchant_status" />
|
||||
<result property="screen" column="screen" />
|
||||
<result property="posPrem" column="pos_prem" />
|
||||
<result property="appletPrem" column="applet_prem" />
|
||||
<result property="notice" column="notice" />
|
||||
<result property="oilGunId" column="oil_gun_id" />
|
||||
<result property="timeFrame" column="time_frame" />
|
||||
<result property="refund" column="refund" />
|
||||
<result property="transaction" column="transaction" />
|
||||
<result property="writeOff" column="write_off" />
|
||||
<result property="specialPrem" column="special_prem" />
|
||||
<result property="official" column="official" />
|
||||
<result property="status" column="status" />
|
||||
<result property="pos" column="pos" />
|
||||
<result property="role" column="role" />
|
||||
<result property="auditPrem" column="audit_prem" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMtStaff">
|
||||
select * from mt_staff
|
||||
</sql>
|
||||
<!--根据条件分页查询用户信息-->
|
||||
<select id="selectLJStaffList" resultMap="LJStaffResult">
|
||||
<include refid="selectMtStaff"></include>
|
||||
<where>
|
||||
store_id = #{staff.storeId}
|
||||
<if test="staff.realName != null and staff.realName != ''">
|
||||
and real_name like concat('%', #{staff.realName}, '%')
|
||||
</if>
|
||||
<if test="staff.mobile != null and staff.mobile != ''">
|
||||
and mobile like concat('%', #{staff.mobile}, '%')
|
||||
</if>
|
||||
<if test="staff.status != null and staff.status != ''">
|
||||
and status = #{staff.status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--根据id查询员工信息-->
|
||||
<select id="selectLJStaffById" resultMap="LJStaffResult">
|
||||
<include refid="selectMtStaff"></include>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<!--根据id查询员工信息-->
|
||||
<delete id="deleteStaffById">
|
||||
delete from mt_staff where id = #{id}
|
||||
</delete>
|
||||
<!--增加员工信息-->
|
||||
<insert id="insertStaff">
|
||||
insert into mt_staff(
|
||||
<if test="merchantId != null">merchant_id,</if>
|
||||
<if test="storeId != null">store_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="mobile != null and mobile != ''">mobile,</if>
|
||||
<if test="realName != null and realName != ''">real_name,</if>
|
||||
<if test="wechat != null and wechat != ''">wechat,</if>
|
||||
<if test="updateTime != null and updateTime != ''">update_time,</if>
|
||||
<if test="auditedStatus != null and auditedStatus != ''">audited_status,</if>
|
||||
<if test="auditedTime != null and auditedTime != ''">audited_time,</if>
|
||||
<if test="description != null and description != ''">description,</if>
|
||||
<if test="createUser != null and createUser != ''">create_user,</if>
|
||||
<if test="updateUser != null and updateUser != ''">update_user,</if>
|
||||
<if test="isRefuel != null and isRefuel != ''">is_refuel,</if>
|
||||
<if test="handoverMode != null and handoverMode != ''">handover_mode,</if>
|
||||
<if test="handoverPrem != null and handoverPrem != ''">handover_prem,</if>
|
||||
<if test="out != null and out != ''">out,</if>
|
||||
<if test="record != null and record != ''">record,</if>
|
||||
<if test="merchantStatus != null and merchantStatus != ''">merchant_status,</if>
|
||||
<if test="screen != null and screen != ''">screen,</if>
|
||||
<if test="posPrem != null and posPrem != ''">pos_prem,</if>
|
||||
<if test="appletPrem != null and appletPrem != ''">applet_prem,</if>
|
||||
<if test="notice != null and notice != ''">notice,</if>
|
||||
<if test="oilGunId != null and oilGunId != ''">oil_gun_id,</if>
|
||||
<if test="timeFrame != null and timeFrame != ''">time_frame,</if>
|
||||
<if test="refund != null and refund != ''">refund,</if>
|
||||
<if test="transaction != null and transaction != ''">transaction,</if>
|
||||
<if test="writeOff != null and writeOff != ''">write_off,</if>
|
||||
<if test="specialPrem != null and specialPrem != ''">special_prem,</if>
|
||||
<if test="official != null and official != ''">official,</if>
|
||||
create_time
|
||||
)values (
|
||||
<if test="merchantId != null">#{merchantId},</if>
|
||||
<if test="storeId != null">#{storeId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="category != null">#{category},</if>
|
||||
<if test="mobile != null and mobile != ''">#{mobile},</if>
|
||||
<if test="realName != null and realName != ''">#{realName},</if>
|
||||
<if test="wechat != null and wechat != ''">#{wechat},</if>
|
||||
<if test="updateTime != null and updateTime != ''">#{updateTime},</if>
|
||||
<if test="auditedStatus != null and auditedStatus != ''">#{auditedStatus},</if>
|
||||
<if test="auditedTime != null and auditedTime != ''">#{auditedTime},</if>
|
||||
<if test="description != null and description != ''">#{description},</if>
|
||||
<if test="createUser != null and createUser != ''">#{createUser},</if>
|
||||
<if test="updateUser != null and updateUser != ''">#{updateUser},</if>
|
||||
<if test="isRefuel != null and isRefuel != ''">#{isRefuel},</if>
|
||||
<if test="handoverMode != null and handoverMode != ''">#{handoverMode},</if>
|
||||
<if test="handoverPrem != null and handoverPrem != ''">#{handoverPrem},</if>
|
||||
<if test="out != null and out != ''">#{out},</if>
|
||||
<if test="record != null and record != ''">#{record},</if>
|
||||
<if test="merchantStatus != null and merchantStatus != ''">#{merchantStatus},</if>
|
||||
<if test="screen != null and screen != ''">#{screen},</if>
|
||||
<if test="posPrem != null and posPrem != ''">#{posPrem},</if>
|
||||
<if test="appletPrem != null and appletPrem != ''">#{appletPrem},</if>
|
||||
<if test="notice != null and notice != ''">#{notice},</if>
|
||||
<if test="oilGunId != null and oilGunId != ''">#{oilGunId},</if>
|
||||
<if test="timeFrame != null and timeFrame != ''">#{time_frame},</if>
|
||||
<if test="refund != null and refund != ''">#{refund},</if>
|
||||
<if test="transaction != null and transaction != ''">#{transaction},</if>
|
||||
<if test="writeOff != null and writeOff != ''">#{write_off},</if>
|
||||
<if test="specialPrem != null and specialPrem != ''">#{special_prem},</if>
|
||||
<if test="official != null and official != ''">#{official},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
<!-- 修改员工信息-->
|
||||
<update id="updateStaff"></update>
|
||||
|
||||
<update id="updateStatus">
|
||||
update mt_staff p set p.AUDITED_STATUS = #{status}, p.UPDATE_TIME = #{updateTime} where p.ID = #{id}
|
||||
</update>
|
||||
|
||||
<select id="queryStaffByMobile" resultType="com.fuint.business.member.entity.LJStaff">
|
||||
select * from mt_staff t where t.MOBILE = #{mobile} and t.AUDITED_STATUS != 'D'
|
||||
</select>
|
||||
|
||||
<select id="queryStaffByUserId" resultType="com.fuint.business.member.entity.LJStaff">
|
||||
select * from mt_staff t where t.USER_ID = #{userId} and t.AUDITED_STATUS != 'D'
|
||||
</select>
|
||||
<select id="auditPrem" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from mt_staff
|
||||
where id = #{id} and audit_prem like concat('%', #{auditPrem}, '%')
|
||||
</select>
|
||||
</mapper>
|
@ -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<LJStaff> {
|
||||
/**
|
||||
* 根据条件分页查询员工信息
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
public IPage<LJStaff> 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);
|
||||
}
|
@ -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<LJStaffMapper, LJStaff> implements TerminalStaffService {
|
||||
/**
|
||||
* 根据条件分页查询员工信息
|
||||
* @param page
|
||||
* @param staff
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<LJStaff> 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user