|
|
@ -26,10 +26,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
|
|
|
|
|
@ -88,4 +85,34 @@ public class UserAuthController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getUserAuthDetail",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "支付宝授权详情") |
|
|
|
|
|
|
|
public ResponseData getUserAuthDetail(@RequestParam(value = "platform" , required = true) Integer platform) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
UserSessionObject session = userCenter.getSessionModel(UserSessionObject.class); |
|
|
|
|
|
|
|
UserAuthorizePlatformEnum platformEnum = UserAuthorizePlatformEnum.getDataByType(platform); |
|
|
|
|
|
|
|
if (platformEnum == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知平台"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return ResponseMsgUtil.success( userPlatformAuthorizeService.getUserAuth(session.getUser().getId(), platformEnum)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getUserAuthList",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "用户授权列表") |
|
|
|
|
|
|
|
public ResponseData getUserAuthList() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
UserSessionObject session = userCenter.getSessionModel(UserSessionObject.class); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success( userPlatformAuthorizeService.getUserAuth(session.getUser().getId())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|