|
@@ -4,6 +4,7 @@ import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.model.response.VipUserPageResp;
|
|
import com.cyksj.model.response.VipUserPageResp;
|
|
|
import com.cyksj.model.views.VipGoodsSkuFrontView;
|
|
import com.cyksj.model.views.VipGoodsSkuFrontView;
|
|
|
|
|
+import com.cyksj.service.vip.VipFrontService;
|
|
|
import com.cyksj.web.util.StpUserUtil;
|
|
import com.cyksj.web.util.StpUserUtil;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
@@ -14,10 +15,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.math.BigDecimal;
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * server/银河会员
|
|
|
* 项目名: yhlxj2
|
|
* 项目名: yhlxj2
|
|
|
* 文件名: VipController
|
|
* 文件名: VipController
|
|
|
* 创建者: JavaZou
|
|
* 创建者: JavaZou
|
|
@@ -33,22 +34,19 @@ public class VipController {
|
|
|
|
|
|
|
|
private final HttpServletRequest request;
|
|
private final HttpServletRequest request;
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 会员关联规格列表
|
|
|
|
|
- */
|
|
|
|
|
- @GetMapping("/get/skus")
|
|
|
|
|
- public Result<List<VipGoodsSkuFrontView>> getVipSkus() {
|
|
|
|
|
- List<VipGoodsSkuFrontView> vipGoodsSkuFrontViews = beanSearcher.searchAll(VipGoodsSkuFrontView.class, MapUtils.flatBuilder(request.getParameterMap()).orderBy(VipGoodsSkuFrontView::getGoodsId).build());
|
|
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(vipGoodsSkuFrontViews);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ private final VipFrontService vipFrontService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 会员可抵扣金额
|
|
|
|
|
|
|
+ * 会员信息
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping("/get/deduct/money")
|
|
|
|
|
- public Result<VipUserPageResp> getDeductMoney() {
|
|
|
|
|
|
|
+ @GetMapping("/get/info")
|
|
|
|
|
+ public Result<VipUserPageResp> getVipInfo() {
|
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
- BigDecimal deductMoney = BigDecimal.ZERO;
|
|
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
|
|
+ VipUserPageResp vipUserPageResp = new VipUserPageResp();
|
|
|
|
|
+ //填充会员信息
|
|
|
|
|
+ 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);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|