debug 蓝牙充值

This commit is contained in:
墨大叔 2024-05-24 09:33:41 +08:00
parent 5162eb39c2
commit 6dcb9f123e
5 changed files with 37 additions and 0 deletions

View File

@ -139,4 +139,9 @@ public interface TransactionBillMapper
* @param status 修改后的设备充值状态
*/
int updateDeviceRechargeStatusByIds(@Param("billIds") List<Long> billIds, @Param("status") String status);
/**
* 蓝牙充值成功
*/
int bluetoothRechargeSuccess(String billNo);
}

View File

@ -367,4 +367,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{billId}
</foreach>
</update>
<update id="bluetoothRechargeSuccess">
update sm_transaction_bill
set device_recharge_status = '1'
where bill_no = #{billNo} and type = '1' and device_recharge_status = '3'
</update>
</mapper>

View File

@ -215,4 +215,12 @@ public interface TransactionBillService
* @return
*/
BigDecimal getServiceRate(Long deviceId, Long channelId);
/**
* 蓝牙充值成功
* @param billNo
* @return
*/
boolean bluetoothRechargeSuccess(String billNo);
}

View File

@ -786,4 +786,16 @@ public class TransactionBillServiceImpl implements TransactionBillService {
wxPayService.closeOrder(billNo);
}
}
/**
* 蓝牙充值成功
*
* @param billNo
* @return
*/
@Override
public boolean bluetoothRechargeSuccess(String billNo) {
return transactionBillMapper.bluetoothRechargeSuccess(billNo) == 1;
}
}

View File

@ -203,4 +203,10 @@ public class AppTransactionBillController extends BaseController
return getDataTable(smTransactionBillService.selectSmTransactionBillList(query));
}
@ApiOperation("蓝牙充值成功回调")
@GetMapping("/recharge/{billNo}/bluetoothSuccess")
public AjaxResult bluetoothRechargeSuccess(@PathVariable String billNo) {
return success(smTransactionBillService.bluetoothRechargeSuccess(billNo));
}
}