This commit is contained in:
Guoqs
2026-03-13 15:49:27 +08:00
parent a6d6f9b0fb
commit 7c84f45e1f
5 changed files with 30 additions and 2 deletions

View File

@@ -33,6 +33,8 @@ public interface AdapayUnsplitRecordMapper {
int batchInsertOrUpdateSelective(@Param("list") List<AdapayUnsplitRecord> list);
int updateByPaymentIdSelective(AdapayUnsplitRecord record);
List<AdapayUnsplitRecord> queryUnsplitOrders(@Param("startTime") String startTime, @Param("endTime") String endTime);
List<AdapayUnsplitRecordVO> queryList();

View File

@@ -30,6 +30,8 @@ public interface AdapayUnsplitRecordService{
int batchInsertOrUpdateSelective(List<AdapayUnsplitRecord> list);
int updateByPaymentIdSelective(AdapayUnsplitRecord record);
List<AdapayUnsplitRecord> queryUnsplitOrders(String startTime, String endTime);
List<AdapayUnsplitRecordVO> queryList();

View File

@@ -74,6 +74,11 @@ public class AdapayUnsplitRecordServiceImpl implements AdapayUnsplitRecordServic
return adapayUnsplitRecordMapper.batchInsertOrUpdateSelective(list);
}
@Override
public int updateByPaymentIdSelective(AdapayUnsplitRecord record) {
return adapayUnsplitRecordMapper.updateByPaymentIdSelective(record);
}
@Override
public List<AdapayUnsplitRecord> queryUnsplitOrders(String startTime, String endTime) {
return adapayUnsplitRecordMapper.queryUnsplitOrders(startTime, endTime);

View File

@@ -736,6 +736,25 @@
</trim>
</insert>
<update id="updateByPaymentIdSelective" parameterType="com.jsowell.pile.domain.AdapayUnsplitRecord">
update adapay_unsplit_record
<set>
<if test="splitFlag != null">
split_flag = #{splitFlag,jdbcType=VARCHAR},
</if>
<if test="splitRemark != null">
split_remark = #{splitRemark,jdbcType=VARCHAR},
</if>
<if test="confirmedSplitAmount != null">
confirmed_split_amount = #{confirmedSplitAmount,jdbcType=DECIMAL},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where payment_id = #{paymentId,jdbcType=VARCHAR}
</update>
<select id="queryUnsplitOrders" resultMap="BaseResultMap">
select * from adapay_unsplit_record
where pay_time >= #{startTime} and pay_time &lt;= #{endTime}

View File

@@ -926,7 +926,7 @@ public class JsowellTask {
updateRecord.setPaymentId(paymentId);
updateRecord.setConfirmedSplitAmount(newConfirmedAmt);
updateRecord.setUpdateTime(DateUtils.getNowDate());
adapayUnsplitRecordService.insertOrUpdateSelective(updateRecord);
adapayUnsplitRecordService.updateByPaymentIdSelective(updateRecord);
}
private void markSplitResult(String paymentId, String splitFlag, String splitRemark) {
@@ -935,7 +935,7 @@ public class JsowellTask {
updateRecord.setSplitFlag(splitFlag);
updateRecord.setSplitRemark(splitRemark);
updateRecord.setUpdateTime(DateUtils.getNowDate());
adapayUnsplitRecordService.insertOrUpdateSelective(updateRecord);
adapayUnsplitRecordService.updateByPaymentIdSelective(updateRecord);
}
private AdapayUnsplitRecord convertRowToRecord(Row row, Map<String, Integer> headerIndexMap, DataFormatter formatter) {