| | |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.api.model.UserClickLog; |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.service.UserClickLogService; |
| | | import com.ruoyi.account.service.VipCenterService; |
| | | import com.ruoyi.account.service.VipSettingService; |
| | | import com.ruoyi.account.vo.vip.Level; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | private VipGoodClient vipGoodClient; |
| | | @Resource |
| | | private GoodsClient goodsClient; |
| | | @Resource |
| | | private AppUserService appUserService; |
| | | @Resource |
| | | private UserClickLogService userClickLogService; |
| | | |
| | | |
| | | @GetMapping("getVipLevelList") |
| | |
| | | |
| | | vipLevel.setLevelList(levelList); |
| | | vipLevel.setCurrentLevel(loginUserVipSetting.getId()); |
| | | |
| | | //添加操作记录 |
| | | AppUser appUser = appUserService.getById(userid); |
| | | UserClickLog userClickLog = new UserClickLog(); |
| | | userClickLog.setDelFlag(0); |
| | | userClickLog.setCreateTime(LocalDateTime.now()); |
| | | userClickLog.setAppUserId(userid); |
| | | userClickLog.setVipId(appUser.getVipId()); |
| | | userClickLogService.save(userClickLog); |
| | | |
| | | return R.ok(vipLevel); |
| | | } catch (Exception e) { |
| | | log.error("会员等级获取失败", e); |