|
|
@@ -362,6 +362,23 @@ public class UserController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(view);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 可用现金礼品卡列表
|
|
|
+ */
|
|
|
+ @GetMapping("/get/available/giftCard")
|
|
|
+ public Result<List<GiftCardUserPayFrontView>> getAvailGiftCard() {
|
|
|
+ long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
+ String condition = String.format("and to_user_id = %s", userId);
|
|
|
+ List<GiftCardUserPayFrontView> view = beanSearcher.searchAll(GiftCardUserPayFrontView.class, MapUtils.builder()
|
|
|
+ .put("condition", condition)
|
|
|
+ .put("uid", userId)
|
|
|
+ //现金卡
|
|
|
+ .field(GiftCardUserPayFrontView::getGcType, 1)
|
|
|
+ .orderBy(GiftCardUserRecordView::getIsUsed).asc()
|
|
|
+ .orderBy(GiftCardUserPayFrontView::getId).desc().build());
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(view);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 礼品卡分享详情
|
|
|
*/
|