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

提交

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