|
|
@@ -558,15 +558,17 @@ public class DraftService {
|
|
558
|
558
|
response.setEstimatedTotal(draft.getEstimatedTotal());
|
|
559
|
559
|
response.setEstimatedPerCapita(draft.getEstimatedPerCapita());
|
|
560
|
560
|
response.setSelectedPlanId(draft.getSelectedPlanId());
|
|
561
|
|
- response.setQrCodeUrl(findQrCodeUrlByDraftId(draft.getId()));
|
|
|
561
|
+ FeRegistrationBatch batch = findRegistrationBatchByDraftId(draft.getId());
|
|
|
562
|
+ response.setQrCodeUrl(batch != null ? batch.getQrCodeUrl() : null);
|
|
|
563
|
+ response.setQrToken(batch != null ? batch.getQrToken() : null);
|
|
562
|
564
|
response.setFields(fields.stream().map(this::toFieldResponse).collect(Collectors.toList()));
|
|
563
|
565
|
response.setCreateTime(draft.getCreateTime());
|
|
564
|
566
|
response.setUpdateTime(draft.getUpdateTime());
|
|
565
|
567
|
return response;
|
|
566
|
568
|
}
|
|
567
|
569
|
|
|
568
|
|
- /** 草稿确认后关联订单 → 登记批次上的小程序码;未确认则为 null。 */
|
|
569
|
|
- private String findQrCodeUrlByDraftId(Long draftId) {
|
|
|
570
|
+ /** 草稿确认后关联订单 → 登记批次;未确认则为 null。 */
|
|
|
571
|
+ private FeRegistrationBatch findRegistrationBatchByDraftId(Long draftId) {
|
|
570
|
572
|
if (draftId == null) {
|
|
571
|
573
|
return null;
|
|
572
|
574
|
}
|
|
|
@@ -577,11 +579,10 @@ public class DraftService {
|
|
577
|
579
|
if (order == null) {
|
|
578
|
580
|
return null;
|
|
579
|
581
|
}
|
|
580
|
|
- FeRegistrationBatch batch = feRegistrationBatchMapper.selectOne(new LambdaQueryWrapper<FeRegistrationBatch>()
|
|
|
582
|
+ return feRegistrationBatchMapper.selectOne(new LambdaQueryWrapper<FeRegistrationBatch>()
|
|
581
|
583
|
.eq(FeRegistrationBatch::getOrderId, order.getId())
|
|
582
|
584
|
.orderByDesc(FeRegistrationBatch::getId)
|
|
583
|
585
|
.last("LIMIT 1"));
|
|
584
|
|
- return batch != null ? batch.getQrCodeUrl() : null;
|
|
585
|
586
|
}
|
|
586
|
587
|
|
|
587
|
588
|
private DraftFieldResponse toFieldResponse(FeDraftField entity) {
|