Commit a596c541 authored by david.zhong's avatar david.zhong

卡系统资质功能映射

parent ad0a6cef
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>micro-as</artifactId>
<groupId>com.ost.micro</groupId>
<version>1.0.0-alpha</version>
</parent>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
<artifactId>card-provider</artifactId>
<name>Micro :: Project :: As :: Card-Provider</name>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.15</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.ost.micro;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@EnableDiscoveryClient
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class CardProviderApplication {
public static void main(String[] args) {
SpringApplication.run(CardProviderApplication.class, args);
}
}
package com.ost.micro.provider.common;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.export.ExcelExportService;
import com.google.gson.Gson;
import com.ost.micro.core.pay.modules.sys.dto.BizTradeDetailDto;
import com.ost.micro.core.pay.modules.sys.excel.BizTradeDetailBean;
import com.ost.micro.core.utils.CopyDataUtil;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* excel工具类
*
* @author Mark sunlightcs@gmail.com
* @since 2018-03-24
*/
public class ExcelBigUtils {
private static final Integer MAX_SIZE = 10000;
/**
* Excel导出
* 20W数据没问题,再多会卡死,需要继续优化
*
* @param response response
* @param list 数据List
*/
public static void exportExcel(HttpServletResponse response, String fileName, Collection<?> list) {
try {
List<String> fileNames = new ArrayList<>(); //存放生成的文件名称
String filePath = "D:/excel/"; //上线后切换成linux服务器地址
if (!new File(filePath).exists()) {
new File(filePath).mkdirs();
}
File zip = new File(filePath + fileName + ".zip"); //压缩文件路径
List lists = (List) list;
Integer pageNumeber = (lists.size() % MAX_SIZE == 0) ? lists.size() / MAX_SIZE : lists.size() / MAX_SIZE + 1;
Gson gson = new Gson();
List<BizTradeDetailBean> bizTradeDetailDtos = new ArrayList<>(10000);
for (int i = 0; i < pageNumeber; i++) {
String tempExcelFile = filePath + fileName + "[" + (i + 1) + "].xlsx";
fileNames.add(tempExcelFile);
FileOutputStream fos = new FileOutputStream(tempExcelFile);
//int rowMemory = 100;
SXSSFWorkbook workbook = new SXSSFWorkbook(100);
ExportParams exportParams = new ExportParams();
exportParams.setMaxNum(10000);
exportParams.setType(ExcelType.XSSF);
int minNum = i * MAX_SIZE;
int maxNum = (i + 1) * MAX_SIZE;
for (int j = minNum; j < (maxNum > lists.size() ? lists.size() : maxNum); j++) {
BizTradeDetailBean history = CopyDataUtil.copyObject(gson.fromJson(gson.toJson(lists.get(j)), BizTradeDetailDto.class), BizTradeDetailBean.class);
bizTradeDetailDtos.add(history);
}
//Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), BizTradeDetailDto.class, bizTradeDetailDtos);
new ExcelExportService().createSheet(workbook, exportParams, BizTradeDetailBean.class, bizTradeDetailDtos);
try {
workbook.write(fos);
fos.flush();
fos.close();
} catch (Exception e) {
e.printStackTrace();
}
bizTradeDetailDtos.clear();
}
exportZip(response, fileName, fileNames, zip);
} catch (IOException e) {
e.printStackTrace();
}
}
private static void exportZip(HttpServletResponse response, String fileName, List<String> fileNames, File zip)
throws IOException {
response.reset();
response.setContentType("application/octet-stream;charset=UTF-8");
response.addHeader("pargam", "no-cache");
response.addHeader("Cache-Control", "no-cache");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-Disposition",
"attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".zip");
OutputStream outPut = response.getOutputStream();
//1.压缩文件
File srcFile[] = new File[fileNames.size()];
for (int i = 0; i < fileNames.size(); i++) {
srcFile[i] = new File(fileNames.get(i));
}
byte[] byt = new byte[1024];
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zip));
//out.setEncoding("UTF-8");
for (int i = 0; i < srcFile.length; i++) {
FileInputStream in = new FileInputStream(srcFile[i]);
out.putNextEntry(new ZipEntry(srcFile[i].getName()));
int length;
while ((length = in.read(byt)) > 0) {
out.write(byt, 0, length);
}
out.closeEntry();
in.close();
}
out.close();
//2.删除服务器上的临时文件(excel)
for (int i = 0; i < srcFile.length; i++) {
File temFile = srcFile[i];
if (temFile.exists() && temFile.isFile()) {
temFile.delete();
}
}
//3.返回客户端压缩文件
FileInputStream inStream = new FileInputStream(zip);
byte[] buf = new byte[4096];
int readLenght;
while ((readLenght = inStream.read(buf)) != -1) {
outPut.write(buf, 0, readLenght);
}
inStream.close();
outPut.close();
//4.删除压缩文件
if (zip.exists() && zip.isFile()) {
zip.delete();
}
}
}
package com.ost.micro.provider.common;
import com.ost.micro.common.utils.FileUploadUtil;
import com.ost.micro.core.context.model.response.DataResponse;
import com.ost.micro.core.pay.modules.sys.dto.FileUploadDto;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
/**
* @author rain
*/
@Component
public class FileUploadController {
@Value("${file.upload.storePath}")
private String UPLOADED_FOLDER;
@Value("${file.upload.urlProfix}")
private String UPLOAD_URLPROFIX;
public DataResponse singleFileUpload(@RequestParam("file") MultipartFile file, String type) {
FileUploadDto fileUploadDto = FileUploadDto.builder()
.file(file)
.type(type)
.storePath(UPLOADED_FOLDER)
.urlProfix(UPLOAD_URLPROFIX)
.build();
return FileUploadUtil.singleFileUpload(fileUploadDto);
}
}
package com.ost.micro.provider.common;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.LongSerializationPolicy;
import com.ost.micro.common.utils.Result;
import com.ost.micro.core.configuration.SpringfoxJsonToGsonAdapter;
import com.ost.micro.core.context.model.response.DataResponse;
import com.ost.micro.core.utils.GsonUtil;
import com.ost.micro.core.utils.MapUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.*;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.GsonHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.stereotype.Service;
import org.springframework.util.MimeType;
import org.springframework.util.MimeTypeUtils;
import org.springframework.web.client.RestTemplate;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Title: PaymentServiceClient
* @ProjectName micro-root
* @Description: 远程调用底层逻辑
* @date 2018/9/3011:03
*/
@Service
@Slf4j
public class PaymentServiceClient<T> {
private Gson gson = new Gson();
private RestTemplate restTemplate;
public PaymentServiceClient() {
restTemplate = new RestTemplate();
List<HttpMessageConverter<?>> converters = restTemplate.getMessageConverters();
// 删除MappingJackson2HttpMessageConverter
converters.removeIf(httpMessageConverter -> httpMessageConverter instanceof MappingJackson2HttpMessageConverter);
// 添加GsonHttpMessageConverter
converters.add(new GsonHttpMessageConverter(new GsonBuilder().enableComplexMapKeySerialization().setLongSerializationPolicy(LongSerializationPolicy.STRING)
.serializeNulls().registerTypeAdapter(JsonElement.class, new SpringfoxJsonToGsonAdapter()).create()));
}
/**
* @param url
* @param param
* @return
*/
// @HystrixCommand(fallbackMethod = "selectPayChannelFallback") 熔断机制
public DataResponse get(String url, Map param) {
String urlParams = MapUtil.getUrlParamsByMap(param);
if (!StringUtils.isEmpty(urlParams)) {
url = url + "?" + urlParams;
}
log.info("get url is :" + url);
return restTemplate.getForEntity(url, DataResponse.class).getBody();
}
/**
* 包含敏感信息(身份信息、权限信息),用此方法做脱敏处理
*
* @param url
* @param param
* @return
*/
public Result _get(String url, Map param) {
String urlParams = MapUtil.getUrlParamsByMap(param);
if (!StringUtils.isEmpty(urlParams)) {
url = url + "?" + urlParams;
}
log.info("get url is :" + url.split("[?]")[0] + "?****");
return restTemplate.getForEntity(url, Result.class).getBody();
}
/**
* 通过id去获取
*
* @param url
* @param id
* @return
*/
public DataResponse get(String url, Long id) {
url = url + "/" + id;
log.info("get url is :" + url);
DataResponse model = restTemplate.getForEntity(url, DataResponse.class).getBody();
String json = gson.toJson(model.getData());
Map<String, Object> data = gson.fromJson(json, HashMap.class);
if (null != data) {
data.put("id", id);
}
return model;
}
/**
* post 请求
*
* @param url
* @param t
* @return
*/
public DataResponse post(String url, T t) {
log.info("post url is :" + url);
log.info("request params is :" + gson.toJson(t));
return restTemplate.postForEntity(url, t, DataResponse.class).getBody();
}
/**
* post 请求
*
* @param url
* @param t
* @return
*/
public DataResponse postForObject(String url, MediaType mediaType, T t) {
log.info("post url is :" + url);
log.info("request params is :" + gson.toJson(t));
//return restTemplate.postForEntity(url, t, DataResponse.class).getBody();
HttpHeaders header = new HttpHeaders();
// 需求需要传参为application/json格式
header.setContentType(mediaType);
HttpEntity<String> httpEntity = new HttpEntity<>(GsonUtil.toJson(t, false), header);
String response = restTemplate.postForObject(url, httpEntity, String.class);
log.info("response is {}", response);
DataResponse dataResponse = GsonUtil.fromJson(response, DataResponse.class);
return dataResponse;
}
/**
* put请求
*
* @param url
* @param t
* @return
*/
public void put(String url, T t) {
log.info("put url is :" + url);
log.info("request params is :" + gson.toJson(t));
restTemplate.put(url, t);
}
/**
* put请求
*
* @param url
* @param t
* @return
*/
public DataResponse putForEntity(String url, T t) {
log.info("put url is :" + url);
log.info("request params is :" + gson.toJson(t));
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<T> entity = new HttpEntity<T>(t, headers);
ResponseEntity<DataResponse> result = restTemplate.exchange(url,
HttpMethod.PUT, entity, DataResponse.class);
return result.getBody();
}
/**
* delete 请求
*
* @param url
* @param id
*/
public void delete(String url, Long id) {
url = url + "/" + id;
log.info("request params is :" + url);
restTemplate.delete(url, id);
}
/**
* delete
*
* @param url
* @param t
* @return
*/
public DataResponse deleteForEntity(String url, T t) {
log.info("delete url is :" + url);
log.info("request params is :" + gson.toJson(t));
//restTemplate.put(url, t);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<T> entity = new HttpEntity<T>(t, headers);
ResponseEntity<DataResponse> result = restTemplate.exchange(url,
HttpMethod.DELETE, entity, DataResponse.class, t);
return result.getBody();
}
/**
* 发送/获取 服务端数据(主要用于解决发送put,delete方法无返回值问题).
*
* @param url 绝对地址
* @param method 请求方式
* @param bodyType 返回类型
* @param <T> 返回类型
* @return 返回结果(响应体)
*/
public <T> T exchange(String url, HttpMethod method, Class<T> bodyType, Map<String, Object> params) {
// 请求头
HttpHeaders headers = new HttpHeaders();
MimeType mimeType = MimeTypeUtils.parseMimeType("application/json");
MediaType mediaType = new MediaType(mimeType.getType(), mimeType.getSubtype(), Charset.forName("UTF-8"));
// 请求体
headers.setContentType(mediaType);
//提供json转化功能
ObjectMapper mapper = new ObjectMapper();
String str = null;
try {
if (!params.isEmpty()) {
str = mapper.writeValueAsString(params);
}
} catch (JsonProcessingException e) {
e.printStackTrace();
}
// 发送请求
HttpEntity<String> entity = new HttpEntity<>(str, headers);
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<T> resultEntity = restTemplate.exchange(url, method, entity, bodyType);
return resultEntity.getBody();
}
public RestTemplate getRestTemplate() {
return restTemplate;
}
}
package com.ost.micro.provider.common;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.consul.discovery.ConsulDiscoveryClient;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* @author Yubo
*/
@Slf4j
@Component
public class ServiceUrl {
@Value("${spring.profiles.active}")
private String environmentValue;
/**
* 开发环境和测试环境时使用
* 远程调用as-service
*/
public static final String LOCAL_DEV_URL_AS_SERVICE = "http://localhost:6020";
@Value("${services.as-service}")
private String asService;
public static final ServiceUrl INSTANCE = new ServiceUrl();
private ServiceUrl() {
}
/**
* 远程调用as-service
*
* @param consulDiscoveryClient
* @return
*/
public String getAsServiceUrl(ConsulDiscoveryClient consulDiscoveryClient) {
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":
default:
List<ServiceInstance> serviceInstanceList = consulDiscoveryClient.getInstances(asService);
if (CollectionUtils.isEmpty(serviceInstanceList)) {
log.error("未找到服务========>" + asService);
return "";
}
ServiceInstance serviceInstance = serviceInstanceList.get(0);
serviceUrl = serviceInstance.getUri().toString();
log.info("as-service 服务地址为:========>{}", serviceUrl);
}
return serviceUrl;
}
}
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.cardservice.dto.passage.response.ApiResDto;
import com.ost.micro.provider.common.PaymentServiceClient;
import com.ost.micro.provider.common.ServiceUrl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.consul.discovery.ConsulDiscoveryClient;
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 java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 支付接口表
*
* @author rain
* @email rain.guo@bytehug.com
* @date 2019-08-13 16:40:46
*/
@RestController
@RequestMapping("provider/card/payapi")
@Api(tags = "card支付接口表接口")
@Slf4j
public class CardApiController {
@Autowired
private PaymentServiceClient paymentServiceClient;
@Autowired
private ConsulDiscoveryClient consulDiscoveryClient;
@Autowired
private ServiceUrl serviceUrl;
@GetMapping("list")
@ApiOperation("列表")
@ApiImplicitParam(paramType = "query", required = false, name = "payment_type", value = "支付方式 0-银行卡 1-固码汇旺财", dataType = "Integer")
@DataToUnderline()
public DataResponse<List<ApiResDto>> list(@RequestParam(required = false, name = "payment_type") Integer paymentType) {
String apiUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/provider/payapi/list";
Map requestMap = new HashMap<>();
if (null != paymentType) {
requestMap.put("payment_type", paymentType);
}
return paymentServiceClient.get(apiUrl, requestMap);
}
}
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.cardservice.dto.biz.request.BizParamsReqDto;
import com.ost.micro.core.pay.modules.cardservice.dto.biz.request.BizReqDto;
import com.ost.micro.core.pay.modules.cardservice.dto.biz.response.BizResDto;
import com.ost.micro.provider.common.PaymentServiceClient;
import com.ost.micro.provider.common.ServiceUrl;
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.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.consul.discovery.ConsulDiscoveryClient;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 商家管理表
*
* @author rain
* @email rain.guo@bytehug.com
* @date 2019-08-13 16:42:06
*/
@RestController
@RequestMapping("provider/card/biz")
@Api(tags = "card商家管理表接口")
@Slf4j
public class CardBizController {
@Autowired
private PaymentServiceClient paymentServiceClient;
@Autowired
private ConsulDiscoveryClient consulDiscoveryClient;
@Autowired
private ServiceUrl serviceUrl;
@GetMapping("")
@ApiOperation("分页列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "keyword", value = "关键字", required = false, dataType = "String"),
@ApiImplicitParam(paramType = "query", name = "enable", value = "0禁用1启用", required = false, dataType = "int"),
@ApiImplicitParam(paramType = "query", name = "biz_ids", value = "所属平台集合", required = false, allowMultiple = true, dataType = "Long"),
@ApiImplicitParam(paramType = "query", name = "page_index", value = "页码", required = true, dataType = "int"),
@ApiImplicitParam(paramType = "query", name = "page_size", value = "每页数码条数", required = true, dataType = "int")})
@DataToUnderline()
public DataResponse<List<BizResDto>> search(@RequestParam(required = false, name = "keyword") String keyword,
@RequestParam(required = false, name = "enable") Integer enable,
@RequestParam(required = false, name = "biz_ids") List<Long> bizIds,
@RequestParam(name = "page_index") Integer pageIndex,
@RequestParam(name = "page_size") Integer pageSize) {
String bizUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/card/biz";
Map params = new HashMap();
params.put("keyword", keyword);
params.put("enable", enable);
params.put("bizIds", !CollectionUtils.isEmpty(bizIds) ? StringUtils.strip(bizIds.toString(), "[]") : null);
params.put("pageIndex", pageIndex);
params.put("pageSize", pageSize);
return paymentServiceClient.get(bizUrl, params);
}
@GetMapping("list")
@ApiOperation("列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "bank_id", value = "银行id", dataType = "long"),
@ApiImplicitParam(paramType = "query", name = "biz_ids", value = "所属平台集合", required = false, allowMultiple = true, dataType = "Long")})
@DataToUnderline()
public DataResponse list(@RequestParam(required = false, name = "bank_id") Long bankId,
@RequestParam(required = false, name = "biz_ids") List<Long> bizIds) {
String bizUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/card/biz/list";
Map params = new HashMap();
params.put("bankId", bankId);
params.put("bizIds", !CollectionUtils.isEmpty(bizIds) ? StringUtils.strip(bizIds.toString(), "[]") : null);
return paymentServiceClient.get(bizUrl, params);
}
@GetMapping("/{id}")
@ApiOperation("查看")
@ApiImplicitParam(paramType = "path", name = "id", value = "id", required = true, dataType = "long")
@DataToUnderline()
public DataResponse<BizResDto> info(@PathVariable("id") Long id) {
String bizUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/card/biz";
return paymentServiceClient.get(bizUrl, id);
}
@PostMapping("")
@ApiOperation("新增")
@DataToUnderline()
public DataResponse add(@RequestBody BizReqDto dto) {
String bizUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/card/biz";
return paymentServiceClient.post(bizUrl, dto);
}
@PutMapping("")
@ApiOperation("修改")
@DataToUnderline()
public DataResponse<BizResDto> update(@RequestBody BizReqDto dto) {
String bizUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/card/biz";
return paymentServiceClient.putForEntity(bizUrl, dto);
}
@DeleteMapping("{id}")
@ApiOperation("删除")
@ApiImplicitParam(paramType = "path", name = "id", value = "id", required = true, dataType = "long")
@DataToUnderline()
public DataResponse delete(@PathVariable Long id) {
String bizUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/card/biz/" + id;
ResponseEntity<DataResponse> resp = paymentServiceClient.getRestTemplate()
.exchange(bizUrl, HttpMethod.DELETE, null,
DataResponse.class, id);
return resp.getBody();
}
@PutMapping("/params/edit")
@ApiOperation("修改交易参数")
@DataToUnderline()
public DataResponse<BizResDto> editParams(@RequestBody BizParamsReqDto dto) {
String bizUrl = serviceUrl.getAsServiceUrl(consulDiscoveryClient) + "/card/biz/params/edit";
return paymentServiceClient.putForEntity(bizUrl, dto);
}
}
applications: ${spring.application.name}
\ No newline at end of file
applications: ${spring.application.name}
\ No newline at end of file
applications: ${spring.application.name}
\ No newline at end of file
applications: ${spring.application.name}
\ No newline at end of file
applications: ${spring.application.name}
\ No newline at end of file
applications: ${spring.application.name}
\ No newline at end of file
applications: ${spring.application.name}
\ No newline at end of file
server:
port: 6014
tomcat:
basedir: /web/temp_upload
services:
as-service:
micro-project-domain-as-service-v2
file:
upload:
storePath: /clouddisk/svr_sync/wwwroot/prj/www/uploads/
urlProfix: /uploads/
tempLocation: /web/temp_upload
\ No newline at end of file
spring:
profiles:
#active: prod
active: devv2
application:
name: micro-project.as.card-provider-v2
cloud:
consul:
#host: 10.113.8.24
host: 172.30.10.176
port: 8500
\ 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