记得上下班打卡 | git大法好,push需谨慎

Commit 7204a8a5 authored by jiangxiulong's avatar jiangxiulong

用unionId或者手机号等相关信息 接口

parent 2243d225
......@@ -4,16 +4,14 @@ import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.vo.WechatTokenInfoVo;
import com.liquidnet.service.sweet.dto.vo.WechatUserInfoVo;
import com.liquidnet.service.sweet.service.impl.SweetWechatLoginServiceImpl;
import com.liquidnet.service.sweet.vo.SweetAppletUsersVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@Api(tags = "小程序-公众号登陆相关")
@RestController
......@@ -81,4 +79,14 @@ public class SweetWechatLoginController {
return sweetLoginService.mpUserInfo(code, type);
}
@PostMapping("applyUser")
@ApiOperation("用unionId或者手机号等相关信息")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "unionId", value = "微信unionId", required = true)
})
public ResponseDto<SweetAppletUsersVo> getApplyUser(@RequestParam() String unionId) {
SweetAppletUsersVo sweetAppletUsers = sweetLoginService.getApplyUser(unionId);
return ResponseDto.success(sweetAppletUsers);
}
}
......@@ -162,4 +162,7 @@ public class SweetWechatLoginServiceImpl {
}
}
public SweetAppletUsersVo getApplyUser(String unionId) {
return redisUtils.getSweetAppletUsersOfUnionId(unionId);
}
}
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