Commit 2022189d authored by david.zhong's avatar david.zhong

提交

parent e546c87e
......@@ -28,7 +28,6 @@ import java.util.List;
import java.util.Map;
/**
* @author david.zhong
* @Title: PaymentServiceClient
* @ProjectName micro-root
* @Description: 远程调用底层逻辑
......
......@@ -44,6 +44,11 @@ public class ServiceUrl {
String serviceUrl = null;
switch (environmentValue) {
case "dev":
serviceUrl = LOCAL_DEV_URL_AS_SERVICE;
break;
case "devv2":
serviceUrl = LOCAL_DEV_URL_AS_SERVICE;
break;
case "test":
case "sit":
serviceUrl = LOCAL_DEV_URL_AS_SERVICE;
......
......@@ -32,7 +32,7 @@ import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/mch/trade/calculate")
@RequestMapping("/provider/trade/calculate")
@Api(tags = "交易统计")
@Slf4j
public class BizTradeStaticsController {
......@@ -72,7 +72,7 @@ public class BizTradeStaticsController {
@RequestParam(required = false) Integer currency,
@RequestParam(name = "page_index") Integer pageIndex,
@RequestParam(name = "page_size") Integer pageSize) {
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/statics";
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/provider/statics";
StringBuilder urlBuilder = new StringBuilder();
urlBuilder.append(serviceUrl.getAsServiceUrl(consulDiscoveryClient));
urlBuilder.append("/api/statics");
......@@ -121,7 +121,7 @@ public class BizTradeStaticsController {
@RequestParam(required = false) Integer currency,
@RequestParam(name = "page_index") Integer pageIndex,
@RequestParam(name = "page_size") Integer pageSize) {
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/statics/tradePage";
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/provider/statics/tradePage";
Map<String, Object> params = new HashMap<>();
params.put("keyword", keyword);
params.put("tradeType", tradeType);
......@@ -160,7 +160,7 @@ public class BizTradeStaticsController {
@RequestParam(required = false, name = "page_size") Integer pageSize,
HttpServletResponse response) {
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/statics/exportTradeStatic";
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/provider/statics/exportTradeStatic";
StringBuilder urlBuilder = new StringBuilder();
urlBuilder.append(serviceUrl.getAsServiceUrl(consulDiscoveryClient));
......@@ -217,7 +217,7 @@ public class BizTradeStaticsController {
@RequestParam(required = false, name = "page_index") Integer pageIndex,
@RequestParam(required = false, name = "page_size") Integer pageSize,
HttpServletResponse response) {
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/statics/exportTradePage";
staticUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/api/provider/statics/exportTradePage";
Map<String, Object> params = new HashMap<>();
params.put("keyword", keyword);
params.put("tradeType", tradeType);
......
......@@ -20,7 +20,7 @@ import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/mch/common")
@RequestMapping("/provider/common")
@Api(tags = "通用接口")
@Slf4j
public class CommonController {
......@@ -31,7 +31,7 @@ public class CommonController {
@Autowired
private ServiceUrl serviceUrl;
private static final String BASE_URL = "/api/common";
private static final String BASE_URL = "/api/provider/common";
@GetMapping("supplier")
@ApiOperation("获取供应商列表")
......
......@@ -28,7 +28,7 @@ import java.io.*;
* @author Yubo
*/
@RestController
@RequestMapping("/mch/company")
@RequestMapping("/provider/company")
@Api(tags = "签约公司接口")
@Slf4j
public class CompanyController {
......@@ -40,7 +40,7 @@ public class CompanyController {
@Autowired
private ServiceUrl serviceUrl;
private static final String BASE_URL = "/api/company";
private static final String BASE_URL = "/api/provider/company";
private static final String CASHIER_BASE_URL = "/cashier/company";
......
package com.ost.micro.provider.controller;
import com.ost.micro.core.aop.DataToUnderline;
import com.ost.micro.core.context.model.response.DataResponse;
import com.ost.micro.core.pay.modules.sys.excel.BizBean;
......@@ -20,7 +21,7 @@ import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/mch/tool")
@RequestMapping("/provider/tool")
@Api(tags = "查询工具接口")
public class ToolController {
@Autowired
......@@ -40,7 +41,7 @@ public class ToolController {
public DataResponse queryPayOrder(@RequestParam(name = "order_no") String orderNo, @RequestParam(required = false, name = "biz_id") Long bizId) {
StringBuilder urlBuilder = new StringBuilder();
urlBuilder.append(serviceUrl.getAsServiceUrl(consulDiscoveryClient));
urlBuilder.append("/api/tool/payorder");
urlBuilder.append("/api/provider/tool/payorder");
Map<String, Object> params = new HashMap<>();
params.put("orderNo", orderNo);
return paymentServiceClient.get(urlBuilder.toString(), params);
......@@ -65,7 +66,7 @@ public class ToolController {
public DataResponse queryBankCard(@RequestParam(name = "card_no") String cardNo) {
StringBuilder urlBuilder = new StringBuilder();
urlBuilder.append(serviceUrl.getAsServiceUrl(consulDiscoveryClient));
urlBuilder.append("/api/tool/bankcard");
urlBuilder.append("/api/provider/tool/bankcard");
Map<String, Object> params = new HashMap<>();
params.put("cardNo", cardNo);
return paymentServiceClient.get(urlBuilder.toString(), params);
......
......@@ -2,3 +2,6 @@ server:
port: 6019
tomcat:
basedir: /web/temp_upload
services:
as-service:
micro-project-domain-as-service-v2
\ No newline at end of file
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