| | |
| | | |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | |
| | | import com.ruoyi.other.api.domain.VipSetting; |
| | | import com.ruoyi.other.api.feignClient.ShopBalanceStatementClient; |
| | | import com.ruoyi.other.api.feignClient.ShopClient; |
| | | import com.ruoyi.other.api.feignClient.StoreClient; |
| | | import com.ruoyi.other.api.feignClient.VipSettingClient; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | import static com.ruoyi.common.core.constant.SecurityConstants.USER_APPLET_KEY; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | |
| | | @Resource |
| | | private AppUserService appUserService; |
| | | @Resource |
| | | private StoreClient storeClient; |
| | | @Resource |
| | | private UserCouponService userCouponService; |
| | | |
| | | @Resource |
| | |
| | | private VipSettingClient vipSettingClient; |
| | | @Resource |
| | | private UserPointService userPointService; |
| | | @Resource |
| | | private VipSettingService vipSettingService; |
| | | @Resource |
| | | private AppUserMapper appUserMapper; |
| | | @Resource |
| | |
| | | |
| | | @Resource |
| | | private WeChatUtil weChatUtil; |
| | | |
| | | @Resource |
| | | private IAppUserGiveawayTemporaryService appUserGiveawayTemporaryService; |
| | | |
| | | @Value("${file.upload.location}") |
| | | private String filePath; |
| | |
| | | } else { |
| | | user.setIsSign(0); |
| | | } |
| | | |
| | | List<AppUserGiveawayTemporary> temporaryList = appUserGiveawayTemporaryService.list(new LambdaQueryWrapper<AppUserGiveawayTemporary>() |
| | | .eq(AppUserGiveawayTemporary::getAppUserId, userId)); |
| | | |
| | | user.setLavePoint(temporaryList.stream().mapToInt(AppUserGiveawayTemporary::getTotalPoint).sum() + user.getTotalPoint()); |
| | | return R.ok(user); |
| | | } |
| | | |
| | |
| | | public void vipUpgrade(@RequestParam("appUserId") Long appUserId){ |
| | | appUserService.vipUpgrade(appUserId); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/vipConsumption") |
| | | public void vipConsumption(@RequestParam("appUserId") Long appUserId){ |
| | | appUserService.vipConsumption(appUserId); |
| | | } |
| | | |
| | | /** |
| | | * 检查会员降级 |