Helius
2021-03-11 a72aa4bb793ec765892406c842039a71b33215b1
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java
@@ -1,6 +1,5 @@
package com.matrix.system.shopXcx.api;
import com.alibaba.fastjson.JSON;
import com.matrix.biz.bean.BizUser;
import com.matrix.biz.dao.BizUserDao;
import com.matrix.biz.service.BizUserService;
@@ -12,6 +11,7 @@
import com.matrix.core.tools.StringUtils;
import com.matrix.core.web.BaseAction;
import com.matrix.system.common.constance.AppConstance;
import com.matrix.system.common.interceptor.HostInterceptor;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -42,7 +42,8 @@
   @Autowired
   private BizUserDao bizUserDao;
   @Autowired
   WeChatApiTools weChatApiTools;
@@ -68,7 +69,7 @@
      AjaxResult res = new AjaxResult();
      LogUtil.info("code:{}" + code);
      if (StringUtils.isNotBlank(code)) {
         String requrl = WeChatApiTools.getXcxLoginUrl(code);
         String requrl = weChatApiTools.getXcxLoginUrl(code, HostInterceptor.getCompanyId());
         String reslutData = HttpCurlUtil.sendGetHttp(requrl, null);
         JSONObject json = JSONObject.fromObject(reslutData);
         LogUtil.debug("微信登录获取到登录信息={}", json);
@@ -94,6 +95,7 @@
               bizUser.setOpenId(openId);
               bizUser.setLastLoginTime(new Date());
               bizUser.setUserType(AppConstance.USER_TYPE_CUSTOMER);
               bizUser.setCompanyId(HostInterceptor.getCompanyId());
               bizUserService.add(bizUser);
            } else {