Commit 4bf4f957 authored by sam.x.wang's avatar sam.x.wang

提交sso问题

parent c47bd1cc
......@@ -116,6 +116,10 @@ public class IndexController {
try {
logger.info("jumpto=" + jumpto + "code=" + code);
String ticketStr = getTicket(code);
Cookie ddTicket = new Cookie("ddTicket", URLEncoder.encode(ticketStr, "UTF-8"));
ddTicket.setPath("/");
ddTicket.setMaxAge(18000);
response.addCookie(ddTicket);
response.sendRedirect(jumpto + "?code=" + code + "&ticketStr=" + ticketStr);
} catch (Exception e) {
logger.error("ddSSOCallback error", e);
......@@ -212,7 +216,7 @@ public class IndexController {
public String getCookie( HttpServletRequest request,
HttpServletResponse response) {
orangeHeapService.getDDTicketByCookie();
orangeHeapService.getDDTicketByCookie(request);
return null;
}
......
......@@ -4,8 +4,6 @@ package pwc.taxtech.atms.web.controller;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -14,7 +12,7 @@ import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.web.service.OrangeHeapService;
import javax.annotation.Resource;
import java.util.Optional;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/OrangeHeap")
......@@ -36,94 +34,94 @@ public class OrangeHeapController {
@ResponseBody
@GetMapping("getTableauTaxCategoryUnreturnedTax")
public ApiResultDto getTableauTaxCategoryUnreturnedTax() {
public ApiResultDto getTableauTaxCategoryUnreturnedTax(HttpServletRequest request) {
logger.info("进入税种未返还税金分析=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
return ApiResultDto.success(tableauService.getTableauTaxCategoryUnreturnedTax().orElse(StringUtils.EMPTY));
return ApiResultDto.success(tableauService.getTableauTaxCategoryUnreturnedTax(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauDistrictUnreturnedTax")
public ApiResultDto getTableauDistrictUnreturnedTax() {
public ApiResultDto getTableauDistrictUnreturnedTax(HttpServletRequest request) {
logger.info("地区未返还税金分析=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
return ApiResultDto.success(tableauService.getTableauDistrictUnreturnedTax().orElse(StringUtils.EMPTY));
return ApiResultDto.success(tableauService.getTableauDistrictUnreturnedTax(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauUnreturnedAndReturnedTax")
public ApiResultDto getTableauUnreturnedAndReturnedTax() {
return ApiResultDto.success(tableauService.getTableauUnreturnedAndReturnedTax().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauUnreturnedAndReturnedTax(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauUnreturnedAndReturnedTax(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauCostAnalysis")
public ApiResultDto getTableauCostAnalysis() {
return ApiResultDto.success(tableauService.getTableauCostAnalysis().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauCostAnalysis(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauCostAnalysis(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauDistrictProfitAndLoss")
public ApiResultDto getTableauDistrictProfitAndLoss() {
return ApiResultDto.success(tableauService.getTableauDistrictProfitAndLoss().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauDistrictProfitAndLoss(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauDistrictProfitAndLoss(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauCompanyProfitAndLoss")
public ApiResultDto getTableauCompanyProfitAndLoss() {
return ApiResultDto.success(tableauService.getTableauCompanyProfitAndLoss().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauCompanyProfitAndLoss(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauCompanyProfitAndLoss(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauDriverAndEmployee")
public ApiResultDto getTableauDriverAndEmployee() {
return ApiResultDto.success(tableauService.getTableauDriverAndEmployee().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauDriverAndEmployee(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauDriverAndEmployee(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauGmvAndSubsidy")
public ApiResultDto getTableauGmvAndSubsidy() {
return ApiResultDto.success(tableauService.getTableauGmvAndSubsidy().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauGmvAndSubsidy(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauGmvAndSubsidy(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauFileArrangement")
public ApiResultDto getTableauFileArrangement() {
return ApiResultDto.success(tableauService.getTableauFileArrangement().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauFileArrangement(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauFileArrangement(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauGlobalOverview")
public ApiResultDto getTableauGlobalOverview() {
return ApiResultDto.success(tableauService.getTableauGlobalOverview().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauGlobalOverview(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauGlobalOverview(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauGlobalBusiness")
public ApiResultDto getTableauGlobalBusiness() {
return ApiResultDto.success(tableauService.getTableauGlobalBusiness().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauGlobalBusiness(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauGlobalBusiness(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauMexicanTax")
public ApiResultDto getTableauMexicanTax() {
return ApiResultDto.success(tableauService.getTableauMexicanTax().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauMexicanTax(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauMexicanTax(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauAustralianTax")
public ApiResultDto getTableauAustralianTax() {
return ApiResultDto.success(tableauService.getTableauAustralianTax().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauAustralianTax(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauAustralianTax(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauBrazilianTax")
public ApiResultDto getTableauBrazilianTax() {
return ApiResultDto.success(tableauService.getTableauBrazilianTax().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauBrazilianTax(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauBrazilianTax(request).orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("getTableauOtherTaxAnalysis")
public ApiResultDto getTableauOtherTaxAnalysis() {
return ApiResultDto.success(tableauService.getTableauOtherTaxAnalysis().orElse(StringUtils.EMPTY));
public ApiResultDto getTableauOtherTaxAnalysis(HttpServletRequest request) {
return ApiResultDto.success(tableauService.getTableauOtherTaxAnalysis(request).orElse(StringUtils.EMPTY));
}
}
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