记得上下班打卡 | git大法好,push需谨慎

Commit 6a43f2d0 authored by anjiabin's avatar anjiabin

dragon-do生成

parent 8d566eeb
<?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>liquidnet-bus-feign</artifactId>
<groupId>com.liquidnet</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>liquidnet-api-feign-dragon</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-service-dragon-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.liquidnet.service.feign.dragon.task;
import com.liquidnet.service.base.ResponseDto;
import feign.hystrix.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
@Component
@FeignClient(name = "liquidnet-service-dragon",
contextId = "FeignDragonTaskClient", path = "",
url = "${liquidnet.url.platform}",
// url = "",
fallback = FallbackFactory.Default.class)
public interface FeignDragonTaskClient {
@PostMapping("platform/dragon/handleNotifyFail")
ResponseDto<Boolean> handleNotifyFail();
}
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<modules> <modules>
<module>liquidnet-api-feign-adam</module> <module>liquidnet-api-feign-adam</module>
<module>liquidnet-api-feign-kylin</module> <module>liquidnet-api-feign-kylin</module>
<module>liquidnet-api-feign-dragon</module>
<!-- <module>liquidnet-api-feign-sequence</module>--> <!-- <module>liquidnet-api-feign-sequence</module>-->
<!-- <module>liquidnet-api-feign-example</module>--> <!-- <module>liquidnet-api-feign-example</module>-->
<!-- <module>liquidnet-api-feign-account</module>--> <!-- <module>liquidnet-api-feign-account</module>-->
......
...@@ -11,9 +11,11 @@ public class DataUtils { ...@@ -11,9 +11,11 @@ public class DataUtils {
@Autowired @Autowired
private RedisUtil redisUtil; private RedisUtil redisUtil;
private long keyExpireTime = 3600*24*7;
public void createPayOrder(String code, DragonOrdersDto ordersDto) { public void createPayOrder(String code, DragonOrdersDto ordersDto) {
if (!redisUtil.hasKey(DragonConstant.REDIS_KET_PAY_CODE + code)) { if (!redisUtil.hasKey(DragonConstant.REDIS_KET_PAY_CODE + code)) {
redisUtil.set(DragonConstant.REDIS_KET_PAY_CODE + code, ordersDto); redisUtil.set(DragonConstant.REDIS_KET_PAY_CODE + code, ordersDto,keyExpireTime);
} }
} }
...@@ -25,11 +27,11 @@ public class DataUtils { ...@@ -25,11 +27,11 @@ public class DataUtils {
} }
public void updateOrderStatus(String code, DragonOrdersDto dragonOrdersDto) { public void updateOrderStatus(String code, DragonOrdersDto dragonOrdersDto) {
redisUtil.set(DragonConstant.REDIS_KET_PAY_CODE + code, dragonOrdersDto); redisUtil.set(DragonConstant.REDIS_KET_PAY_CODE + code, dragonOrdersDto,keyExpireTime);
} }
public void setRefundNotifyUrl(String code, String notifyUrl) { public void setRefundNotifyUrl(String code, String notifyUrl) {
redisUtil.set(DragonConstant.REFUND_REDIS_KET + code, notifyUrl); redisUtil.set(DragonConstant.REFUND_REDIS_KET + code, notifyUrl,keyExpireTime);
} }
public String getRefundNotifyUrl(String code) { public String getRefundNotifyUrl(String code) {
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
<artifactId>liquidnet-api-feign-kylin</artifactId> <artifactId>liquidnet-api-feign-kylin</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-api-feign-dragon</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
......
package com.liquidnet.service.executor.main.handler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonTaskHandler
* @Package com.liquidnet.service.executor.main.handler
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/20 14:02
*/
@Slf4j
@Component
public class DragonTaskHandler {
// @Autowired
// private FeignDragonTaskClient feignDragonTaskClient;
}
...@@ -72,6 +72,11 @@ ...@@ -72,6 +72,11 @@
<artifactId>liquidnet-service-adam-api</artifactId> <artifactId>liquidnet-service-adam-api</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-service-dragon-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.liquidnet.service.platform.controller.dragon;
import io.swagger.annotations.Api;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonPayController
* @Package com.liquidnet.service.platform.controller.dragon
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/20 14:11
*/
@Api(tags = "前端-订单相关")
@RestController
@RequestMapping("dragon")
@Validated
public class DragonPayController {
}
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