新增 车辆绑定优惠券记录表、实体类、Service、controller

This commit is contained in:
Lemon
2024-10-14 15:52:00 +08:00
parent 1acb03f56e
commit 1776075ac2
11 changed files with 544 additions and 2 deletions

View File

@@ -0,0 +1,126 @@
package com.jsowell.pile.domain;
import com.jsowell.common.annotation.Excel;
import com.jsowell.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 车辆绑定优惠券记录对象 car_coupon_record
*
* @author jsowell
* @date 2024-10-14
*/
public class CarCouponRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 订单编号
*/
@Excel(name = "订单编号")
private String orderCode;
/**
* 站点id
*/
@Excel(name = "站点id")
private Long stationId;
/**
* 车牌号码
*/
@Excel(name = "车牌号码")
private String plateNumber;
/**
* 绑定优惠券返回码
*/
@Excel(name = "绑定优惠券返回码")
private String returnCode;
/**
* 返回信息
*/
@Excel(name = "返回信息")
private String returnMsg;
/**
* 删除标识0-否1-是)
*/
private String delFlag;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
public void setStationId(Long stationId) {
this.stationId = stationId;
}
public Long getStationId() {
return stationId;
}
public void setPlateNumber(String plateNumber) {
this.plateNumber = plateNumber;
}
public String getPlateNumber() {
return plateNumber;
}
public void setReturnCode(String returnCode) {
this.returnCode = returnCode;
}
public String getReturnCode() {
return returnCode;
}
public void setReturnMsg(String returnMsg) {
this.returnMsg = returnMsg;
}
public String getReturnMsg() {
return returnMsg;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
.append("id", getId())
.append("orderCode", getOrderCode())
.append("stationId", getStationId())
.append("plateNumber", getPlateNumber())
.append("returnCode", getReturnCode())
.append("returnMsg", getReturnMsg())
.append("createTime", getCreateTime())
.append("delFlag", getDelFlag())
.toString();
}
}

View File

@@ -0,0 +1,63 @@
package com.jsowell.pile.mapper;
import java.util.List;
import com.jsowell.pile.domain.CarCouponRecord;
import org.springframework.stereotype.Repository;
/**
* 车辆绑定优惠券记录Mapper接口
*
* @author jsowell
* @date 2024-10-14
*/
@Repository
public interface CarCouponRecordMapper {
/**
* 查询车辆绑定优惠券记录
*
* @param id 车辆绑定优惠券记录主键
* @return 车辆绑定优惠券记录
*/
public CarCouponRecord selectCarCouponRecordById(Long id);
/**
* 查询车辆绑定优惠券记录列表
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 车辆绑定优惠券记录集合
*/
public List<CarCouponRecord> selectCarCouponRecordList(CarCouponRecord carCouponRecord);
/**
* 新增车辆绑定优惠券记录
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 结果
*/
public int insertCarCouponRecord(CarCouponRecord carCouponRecord);
/**
* 修改车辆绑定优惠券记录
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 结果
*/
public int updateCarCouponRecord(CarCouponRecord carCouponRecord);
/**
* 删除车辆绑定优惠券记录
*
* @param id 车辆绑定优惠券记录主键
* @return 结果
*/
public int deleteCarCouponRecordById(Long id);
/**
* 批量删除车辆绑定优惠券记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCarCouponRecordByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.jsowell.pile.service;
import java.util.List;
import com.jsowell.pile.domain.CarCouponRecord;
/**
* 车辆绑定优惠券记录Service接口
*
* @author jsowell
* @date 2024-10-14
*/
public interface CarCouponRecordService {
/**
* 查询车辆绑定优惠券记录
*
* @param id 车辆绑定优惠券记录主键
* @return 车辆绑定优惠券记录
*/
public CarCouponRecord selectCarCouponRecordById(Long id);
/**
* 查询车辆绑定优惠券记录列表
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 车辆绑定优惠券记录集合
*/
public List<CarCouponRecord> selectCarCouponRecordList(CarCouponRecord carCouponRecord);
/**
* 新增车辆绑定优惠券记录
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 结果
*/
public int insertCarCouponRecord(CarCouponRecord carCouponRecord);
/**
* 修改车辆绑定优惠券记录
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 结果
*/
public int updateCarCouponRecord(CarCouponRecord carCouponRecord);
/**
* 批量删除车辆绑定优惠券记录
*
* @param ids 需要删除的车辆绑定优惠券记录主键集合
* @return 结果
*/
public int deleteCarCouponRecordByIds(Long[] ids);
/**
* 删除车辆绑定优惠券记录信息
*
* @param id 车辆绑定优惠券记录主键
* @return 结果
*/
public int deleteCarCouponRecordById(Long id);
}

View File

@@ -0,0 +1,89 @@
package com.jsowell.pile.service.impl;
import java.util.List;
import com.jsowell.common.util.DateUtils;
import com.jsowell.pile.service.CarCouponRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jsowell.pile.mapper.CarCouponRecordMapper;
import com.jsowell.pile.domain.CarCouponRecord;
/**
* 车辆绑定优惠券记录Service业务层处理
*
* @author jsowell
* @date 2024-10-14
*/
@Service
public class CarCouponRecordServiceImpl implements CarCouponRecordService {
@Autowired
private CarCouponRecordMapper carCouponRecordMapper;
/**
* 查询车辆绑定优惠券记录
*
* @param id 车辆绑定优惠券记录主键
* @return 车辆绑定优惠券记录
*/
@Override
public CarCouponRecord selectCarCouponRecordById(Long id) {
return carCouponRecordMapper.selectCarCouponRecordById(id);
}
/**
* 查询车辆绑定优惠券记录列表
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 车辆绑定优惠券记录
*/
@Override
public List<CarCouponRecord> selectCarCouponRecordList(CarCouponRecord carCouponRecord) {
return carCouponRecordMapper.selectCarCouponRecordList(carCouponRecord);
}
/**
* 新增车辆绑定优惠券记录
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 结果
*/
@Override
public int insertCarCouponRecord(CarCouponRecord carCouponRecord) {
carCouponRecord.setCreateTime(DateUtils.getNowDate());
return carCouponRecordMapper.insertCarCouponRecord(carCouponRecord);
}
/**
* 修改车辆绑定优惠券记录
*
* @param carCouponRecord 车辆绑定优惠券记录
* @return 结果
*/
@Override
public int updateCarCouponRecord(CarCouponRecord carCouponRecord) {
return carCouponRecordMapper.updateCarCouponRecord(carCouponRecord);
}
/**
* 批量删除车辆绑定优惠券记录
*
* @param ids 需要删除的车辆绑定优惠券记录主键
* @return 结果
*/
@Override
public int deleteCarCouponRecordByIds(Long[] ids) {
return carCouponRecordMapper.deleteCarCouponRecordByIds(ids);
}
/**
* 删除车辆绑定优惠券记录信息
*
* @param id 车辆绑定优惠券记录主键
* @return 结果
*/
@Override
public int deleteCarCouponRecordById(Long id) {
return carCouponRecordMapper.deleteCarCouponRecordById(id);
}
}

View File

@@ -4096,9 +4096,14 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
vo.setEndSOC(orderVO.getEndSoc());
vo.setChargeTime(orderVO.getChargingTime());
vo.setChargeDegree(orderVO.getChargingDegree());
vo.setSettleAmount(orderVO.getSettleAmount());
vo.setPayMode(orderVO.getPayMode());
vo.setMemberId(orderVO.getMemberId());
return vo;
}
@Override
public List<OrderBasicInfo> queryOrdersByPileConnectorCodeAndStatus(String pileConnectorCode, String orderStatus, String payStatus) {
return orderBasicInfoMapper.queryOrdersByPileConnectorCodeAndStatus(pileConnectorCode, orderStatus, payStatus);

View File

@@ -978,8 +978,8 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
detailVO.setStartSOC(startSoc);
detailVO.setEndSOC(endSoc);
detailVO.setChargeDegree(realTimeMonitorData.getChargingDegree());
detailVO.setTimeRemaining(realTimeMonitorData.getTimeRemaining());
detailVO.setChargeDegree(realTimeMonitorData.getChargingDegree()); // 充电度数
detailVO.setTimeRemaining(realTimeMonitorData.getTimeRemaining()); // 剩余时长
} else if (StringUtils.equals(PileConnectorDataBaseStatusEnum.FAULT.getValue(), status)) {
// 故障
// 查询故障原因

View File

@@ -175,4 +175,14 @@ public class BusinessOrderDetailInfoVO {
*/
private String createTime;
/**
* 支付方式
*/
private String payMode;
/**
* 会员id
*/
private String memberId;
}

View File

@@ -146,4 +146,9 @@ public class OrderVO {
* 订单创建时间
*/
private String createTime;
/**
* 会员id
*/
private String memberId;
}