Commit 57333873 authored by 王亮's avatar 王亮

fix some issues.

parent fb9417cd
...@@ -10,6 +10,7 @@ import cn.quantgroup.xyqb.exception.DataException; ...@@ -10,6 +10,7 @@ import cn.quantgroup.xyqb.exception.DataException;
import cn.quantgroup.xyqb.model.JsonResult; import cn.quantgroup.xyqb.model.JsonResult;
import cn.quantgroup.xyqb.model.WechatConfigBean; import cn.quantgroup.xyqb.model.WechatConfigBean;
import cn.quantgroup.xyqb.service.middleoffice.applet.IAppletService; import cn.quantgroup.xyqb.service.middleoffice.applet.IAppletService;
import cn.quantgroup.xyqb.util.StringUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -57,10 +58,14 @@ public class AppletController { ...@@ -57,10 +58,14 @@ public class AppletController {
if (!containsAppName(appletParamEntry.getAppName())) { if (!containsAppName(appletParamEntry.getAppName())) {
throw new DataException("appName不合法"); throw new DataException("appName不合法");
} }
if(StringUtils.isEmpty(appletParamEntry.getTenantId())){
appletParamEntry.setTenantId(UserConstant.defaultTenantId);
}
Long userId = iAppletService.relevance(appletParamEntry); Long userId = iAppletService.relevance(appletParamEntry);
LoginVo loginVo = loginModule.loginByUserId(appletParamEntry.getChannelId(), LoginVo loginVo = loginModule.loginByUserId(appletParamEntry.getChannelId(),
appletParamEntry.getUtmSource(), userId, null); appletParamEntry.getUtmSource(), userId, appletParamEntry.getTenantId());
return JsonResult return JsonResult
.buildSuccessResultGeneric(loginVo); .buildSuccessResultGeneric(loginVo);
......
...@@ -63,6 +63,8 @@ public class LoginModule implements ILoginModule { ...@@ -63,6 +63,8 @@ public class LoginModule implements ILoginModule {
.appChannel(appChannel) .appChannel(appChannel)
.channelId(channelId) .channelId(channelId)
.merchantName("xyqb") .merchantName("xyqb")
.createdFrom(channelId)
.tenantId(tenantId)
.build(); .build();
AuthBean session = sessionService.createSession(user, loginProperties, LoginType.ACCOUNTPASSWORD.ordinal(),tenantId); AuthBean session = sessionService.createSession(user, loginProperties, LoginType.ACCOUNTPASSWORD.ordinal(),tenantId);
return LoginVo.builder() return LoginVo.builder()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment