|
|
@@ -94,14 +94,13 @@ public class UserController {
|
|
|
* 个人中心详情
|
|
|
*/
|
|
|
@GetMapping("/personal")
|
|
|
- public Result<UserPersonalView> getPersonalView(Long yhsId) {
|
|
|
+ public Result<UserPersonalView> getPersonalView(String customId) {
|
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
List<Long> userIds = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
- if (yhsId == null) {
|
|
|
- builder.field(UserTicketView::getYhsId, 0);
|
|
|
- }
|
|
|
+ Long yhsId = yhShopFrontService.getYhsIdByCustomId(customId);
|
|
|
Number ticketNum = beanSearcher.searchCount(UserTicketView.class, builder
|
|
|
+ .field(UserTicketView::getYhsId, yhsId)
|
|
|
.field(UserTicketView::getUserId, userIds).op(Operator.InList)
|
|
|
.field(RenewalView::getStatus, List.of("validity", "overdue", "outside")).op(Operator.InList)
|
|
|
.build());
|
|
|
@@ -133,9 +132,10 @@ public class UserController {
|
|
|
* 用户已有实物权益 可选车票
|
|
|
*/
|
|
|
@GetMapping("/get/available/benefits/tickets")
|
|
|
- public Result<List<UserAvailableGoodsTicketView>> getAvailableBenefitsTickets(Long orderId) {
|
|
|
+ public Result<List<UserAvailableGoodsTicketView>> getAvailableBenefitsTickets(Long orderId, String customId) {
|
|
|
Long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
- List<UserAvailableGoodsTicketView> tickets = userRealOrderBenefitsService.getAvailableBenefitsTickets(userId, orderId);
|
|
|
+ Long yhsId = yhShopFrontService.getYhsIdByCustomId(customId);
|
|
|
+ List<UserAvailableGoodsTicketView> tickets = userRealOrderBenefitsService.getAvailableBenefitsTickets(userId, orderId, yhsId);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(tickets);
|
|
|
}
|
|
|
|