| | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.tools.HttpCurlUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | ShopSalesmanApplyDao salesmanApplyDao; |
| | | |
| | |
| | | } |
| | | // 存放redis |
| | | sysVipInfo.setLevelCard(null); |
| | | String token = redisUserLoginUtils.saveUserInfo(sysVipInfo); |
| | | String token = userCacheManager.saveUserInfo(sysVipInfo); |
| | | LogUtil.info("用户token={}", token); |
| | | res.putInMap("token", token); |
| | | res.putInMap("userInfo", sysVipInfo); |
| | |
| | | @RequestMapping(value = "/findUserInfo") |
| | | public @ResponseBody |
| | | AjaxResult findUserInfo() { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | SysVipInfo sysVipInfo = sysVipInfoService.findById(loginUser.getId()); |
| | | sysVipInfo.setPointAll(scoreVipDetailDao.selectUserTotalScore(loginUser.getId())); |
| | | sysVipInfo.setBalance(moneyCardUseDao.selectVipCardTotalMoney(loginUser.getId())); |
| | |
| | | public @ResponseBody |
| | | AjaxResult saveUserInfo(@RequestBody XcxUserSaveUserInfoDto xcxUserSaveUserInfoDto) { |
| | | |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | SysVipInfo sysVipInfo = new SysVipInfo(); |
| | | sysVipInfo.setId(loginUser.getId()); |
| | | |
| | |
| | | if ((loginUser.getIsSales() == null || loginUser.getIsSales() == 2) |
| | | && StringUtils.isNotBlank(sysVipInfo.getNickName())) {//目前还不是分销员 |
| | | BusParameterSettings fxSwith = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_SWITCH, HostInterceptor.getCompanyId()); |
| | | if (fxSwith.getParamValue().equals("1")) {//开启分销 |
| | | if (fxSwith!=null && fxSwith.getParamValue().equals("1")) {//开启分销 |
| | | BusParameterSettings applyWay = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_WAY, loginUser.getCompanyId()); |
| | | if (applyWay.getParamValue().equals(FenxiaoSettingConstant.FX_APPLY_WAY_AUTO)) {//自动成为分销员 |
| | | QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>(); |