| | |
| | | package com.ruoyi.shop.controller.console; |
| | | |
| | | import com.ruoyi.common.core.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopAuthentication; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopProportion; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopRelUser; |
| | |
| | | @Resource |
| | | private ShopProportionService shopProportionService; |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | /** |
| | | * 企业微信H5登录 |
| | | * @param qwUserDetail |
| | |
| | | Long userId = shopStaff.getUserId(); |
| | | SysUser sysUser = remoteUserService.getSysUser(userId).getData(); |
| | | Optional.ofNullable(sysUser).orElseThrow(() -> new ServiceException("登录失败,未查询到用户")); |
| | | Shop shop = shopService.getByShopId(shopStaff.getShopId()); |
| | | if(shop.getFrozenFlag()==1){ |
| | | String userKey = SecurityUtils.getUserKey(); |
| | | redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY+userKey); |
| | | throw new ServiceException("商户已被冻结",401); |
| | | } |
| | | // 构造登录返回信息 |
| | | QwH5LoginVo qwH5LoginVo = new QwH5LoginVo(); |
| | | qwH5LoginVo.setUserid(qwUserDetail.getUserid()); |