mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
新增 微信第三方平台 微信一键登录接口
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
package com.jsowell.api.uniapp;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.domain.AuthorizationEventResult;
|
||||
import com.jsowell.pile.domain.agentDev.CategoryInfo;
|
||||
import com.jsowell.pile.dto.WechatLoginDTO;
|
||||
import com.jsowell.pile.dto.agentDev.*;
|
||||
import com.jsowell.pile.vo.agentDev.AuthInfoVO;
|
||||
import com.jsowell.service.AgentDevService;
|
||||
@@ -298,4 +300,23 @@ public class AgentDevController extends BaseController {
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信一键登录
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/wechatLogin")
|
||||
public RestApiResponse<?> wechatLogin(@RequestBody AgentWechatLoginDTO dto) {
|
||||
logger.info("第三方平台微信一键登录 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String memberToken = agentDevService.wechatLogin(dto);
|
||||
response = new RestApiResponse<>(ImmutableMap.of("memberToken", memberToken));
|
||||
} catch (Exception e) {
|
||||
logger.error("第三方平台微信一键登录 error, ", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("第三方平台微信一键登录 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user