记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
8dd2fcaf
Commit
8dd2fcaf
authored
Feb 28, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
迁移老推送大麦到 plarform
parent
46a09ccb
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
548 additions
and
13 deletions
+548
-13
FeignPlatformTaskClient.java
...net/service/feign/kylin/task/FeignPlatformTaskClient.java
+13
-7
KylinTaskHandler.java
...idnet/service/executor/main/handler/KylinTaskHandler.java
+26
-6
pom.xml
...-service-platform/liquidnet-service-platform-impl/pom.xml
+14
-0
PlatformDamaiController.java
.../service/platform/controller/PlatformDamaiController.java
+25
-0
PlatformDamaiServiceImpl.java
...rvice/platform/service/impl/PlatformDamaiServiceImpl.java
+350
-0
TaobaoTicketUtils.java
...m/liquidnet/service/platform/utils/TaobaoTicketUtils.java
+120
-0
No files found.
liquidnet-bus-feign/liquidnet-api-feign-kylin/src/main/java/com/liquidnet/service/feign/kylin/task/FeignPlatformTaskClient.java
View file @
8dd2fcaf
...
@@ -10,10 +10,8 @@ import org.springframework.web.bind.annotation.PutMapping;
...
@@ -10,10 +10,8 @@ import org.springframework.web.bind.annotation.PutMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Component
@Component
@FeignClient
(
name
=
"liquidnet-service-platform"
,
@FeignClient
(
name
=
"liquidnet-service-platform"
,
contextId
=
"FeignPlatformTaskClient"
,
path
=
""
,
url
=
"${liquidnet.service.platform.url}"
,
contextId
=
"FeignPlatformTaskClient"
,
path
=
""
,
// url = "",
url
=
"${liquidnet.service.platform.url}"
,
// url = "",
fallback
=
FallbackFactory
.
Default
.
class
)
fallback
=
FallbackFactory
.
Default
.
class
)
public
interface
FeignPlatformTaskClient
{
public
interface
FeignPlatformTaskClient
{
...
@@ -34,6 +32,7 @@ public interface FeignPlatformTaskClient {
...
@@ -34,6 +32,7 @@ public interface FeignPlatformTaskClient {
/**
/**
* 定时开票提醒
* 定时开票提醒
*
* @author zjp
* @author zjp
* @return: com.liquidnet.service.base.ResponseDto<java.lang.Boolean>
* @return: com.liquidnet.service.base.ResponseDto<java.lang.Boolean>
* @date 2024/3/21 18:03
* @date 2024/3/21 18:03
...
@@ -43,11 +42,18 @@ public interface FeignPlatformTaskClient {
...
@@ -43,11 +42,18 @@ public interface FeignPlatformTaskClient {
/*
/*
* @description: 自动处理退款失败
* @description: 自动处理退款失败
*
* @author: zjp
* @author: zjp
*
* @date: 2025/4/27 14:28
* @date: 2025/4/27 14:28
*
* @param: []
* @param: []
*
* @return: com.liquidnet.service.base.ResponseDto<java.lang.Boolean>
* @return: com.liquidnet.service.base.ResponseDto<java.lang.Boolean>
**/
**/
@GetMapping
(
"platform/refund/failRefund"
)
@GetMapping
(
"platform/refund/failRefund"
)
ResponseDto
<
Boolean
>
failRefund
();
ResponseDto
<
Boolean
>
failRefund
();
@PostMapping
(
"platform/damai/sync"
)
ResponseDto
<
Boolean
>
syncDamai
(
@RequestParam
(
"performancesId"
)
String
performancesId
);
}
}
liquidnet-bus-service/liquidnet-service-executor-all/liquidnet-service-executor-main/src/main/java/com/liquidnet/service/executor/main/handler/KylinTaskHandler.java
View file @
8dd2fcaf
...
@@ -11,8 +11,10 @@ import org.springframework.stereotype.Component;
...
@@ -11,8 +11,10 @@ import org.springframework.stereotype.Component;
* XxlJob开发示例(Bean模式)
* XxlJob开发示例(Bean模式)
* <p>
* <p>
* 开发步骤:
* 开发步骤:
* 1、在Spring Bean实例中,开发Job方法,方式格式要求为 "public ReturnT<String> execute(String param)"
* 1、在Spring Bean实例中,开发Job方法,方式格式要求为 "public ReturnT<String> execute(String
* 2、为Job方法添加注解 "@XxlJob(value="自定义jobhandler名称", init = "JobHandler初始化方法", destroy = "JobHandler销毁方法")",注解value值对应的是调度中心新建任务的JobHandler属性的值。
* param)"
* 2、为Job方法添加注解 "@XxlJob(value="自定义jobhandler名称", init = "JobHandler初始化方法",
* destroy = "JobHandler销毁方法")",注解value值对应的是调度中心新建任务的JobHandler属性的值。
* 3、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
* 3、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
*/
*/
@Component
@Component
...
@@ -56,7 +58,8 @@ public class KylinTaskHandler {
...
@@ -56,7 +58,8 @@ public class KylinTaskHandler {
@XxlJob
(
value
=
"sev-platform:checkTransferOrderHandler"
)
@XxlJob
(
value
=
"sev-platform:checkTransferOrderHandler"
)
public
void
checkTransferOrderHandler
()
{
public
void
checkTransferOrderHandler
()
{
try
{
try
{
XxlJobHelper
.
handleSuccess
(
"结果:"
+
feignPlatformTaskClient
.
checkTransferOrder
(
Integer
.
parseInt
(
XxlJobHelper
.
getJobParam
())).
getData
());
XxlJobHelper
.
handleSuccess
(
"结果:"
+
feignPlatformTaskClient
.
checkTransferOrder
(
Integer
.
parseInt
(
XxlJobHelper
.
getJobParam
())).
getData
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
XxlJobHelper
.
log
(
e
);
XxlJobHelper
.
log
(
e
);
XxlJobHelper
.
handleFail
();
XxlJobHelper
.
handleFail
();
...
@@ -85,6 +88,7 @@ public class KylinTaskHandler {
...
@@ -85,6 +88,7 @@ public class KylinTaskHandler {
/**
/**
* 开票提醒定时推送
* 开票提醒定时推送
*
* @author zjp
* @author zjp
* @param null
* @param null
* @return: null
* @return: null
...
@@ -102,6 +106,7 @@ public class KylinTaskHandler {
...
@@ -102,6 +106,7 @@ public class KylinTaskHandler {
/**
/**
* 退款失败自动处理
* 退款失败自动处理
*
* @author zjp
* @author zjp
* @param null
* @param null
* @return: null
* @return: null
...
@@ -116,4 +121,19 @@ public class KylinTaskHandler {
...
@@ -116,4 +121,19 @@ public class KylinTaskHandler {
XxlJobHelper
.
handleFail
();
XxlJobHelper
.
handleFail
();
}
}
}
}
@XxlJob
(
value
=
"sev-platform:syncDamai"
)
public
void
syncDamaiHandler
()
{
try
{
String
param
=
XxlJobHelper
.
getJobParam
();
if
(
param
==
null
||
param
.
isEmpty
())
{
XxlJobHelper
.
handleFail
(
"performancesId is required"
);
return
;
}
XxlJobHelper
.
handleSuccess
(
"结果:"
+
feignPlatformTaskClient
.
syncDamai
(
param
).
getData
());
}
catch
(
Exception
e
)
{
XxlJobHelper
.
log
(
e
);
XxlJobHelper
.
handleFail
();
}
}
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/pom.xml
View file @
8dd2fcaf
...
@@ -139,6 +139,20 @@
...
@@ -139,6 +139,20 @@
<artifactId>
liquident-common-erp
</artifactId>
<artifactId>
liquident-common-erp
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.liquidnet
</groupId>
<artifactId>
liquidnet-service-kylin-do
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
taobao-sdk-id
</groupId>
<artifactId>
taobao-sdk
</artifactId>
<version>
1.0.0
</version>
<type>
jar
</type>
<scope>
system
</scope>
<systemPath>
${project.basedir}/lib/taobao-sdk-java-auto_1600401599540-20210607.jar
</systemPath>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/PlatformDamaiController.java
0 → 100644
View file @
8dd2fcaf
package
com
.
liquidnet
.
service
.
platform
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.service.other.DamaiService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/platform/damai"
)
public
class
PlatformDamaiController
{
@Autowired
private
DamaiService
damaiService
;
@ApiOperation
(
"同步大麦"
)
@PostMapping
(
value
=
"/sync"
)
public
ResponseDto
<
Boolean
>
syncDamai
(
@RequestParam
(
"performancesId"
)
String
performancesId
)
{
boolean
result
=
damaiService
.
sycPerformance
(
performancesId
);
return
ResponseDto
.
success
(
result
);
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/PlatformDamaiServiceImpl.java
0 → 100644
View file @
8dd2fcaf
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/TaobaoTicketUtils.java
0 → 100644
View file @
8dd2fcaf
package
com
.
liquidnet
.
service
.
platform
.
utils
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo
;
import
com.liquidnet.service.kylin.dto.vo.middle.KylinTicketVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo
;
import
com.taobao.api.DefaultTaobaoClient
;
import
com.taobao.api.TaobaoClient
;
import
com.taobao.api.request.AlibabaDamaiMevOpenWithdrawticketRequest
;
import
com.taobao.api.response.AlibabaDamaiMevOpenWithdrawticketResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
@Slf4j
public
class
TaobaoTicketUtils
{
private
String
URL
=
"http://gw.api.taobao.com/router/rest"
;
private
String
APPKEY
=
"27542597"
;
private
String
SECRET
=
"900025efc616fd2446344bb8fa21d039"
;
private
String
SUPPLIER_SECRET
=
"444d0752439f921a75eaf5951a8bc03c"
;
private
Long
SYSTEM_ID
=
15669L
;
// private String url = "http://gw.api.tbsandbox.com/router/rest";
// private String appkey = "4272";
// private String secret = "0ebbcccfee18d7ad1aebc5b135ffa906";
private
TaobaoClient
client
=
null
;
public
TaobaoClient
initTaobaoClient
()
{
if
(
client
==
null
)
{
client
=
new
DefaultTaobaoClient
(
URL
,
APPKEY
,
SECRET
);
}
return
client
;
}
public
String
getSupplierSecret
()
{
return
SUPPLIER_SECRET
;
}
public
Long
getSystemId
()
{
return
SYSTEM_ID
;
}
/**
* @param timesId 场次的id
* @param orderEntitiesId 入场人的id
* @return
*/
public
boolean
withdrawDamaiOrder
(
long
timesId
,
long
orderEntitiesId
)
{
try
{
TaobaoClient
client
=
initTaobaoClient
();
AlibabaDamaiMevOpenWithdrawticketRequest
req
=
new
AlibabaDamaiMevOpenWithdrawticketRequest
();
AlibabaDamaiMevOpenWithdrawticketRequest
.
TicketIdOpenParam
obj1
=
new
AlibabaDamaiMevOpenWithdrawticketRequest
.
TicketIdOpenParam
();
obj1
.
setPerformId
(
timesId
);
// 场次id
obj1
.
setVoucherId
(
orderEntitiesId
);
// 票单号 入场人id
obj1
.
setSupplierSecret
(
SUPPLIER_SECRET
);
obj1
.
setSystemId
(
SYSTEM_ID
);
req
.
setTicketIdOpenParam
(
obj1
);
AlibabaDamaiMevOpenWithdrawticketResponse
rsp
=
client
.
execute
(
req
);
return
rsp
.
getResult
().
getSuccess
();
}
catch
(
Exception
e
)
{
return
false
;
}
}
public
boolean
refundDamaiOrder
(
KylinOrderTicketVo
orderData
,
KylinPerformanceVo
vo
)
{
try
{
int
isSysDamai
=
0
;
for
(
int
x
=
0
;
x
<
vo
.
getTicketTimeList
().
size
();
x
++)
{
KylinTicketTimesVo
timeItem
=
vo
.
getTicketTimeList
().
get
(
x
);
for
(
int
y
=
0
;
y
<
timeItem
.
getTicketList
().
size
();
y
++)
{
KylinTicketVo
ticketItem
=
timeItem
.
getTicketList
().
get
(
y
);
if
(
ticketItem
.
getTicketsId
().
equals
(
orderData
.
getTicketId
()))
{
isSysDamai
=
ticketItem
.
getSysDamai
();
break
;
}
}
}
if
(
isSysDamai
==
1
)
{
List
<
KylinOrderTicketEntitiesVo
>
listData
=
orderData
.
getEntitiesVoList
();
for
(
int
i
=
0
;
i
<
listData
.
size
();
i
++)
{
KylinOrderTicketEntitiesVo
item
=
listData
.
get
(
i
);
long
ticketTimesKey
;
if
(
item
.
getTicketId
().
length
()
>
13
)
{
ticketTimesKey
=
Long
.
valueOf
(
IDGenerator
.
getDamaiCode
(
item
.
getTimeId
()));
}
else
{
ticketTimesKey
=
Long
.
parseLong
(
item
.
getTimeId
());
}
long
orderTicketEntitiesKey
;
// if (item.getOrderTicketEntitiesId().length() > 13) {
// orderTicketEntitiesKey =
// Long.valueOf(IDGenerator.getDamaiCode(item.getOrderTicketEntitiesId()));
// } else {
// orderTicketEntitiesKey = Long.valueOf(item.getOrderTicketEntitiesId());//票单号
// 入场人id
// }
if
(
orderData
.
getIsMember
()
==
1
)
{
orderTicketEntitiesKey
=
Long
.
valueOf
(
IDGenerator
.
getDamaiCode
(
item
.
getOrderTicketEntitiesId
()).
toString
().
concat
(
"010"
));
}
else
{
orderTicketEntitiesKey
=
Long
.
valueOf
(
IDGenerator
.
getDamaiCode
(
item
.
getOrderTicketEntitiesId
()).
toString
().
concat
(
"020"
));
}
if
(
item
.
getIsPayment
()
==
2
)
{
withdrawDamaiOrder
(
ticketTimesKey
,
orderTicketEntitiesKey
);
}
}
return
true
;
}
return
true
;
}
catch
(
Exception
e
)
{
log
.
info
(
"REFUND DAMAI ERROR = {}"
,
e
);
return
false
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment