| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.service.VipCenterService; |
| | | import com.ruoyi.account.service.VipSettingService; |
| | | import com.ruoyi.account.vo.vip.Level; |
| | |
| | | import com.ruoyi.other.api.feignClient.BaseSettingClient; |
| | | import com.ruoyi.other.api.feignClient.GoodsVipClient; |
| | | import com.ruoyi.other.api.feignClient.RemoteVipSettingClient; |
| | | import com.ruoyi.other.api.feignClient.VipGoodClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | private VipSettingService vipSettingService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private VipGoodClient vipGoodClient; |
| | | @Resource |
| | | private AppUserService appUserService; |
| | | @Resource |
| | | private VipCenterService vipCenterService; |
| | | |
| | |
| | | @GetMapping("/check") |
| | | @ApiOperation(value = "会员申请检查", tags = {"会员中心-小程序"}) |
| | | public R<Boolean> check(@ApiParam("4:准代理,5:代理,6:总代理,7:合伙人") @RequestParam Integer type) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userid = loginUser.getUserid(); |
| | | if (type == 4){ |
| | | return R.ok(vipCenterService.checkReadyToBeProxy(userid, type)); |
| | | }else if (type == 5){ |
| | | return R.ok(vipCenterService.checkReadyToBeAgent(userid)); |
| | | }else if (type == 6){ |
| | | return R.ok(vipCenterService.checkReadyToBeTotalAgent(userid)); |
| | | }else if (type == 7){ |
| | | return R.ok(vipCenterService.checkReadyToBePartner(userid)); |
| | | }else { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return R.ok(vipCenterService.check(type)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | private boolean checkSuccess(R<?> r) { |