add 新增根据订单号查询保险信息方法

This commit is contained in:
Lemon
2025-09-05 15:05:54 +08:00
parent c2487295c5
commit 22d13cf995
4 changed files with 37 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package com.jsowell.pile.mapper;
import java.util.List;
import com.jsowell.pile.domain.OrderInsuranceInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
@@ -60,4 +61,11 @@ public interface OrderInsuranceInfoMapper {
* @return 结果
*/
public int deleteOrderInsuranceInfoByIds(Long[] ids);
/**
* 通过订单号查询订单保险信息
* @param orderCode
* @return
*/
OrderInsuranceInfo getInfoByOrderCode(@Param("orderCode") String orderCode);
}

View File

@@ -58,4 +58,11 @@ public interface IOrderInsuranceInfoService {
* @return 结果
*/
public int deleteOrderInsuranceInfoById(Long id);
/**
* 通过订单号查询订单保险信息
* @param orderCode
* @return
*/
OrderInsuranceInfo getInsuranceInfoByOrderCode(String orderCode);
}

View File

@@ -87,4 +87,14 @@ public class OrderInsuranceInfoServiceImpl implements IOrderInsuranceInfoService
public int deleteOrderInsuranceInfoById(Long id) {
return orderInsuranceInfoMapper.deleteOrderInsuranceInfoById(id);
}
/**
* 通过订单号查询订单保险信息
* @param orderCode
* @return
*/
@Override
public OrderInsuranceInfo getInsuranceInfoByOrderCode(String orderCode) {
return orderInsuranceInfoMapper.getInfoByOrderCode(orderCode);
}
}

View File

@@ -20,6 +20,11 @@
select id, insurance_transaction_code, order_code, trade_amount, create_time, create_by, update_time, update_by, del_flag from order_insurance_info
</sql>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, insurance_transaction_code, order_code, trade_amount, create_time, create_by, update_time, update_by, del_flag
</sql>
<select id="selectOrderInsuranceInfoList" parameterType="com.jsowell.pile.domain.OrderInsuranceInfo" resultMap="OrderInsuranceInfoResult">
<include refid="selectOrderInsuranceInfoVo"/>
<where>
@@ -83,4 +88,11 @@
#{id}
</foreach>
</delete>
<select id="getInfoByOrderCode" resultMap="OrderInsuranceInfoResult">
select
<include refid="Base_Column_List"/>
from order_insurance_info where del_flag = '0'
and order_code = #{orderCode,jdbcType=VARCHAR}
</select>
</mapper>