feat:作废发票
This commit is contained in:
1 parent
7ff1eb93dc
commit
7aa19b5e07
3 files changed
+25
No files matched your search
+7
@@ -42,6 +42,13 @@ public class WalletRechargeInvoiceController {
|
||||
return R.ok(walletRechargeInvoiceService.getInvoice(id));
|
||||
}
|
||||
|
||||
@GetMapping("/back")
|
||||
@Operation(summary = "退回作废发票")
|
||||
public R backInvoice(@RequestParam Long id) {
|
||||
walletRechargeInvoiceService.backInvoice(id);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/bind-invoice")
|
||||
@Operation(summary = "绑定发票")
|
||||
public R bindInvoice(@Valid @RequestBody WalletRechargeBindInvoiceDto dto) {
|
||||
|
||||
+5
@@ -13,6 +13,11 @@ import java.util.ArrayList;
|
||||
|
||||
public interface WalletRechargeInvoiceService extends IService<WalletRechargeInvoiceEntity> {
|
||||
|
||||
/**
|
||||
* 退回作废发票
|
||||
*/
|
||||
void backInvoice(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
|
||||
+13
@@ -50,6 +50,19 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl<WalletRecharge
|
||||
private final RemoteUserService remoteUserService;
|
||||
private final RemoteWalletSettingService remoteWalletSettingService;
|
||||
|
||||
/**
|
||||
* 退回作废发票
|
||||
*/
|
||||
@Override
|
||||
public void backInvoice(Long id) {
|
||||
WalletRechargeInvoiceVo detail = baseMapper.joinById(id);
|
||||
if (ObjectUtil.isEmpty(detail)) throw new RuntimeException("查询不到发票");
|
||||
baseMapper.update(new LambdaUpdateWrapper<WalletRechargeInvoiceEntity>()
|
||||
.set(WalletRechargeInvoiceEntity::getPicUrl, null)
|
||||
.eq(WalletRechargeInvoiceEntity::getId, id)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user