修改费用ID类型为Long,更新相关逻辑和SQL映射

This commit is contained in:
wuweihua
2026-11-14 01:22:12 +08:00
parent 4f2f2db20f
commit 359c3c18e4
5 changed files with 57 additions and 62 deletions
@@ -32,7 +32,7 @@ public interface PrcPayBillFeeMapper
public int insertBatch(@Param("list") List<PrcPayBillFee> fees);
/** 把还没标明来源的费用,关联到本行主键 id。 */
public int fillSourceIdByFeeIds(@Param("feeIds") List<String> feeIds);
public int fillSourceIdByFeeIds(@Param("feeIds") List<Long> feeIds);
/**
* 删除一票订单上来源为计算的费用。提单分摊和人工费用保留。
@@ -582,7 +582,7 @@ public class PayBillServiceImpl implements IPayBillService
adjust.setAmount(delta);
adjust.setCurrency(line.getCurrency());
adjust.setFeeSource("MANUAL");
adjust.setSourceId(source != null && source.getId() != null ? String.valueOf(source.getId()) : null);
adjust.setSourceId(source != null && source.getFeeId() != null ? String.valueOf(source.getFeeId()) : null);
adjust.setRemark(open.getReason());
adjust.setSettleSupplierId(bill.getSupplierId());
adjust.setSettleSupplierName(bill.getSupplierName());
@@ -43,10 +43,10 @@ public class PrcPayBillFeeServiceImpl implements IPrcPayBillFeeService
{
List<PrcPayBillFee> chunk = fees.subList(from, Math.min(from + BATCH_SIZE, fees.size()));
payBillFeeMapper.insertBatch(chunk);
List<String> ownIds = new ArrayList<>();
List<Long> ownIds = new ArrayList<>();
for (PrcPayBillFee fee : chunk)
{
if (fee != null && fee.getFeeId() != null && !fee.getFeeId().isBlank()
if (fee != null && fee.getFeeId() != null
&& (fee.getSourceId() == null || fee.getSourceId().isBlank()))
{
ownIds.add(fee.getFeeId());
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="fillSourceIdByFeeIds">
update prc_pay_bill_fee
set source_id = id
set source_id = cast(fee_id as char)
where (source_id is null or source_id = '')
and fee_id in
<foreach collection="feeIds" item="feeId" open="(" separator="," close=")">#{feeId}</foreach>