| | |
| | | package com.ruoyi.shop.controller.console; |
| | | |
| | | import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingReceiver; |
| | | import com.ruoyi.common.core.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | |
| | | if(shop.getFrozenFlag()==1){ |
| | | String userKey = SecurityUtils.getUserKey(); |
| | | redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY+userKey); |
| | | throw new ServiceException("商户已被冻结",401); |
| | | throw new ServiceException("商户已被冻结,请联系管理员",401); |
| | | } |
| | | // 构造登录返回信息 |
| | | QwH5LoginVo qwH5LoginVo = new QwH5LoginVo(); |
| | |
| | | @PostMapping("/getShopByBelongUserId") |
| | | public R<ShopRelUserVo> getShopByBelongUserId(@RequestBody Long userId) |
| | | { |
| | | Shop shop = shopService.getShopByBelongUserId(userId); |
| | | Optional.ofNullable(shop).orElseThrow(() -> new ServiceException("未查询到商户信息")); |
| | | List<Shop> shopList = shopService.getShopByBelongUserId(userId); |
| | | Optional.ofNullable(shopList.get(0)).orElseThrow(() -> new ServiceException("未查询到商户信息")); |
| | | ShopRelUserVo shopRelUserVo = new ShopRelUserVo(); |
| | | shopRelUserVo.setShopId(shop.getShopId()); |
| | | shopRelUserVo.setShopId(shopList.get(0).getShopId()); |
| | | return R.ok(shopRelUserVo); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/addProfitSharingReceiver") |
| | | R authShop(@RequestBody ProfitSharingReceiver profitSharingReceiver){ |
| | | shopService.addProfitSharingReceiver(profitSharingReceiver); |
| | | return R.ok(); |
| | | /** |
| | | * @description 获取今日任务通知列表 |
| | | * @author jqs |
| | | * @date 2023/8/29 15:03 |
| | | * @param |
| | | * @return R<List<MgtUserTaskMsgVo>> |
| | | */ |
| | | @PostMapping("/getTaskMsgList") |
| | | R<List<MgtUserTaskMsgVo>> getTaskMsgList(){ |
| | | List<MgtUserTaskMsgVo> userTaskMsgVoList = shopService.getTaskMsgList(); |
| | | return R.ok(userTaskMsgVoList); |
| | | } |
| | | |
| | | } |