Commit 57333873 authored by 王亮's avatar 王亮

fix some issues.

parent fb9417cd
......@@ -10,6 +10,7 @@ import cn.quantgroup.xyqb.exception.DataException;
import cn.quantgroup.xyqb.model.JsonResult;
import cn.quantgroup.xyqb.model.WechatConfigBean;
import cn.quantgroup.xyqb.service.middleoffice.applet.IAppletService;
import cn.quantgroup.xyqb.util.StringUtils;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -57,10 +58,14 @@ public class AppletController {
if (!containsAppName(appletParamEntry.getAppName())) {
throw new DataException("appName不合法");
}
if(StringUtils.isEmpty(appletParamEntry.getTenantId())){
appletParamEntry.setTenantId(UserConstant.defaultTenantId);
}
Long userId = iAppletService.relevance(appletParamEntry);
LoginVo loginVo = loginModule.loginByUserId(appletParamEntry.getChannelId(),
appletParamEntry.getUtmSource(), userId, null);
appletParamEntry.getUtmSource(), userId, appletParamEntry.getTenantId());
return JsonResult
.buildSuccessResultGeneric(loginVo);
......
......@@ -63,6 +63,8 @@ public class LoginModule implements ILoginModule {
.appChannel(appChannel)
.channelId(channelId)
.merchantName("xyqb")
.createdFrom(channelId)
.tenantId(tenantId)
.build();
AuthBean session = sessionService.createSession(user, loginProperties, LoginType.ACCOUNTPASSWORD.ordinal(),tenantId);
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