| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | return R.ok(); |
| | | |
| | | } |
| | | @Resource |
| | | private TAppUserVipDetailService appUserVipDetailService; |
| | | |
| | | @ApiOperation(value = "个人中心信息", tags = {"小程序-个人中心"}) |
| | | @GetMapping(value = "/user/info") |
| | |
| | | if (byId.getVipEndTime()==null||byId.getVipEndTime().isBefore(LocalDateTime.now())){ |
| | | appUserInfoDto.setIsVip(0); |
| | | }else { |
| | | TAppUserVipDetail one = appUserVipDetailService.getOne(new LambdaQueryWrapper<TAppUserVipDetail>() |
| | | .eq(TAppUserVipDetail::getAppUserId, userId) |
| | | .eq(TAppUserVipDetail::getVipId, byId.getVipId()) |
| | | .last(" and now() between start_time and end_time")); |
| | | Long count = appCouponService.lambdaQuery().eq(TAppCoupon::getDetailId, one.getId()).count(); |
| | | appUserInfoDto.setVipCouponNum(count); |
| | | appUserInfoDto.setIsVip(1); |
| | | appUserInfoDto.setVipExpireTime(byId.getVipEndTime()); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |