|
|
@@ -41,12 +41,14 @@ public class VipController {
|
|
|
* 会员信息
|
|
|
*/
|
|
|
@GetMapping("/get/info")
|
|
|
- public Result<VipUserPageResp> getVipInfo(@RequestParam(defaultValue = "1") Integer months) {
|
|
|
+ public Result<VipUserPageResp> getVipInfo(@RequestParam(defaultValue = "1") Integer months, @RequestParam(defaultValue = "1") Boolean isDeduct) {
|
|
|
Long userId = StpUserUtil.getUserIdAfterLogin();
|
|
|
VipUserPageResp vipUserPageResp = new VipUserPageResp();
|
|
|
vipUserPageResp.setMonths(months);
|
|
|
- //填充会员信息
|
|
|
- vipFrontService.fillVipInfo(userId, vipUserPageResp);
|
|
|
+ if (isDeduct) {
|
|
|
+ //填充会员信息
|
|
|
+ vipFrontService.fillVipInfo(userId, vipUserPageResp);
|
|
|
+ }
|
|
|
List<VipGoodsSkuFrontView> vipGoodsSkuFrontViews = beanSearcher.searchAll(VipGoodsSkuFrontView.class, MapUtils.flatBuilder(request.getParameterMap()).orderBy(VipGoodsSkuFrontView::getGoodsId).build());
|
|
|
vipUserPageResp.setSkus(vipGoodsSkuFrontViews);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(vipUserPageResp);
|