mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 04:25:21 +08:00
新增 订单保险信息相关实体类、Service、Mapper
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 订单保险信息对象 order_insurance_info
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
public class OrderInsuranceInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保险交易流水号
|
||||
*/
|
||||
@Excel(name = "保险交易流水号")
|
||||
private String insuranceTransactionCode;
|
||||
|
||||
/**
|
||||
* 关联订单号
|
||||
*/
|
||||
@Excel(name = "关联订单号")
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 保险支付金额
|
||||
*/
|
||||
@Excel(name = "保险支付金额")
|
||||
private BigDecimal tradeAmount;
|
||||
|
||||
/**
|
||||
* 删除标识(0-否;1-是)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setInsuranceTransactionCode(String insuranceTransactionCode) {
|
||||
this.insuranceTransactionCode = insuranceTransactionCode;
|
||||
}
|
||||
|
||||
public String getInsuranceTransactionCode() {
|
||||
return insuranceTransactionCode;
|
||||
}
|
||||
|
||||
public void setOrderCode(String orderCode) {
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getOrderCode() {
|
||||
return orderCode;
|
||||
}
|
||||
|
||||
public void setTradeAmount(BigDecimal tradeAmount) {
|
||||
this.tradeAmount = tradeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getTradeAmount() {
|
||||
return tradeAmount;
|
||||
}
|
||||
|
||||
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("insuranceTransactionCode", getInsuranceTransactionCode())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("tradeAmount", getTradeAmount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,11 @@ public class PayOrderDTO extends BaseDTO{
|
||||
*/
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 保险金额
|
||||
*/
|
||||
private BigDecimal insuranceAmount;
|
||||
|
||||
/**
|
||||
* @see ScenarioEnum
|
||||
* 支付场景
|
||||
|
||||
@@ -23,6 +23,11 @@ public class PayOrderSuccessCallbackDTO {
|
||||
*/
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 保险金额
|
||||
*/
|
||||
private BigDecimal insuranceAmount;
|
||||
|
||||
/**
|
||||
* 支付方式
|
||||
* 1-余额支付;2-微信支付;3-支付宝支付
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.OrderInsuranceInfo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 订单保险信息Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderInsuranceInfoMapper {
|
||||
/**
|
||||
* 查询订单保险信息
|
||||
*
|
||||
* @param id 订单保险信息主键
|
||||
* @return 订单保险信息
|
||||
*/
|
||||
public OrderInsuranceInfo selectOrderInsuranceInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单保险信息列表
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 订单保险信息集合
|
||||
*/
|
||||
public List<OrderInsuranceInfo> selectOrderInsuranceInfoList(OrderInsuranceInfo orderInsuranceInfo);
|
||||
|
||||
/**
|
||||
* 新增订单保险信息
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInsuranceInfo(OrderInsuranceInfo orderInsuranceInfo);
|
||||
|
||||
/**
|
||||
* 修改订单保险信息
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInsuranceInfo(OrderInsuranceInfo orderInsuranceInfo);
|
||||
|
||||
/**
|
||||
* 删除订单保险信息
|
||||
*
|
||||
* @param id 订单保险信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInsuranceInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单保险信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInsuranceInfoByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.OrderInsuranceInfo;
|
||||
|
||||
/**
|
||||
* 订单保险信息Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
public interface IOrderInsuranceInfoService {
|
||||
/**
|
||||
* 查询订单保险信息
|
||||
*
|
||||
* @param id 订单保险信息主键
|
||||
* @return 订单保险信息
|
||||
*/
|
||||
public OrderInsuranceInfo selectOrderInsuranceInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单保险信息列表
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 订单保险信息集合
|
||||
*/
|
||||
public List<OrderInsuranceInfo> selectOrderInsuranceInfoList(OrderInsuranceInfo orderInsuranceInfo);
|
||||
|
||||
/**
|
||||
* 新增订单保险信息
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInsuranceInfo(OrderInsuranceInfo orderInsuranceInfo);
|
||||
|
||||
/**
|
||||
* 修改订单保险信息
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInsuranceInfo(OrderInsuranceInfo orderInsuranceInfo);
|
||||
|
||||
/**
|
||||
* 批量删除订单保险信息
|
||||
*
|
||||
* @param ids 需要删除的订单保险信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInsuranceInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除订单保险信息信息
|
||||
*
|
||||
* @param id 订单保险信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInsuranceInfoById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.OrderInsuranceInfoMapper;
|
||||
import com.jsowell.pile.domain.OrderInsuranceInfo;
|
||||
import com.jsowell.pile.service.IOrderInsuranceInfoService;
|
||||
|
||||
/**
|
||||
* 订单保险信息Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-09-05
|
||||
*/
|
||||
@Service
|
||||
public class OrderInsuranceInfoServiceImpl implements IOrderInsuranceInfoService {
|
||||
@Autowired
|
||||
private OrderInsuranceInfoMapper orderInsuranceInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询订单保险信息
|
||||
*
|
||||
* @param id 订单保险信息主键
|
||||
* @return 订单保险信息
|
||||
*/
|
||||
@Override
|
||||
public OrderInsuranceInfo selectOrderInsuranceInfoById(Long id) {
|
||||
return orderInsuranceInfoMapper.selectOrderInsuranceInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单保险信息列表
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 订单保险信息
|
||||
*/
|
||||
@Override
|
||||
public List<OrderInsuranceInfo> selectOrderInsuranceInfoList(OrderInsuranceInfo orderInsuranceInfo) {
|
||||
return orderInsuranceInfoMapper.selectOrderInsuranceInfoList(orderInsuranceInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单保险信息
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrderInsuranceInfo(OrderInsuranceInfo orderInsuranceInfo) {
|
||||
orderInsuranceInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return orderInsuranceInfoMapper.insertOrderInsuranceInfo(orderInsuranceInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单保险信息
|
||||
*
|
||||
* @param orderInsuranceInfo 订单保险信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrderInsuranceInfo(OrderInsuranceInfo orderInsuranceInfo) {
|
||||
orderInsuranceInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return orderInsuranceInfoMapper.updateOrderInsuranceInfo(orderInsuranceInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单保险信息
|
||||
*
|
||||
* @param ids 需要删除的订单保险信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInsuranceInfoByIds(Long[] ids) {
|
||||
return orderInsuranceInfoMapper.deleteOrderInsuranceInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单保险信息信息
|
||||
*
|
||||
* @param id 订单保险信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInsuranceInfoById(Long id) {
|
||||
return orderInsuranceInfoMapper.deleteOrderInsuranceInfoById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user