退单问题修复,售后记录查询问题修复

This commit is contained in:
donqi 2022-10-15 01:45:59 +08:00
parent b99cf43949
commit cbfb18a235
2 changed files with 9 additions and 7 deletions

View File

@ -156,12 +156,14 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
try { try {
response = adapayService.payReverse(orderMaster.getDeptId(), financialMaster.getPaymentId(), String.valueOf(refundMoney)); response = adapayService.payReverse(orderMaster.getDeptId(), financialMaster.getPaymentId(), String.valueOf(refundMoney));
if (AdapayStatusEnum.succeeded.code.equals(response.getString("status"))) { if (AdapayStatusEnum.succeeded.code.equals(response.getString("status"))) {
if (AdapayStatusEnum.succeeded.code.equals(response.getString("status"))) { financialMaster.setPayMoney(financialMaster.getPayMoney().subtract(refundMoney));
financialDetailService.updateFinancialDetail(financialDetail); financialMasterService.updateFinancialMaster(financialMaster);
} financialDetailService.updateFinancialDetail(financialDetail);
} else if (AdapayStatusEnum.failed.code.equals(response.getString("status"))) {
throw new BaseException(response.getString("error_msg"));
} }
} catch (BaseAdaPayException e) { } catch (BaseAdaPayException e) {
throw new BaseException("发起退款异常!"); throw new BaseException(e.getMessage());
} }
} }
} }

View File

@ -40,9 +40,9 @@
<if test="refund != null "> and refund = #{refund}</if> <if test="refund != null "> and refund = #{refund}</if>
<if test="agreedRefund != null "> and agreed_refund = #{agreedRefund}</if> <if test="agreedRefund != null "> and agreed_refund = #{agreedRefund}</if>
<if test="customerFinalCheck != null "> and customer_final_check = #{customerFinalCheck}</if> <if test="customerFinalCheck != null "> and customer_final_check = #{customerFinalCheck}</if>
<if test="customerFinalCheck == null"> <!-- <if test="customerFinalCheck == null">-->
and ( customer_final_check = '0' or customer_final_check is null ) <!-- and ( customer_final_check = '0' or customer_final_check is null )-->
</if> <!-- </if>-->
</where> </where>
</select> </select>