| | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | |
| | | AjaxResult res = new AjaxResult(); |
| | | LogUtil.info("code:{}" + code); |
| | | if (StringUtils.isNotBlank(code)) { |
| | | String requrl = weChatApiTools.getXcxLoginUrl(code, HostInterceptor.getCompanyId()); |
| | | String requrl = weChatApiTools.getXcxLoginUrl(code, HostInterceptor.getCompanyId(), AppConstance.MINIPROGRAM_APPID); |
| | | String reslutData = HttpCurlUtil.sendGetHttp(requrl, null); |
| | | JSONObject json = JSONObject.fromObject(reslutData); |
| | | LogUtil.debug("微信登录获取到登录信息={}", json); |
| | |
| | | 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<>(); |