|
@@ -24,6 +24,8 @@ import org.jeecg.common.system.query.MatchTypeEnum;
|
|
|
import org.jeecg.common.system.query.QueryCondition;
|
|
import org.jeecg.common.system.query.QueryCondition;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.constant.VxeSocketConst;
|
|
import org.jeecg.common.constant.VxeSocketConst;
|
|
|
|
|
+import org.jeecg.config.ApiVersion;
|
|
|
|
|
+import org.jeecg.config.ApiVersionConstant;
|
|
|
import org.jeecg.modules.wxuser.dto.LoginDto;
|
|
import org.jeecg.modules.wxuser.dto.LoginDto;
|
|
|
import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
|
|
import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
|
|
|
import org.jeecg.modules.wxuser.entity.ThirdSession;
|
|
import org.jeecg.modules.wxuser.entity.ThirdSession;
|
|
@@ -32,6 +34,7 @@ import org.jeecg.modules.wxuser.service.IUserInfoService;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -45,6 +48,7 @@ import java.util.*;
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@RestController
|
|
@RestController
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
|
|
|
+@EnableSwagger2
|
|
|
@RequestMapping("/mall-api/wxuser")
|
|
@RequestMapping("/mall-api/wxuser")
|
|
|
public class WxUserController extends WebConfig {
|
|
public class WxUserController extends WebConfig {
|
|
|
|
|
|
|
@@ -58,6 +62,7 @@ public class WxUserController extends WebConfig {
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "小程序用户登录")
|
|
@ApiOperation(value = "小程序用户登录")
|
|
|
@PostMapping("/ma-login")
|
|
@PostMapping("/ma-login")
|
|
|
|
|
+ @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
|
public Result<UserInfo> loginMa(HttpServletRequest request, @RequestBody LoginDto dto) {
|
|
public Result<UserInfo> loginMa(HttpServletRequest request, @RequestBody LoginDto dto) {
|
|
|
try {
|
|
try {
|
|
|
String appId = request.getHeader("app-id");
|
|
String appId = request.getHeader("app-id");
|
|
@@ -81,6 +86,7 @@ public class WxUserController extends WebConfig {
|
|
|
@ApiOperation(value = "通过小程序授权手机号一键登录商城")
|
|
@ApiOperation(value = "通过小程序授权手机号一键登录商城")
|
|
|
@PostMapping("/ma-phone-login")
|
|
@PostMapping("/ma-phone-login")
|
|
|
@ApiLogin
|
|
@ApiLogin
|
|
|
|
|
+ @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
|
public Result loginByPhoneMa(HttpServletRequest request, @RequestBody WxOpenDataDto dto) {
|
|
public Result loginByPhoneMa(HttpServletRequest request, @RequestBody WxOpenDataDto dto) {
|
|
|
try {
|
|
try {
|
|
|
String token = request.getHeader("third-session");
|
|
String token = request.getHeader("third-session");
|