修改兼容app部分

parent 7ab03613
......@@ -75,6 +75,7 @@ public class UserController implements IBaseController {
@RequestParam(required = false, defaultValue = "1") Long channelId, String appChannel,
@RequestParam(required = false, defaultValue = "1") Long createdFrom,
@RequestParam(required = false, defaultValue = "") String userId, String key, HttpServletRequest request, String openId) {
Merchant merchant = merchantService.findMerchantByName(key);
if (merchant == null) {
return JsonResult.buildErrorStateResult("未知的连接", null);
......@@ -85,6 +86,19 @@ public class UserController implements IBaseController {
return loginWithHttpBasic(channelId, appChannel, createdFrom, merchant, request, openId);
}
}
@RequestMapping("/login2")
public JsonResult login2(
@RequestParam(required = false, defaultValue = "1") Long channelId, String appChannel,
@RequestParam(required = false, defaultValue = "1") Long createdFrom,
@RequestParam(required = false, defaultValue = "") String userId, HttpServletRequest request, @RequestParam(required = false) String openId) {
if (!StringUtils.isEmpty(userId) && userId.length() > 10) {
return loginWithUserId(channelId, appChannel, createdFrom, userId, null);
} else {
return loginWithHttpBasic(channelId, appChannel, createdFrom, null, request, null);
}
}
@RequestMapping("/test")
public JsonResult test() {
......
......@@ -42,7 +42,9 @@ public class SessionServiceImpl implements ISessionService {
AuthBean authBean = new AuthBean();
LoginProperties properties = new LoginProperties();
properties.setAppChannel(appChannel);
properties.setMerchantName(merchant.getName());
if(null!=merchant){
properties.setMerchantName(merchant.getName());
}
properties.setChannelId(channelId);
properties.setCreatedFrom(createdFrom);
//找到用户
......
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