| | |
| | | import com.ruoyi.other.api.dto.ExchangeCodeBindDTO; |
| | | import com.ruoyi.other.api.dto.ExchangeCodeConsumeDTO; |
| | | import com.ruoyi.other.api.dto.ExchangeCodePackageSaveDTO; |
| | | import com.ruoyi.other.api.dto.ExchangeCodeUseRecordQuery; |
| | | import com.ruoyi.other.api.domain.TExchangeCodeUseRecord; |
| | | import com.ruoyi.other.api.vo.ExchangeCodeBindResultVO; |
| | | import com.ruoyi.other.api.vo.ExchangeCodeConsumeResultVO; |
| | | import com.ruoyi.other.api.vo.ExchangeCodePackageDetailVO; |
| | |
| | | import java.util.Map; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipOutputStream; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | @RestController |
| | | @RequestMapping("/exchange-code-package") |
| | |
| | | return R.ok(exchangeCodePackageService.consumeBalance(dto)); |
| | | } |
| | | |
| | | @PostMapping("/useRecord/page") |
| | | @ApiOperation(value = "兑换码余额流水分页", tags = {"小程序-兑换码"}) |
| | | public R<Page<TExchangeCodeUseRecord>> useRecordPage(@RequestBody ExchangeCodeUseRecordQuery query) { |
| | | return R.ok(exchangeCodePackageService.useRecordPage(query)); |
| | | } |
| | | |
| | | @GetMapping("/useRecord/detail") |
| | | @ApiOperation(value = "兑换码余额流水详情", tags = {"小程序-兑换码"}) |
| | | public R<TExchangeCodeUseRecord> useRecordDetail(@RequestParam("id") Long id, |
| | | @RequestParam("userId") Long userId) { |
| | | return R.ok(exchangeCodePackageService.useRecordDetail(id, userId)); |
| | | } |
| | | |
| | | private String buildQrPayload(ExchangeCodeDetailVO detail) { |
| | | return "code=" + detail.getCode() + "&password=" + detail.getPassword(); |
| | | } |