Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
a571898d
Commit
a571898d
authored
Oct 12, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
腾讯有数生态接口切换服务
parent
083f9b96
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
48 deletions
+73
-48
order-application-service/src/main/java/cn/freemud/service/thirdparty/EcologyAdminApplicationClient.java
+23
-0
order-application-service/src/main/java/cn/freemud/service/thirdparty/MicroOpenplatformClient.java
+44
-44
order-application-service/src/main/java/cn/freemud/xxljob/OrderCountJobHandler.java
+6
-4
No files found.
order-application-service/src/main/java/cn/freemud/service/thirdparty/EcologyAdminApplicationClient.java
View file @
a571898d
...
...
@@ -2,9 +2,12 @@ package cn.freemud.service.thirdparty;
import
cn.freemud.annotations.LogIgnoreFeign
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.entities.dto.delivery.GetFilterPartnerResponse
;
import
cn.freemud.entities.dto.ecology.*
;
import
cn.freemud.entities.dto.openplatform.OrderGetPartnerRequest
;
import
cn.freemud.entities.dto.wechat.GetAuthorizerRequestDto
;
import
cn.freemud.entities.dto.wechat.GetTokenResponseDto
;
import
cn.freemud.entities.vo.SendOrderCountsMsg
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -37,4 +40,24 @@ public interface EcologyAdminApplicationClient {
@LogIgnoreFeign
(
logMessage
=
"sendTemplateMessage"
)
@PostMapping
(
value
=
"/ecology/api/templateMessage/send"
)
SendMessageResponse
sendTemplateMessage
(
SendMessageRequest
request
);
/**
* 上报微信 有数 统计数据
*
* @param orderCounts
* @return
*/
@LogIgnoreFeign
(
logMessage
=
"addOrderSum"
)
@PostMapping
(
"/ecology/api/thirdApp/order/addOrderSum"
)
BaseResponse
addOrderSum
(
@RequestBody
SendOrderCountsMsg
orderCounts
);
/**
* 获取需要 上报腾讯有数的 商户号
*
* @return
*/
@LogIgnoreFeign
(
logMessage
=
"getFilterPartner"
)
@PostMapping
(
"/ecology/api/thirdApp/getFilterPartner"
)
BaseResponse
<
GetFilterPartnerResponse
>
getFilterPartner
(
@RequestBody
OrderGetPartnerRequest
request
);
}
order-application-service/src/main/java/cn/freemud/service/thirdparty/MicroOpenplatformClient.java
View file @
a571898d
package
cn
.
freemud
.
service
.
thirdparty
;
import
cn.freemud.annotations.LogIgnoreFeign
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.entities.dto.delivery.GetFilterPartnerResponse
;
import
cn.freemud.entities.dto.openplatform.OrderGetPartnerRequest
;
import
cn.freemud.entities.vo.SendOrderCountsMsg
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* @author : xh.Z
* @email : fisherman0510@163.com
* @Date : 2021/4/27 下午2:03
* @description :
*/
@FeignClient
(
name
=
"MICRO-OPENPLATFORM"
)
@RequestMapping
(
consumes
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
interface
MicroOpenplatformClient
{
/**
* 上报微信 有数 统计数据
*
* @param orderCounts
* @return
*/
@LogIgnoreFeign
(
logMessage
=
"addOrderSum"
)
@PostMapping
(
"/thirdApp/order/addOrderSum"
)
BaseResponse
addOrderSum
(
@RequestBody
SendOrderCountsMsg
orderCounts
);
/**
* 获取需要 上报腾讯有数的 商户号
*
* @return
*/
@LogIgnoreFeign
(
logMessage
=
"getFilterPartner"
)
@PostMapping
(
"/thirdApp/getFilterPartner"
)
BaseResponse
<
GetFilterPartnerResponse
>
getFilterPartner
(
@RequestBody
OrderGetPartnerRequest
request
);
}
//
package cn.freemud.service.thirdparty;
//
//
import cn.freemud.annotations.LogIgnoreFeign;
//
import cn.freemud.base.entity.BaseResponse;
//
import cn.freemud.entities.dto.delivery.GetFilterPartnerResponse;
//
import cn.freemud.entities.dto.openplatform.OrderGetPartnerRequest;
//
import cn.freemud.entities.vo.SendOrderCountsMsg;
//
import org.springframework.cloud.openfeign.FeignClient;
//
import org.springframework.http.MediaType;
//
import org.springframework.web.bind.annotation.PostMapping;
//
import org.springframework.web.bind.annotation.RequestBody;
//
import org.springframework.web.bind.annotation.RequestMapping;
//
/
//
**
//
* @author : xh.Z
//
* @email : fisherman0510@163.com
//
* @Date : 2021/4/27 下午2:03
//
* @description :
//
*/
//
@FeignClient(name = "MICRO-OPENPLATFORM")
//
@RequestMapping(consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
//
public interface MicroOpenplatformClient {
//
//
/**
//
* 上报微信 有数 统计数据
//
*
//
* @param orderCounts
//
* @return
//
*/
//
@LogIgnoreFeign(logMessage="addOrderSum")
//
@PostMapping("/thirdApp/order/addOrderSum")
//
BaseResponse addOrderSum(@RequestBody SendOrderCountsMsg orderCounts);
//
//
//
/**
//
* 获取需要 上报腾讯有数的 商户号
//
*
//
* @return
//
*/
//
@LogIgnoreFeign(logMessage="getFilterPartner")
//
@PostMapping("/thirdApp/getFilterPartner")
//
BaseResponse<GetFilterPartnerResponse> getFilterPartner(@RequestBody OrderGetPartnerRequest request);
//
//
}
order-application-service/src/main/java/cn/freemud/xxljob/OrderCountJobHandler.java
View file @
a571898d
...
...
@@ -7,7 +7,8 @@ import cn.freemud.entities.dto.openplatform.OrderGetPartnerRequest;
import
cn.freemud.entities.vo.OrderCountRequestVo
;
import
cn.freemud.entities.vo.SendOrderCountsMsg
;
import
cn.freemud.service.Orderservice
;
import
cn.freemud.service.thirdparty.MicroOpenplatformClient
;
import
cn.freemud.service.thirdparty.EcologyAdminApplicationClient
;
//import cn.freemud.service.thirdparty.MicroOpenplatformClient;
import
cn.freemud.utils.AppLogUtil
;
import
com.freemud.application.sdk.api.constant.ResponseResultEnum
;
import
com.freemud.application.sdk.api.log.LogThreadLocal
;
...
...
@@ -39,7 +40,8 @@ public class OrderCountJobHandler extends IJobHandler {
private
Orderservice
orderservice
;
@Autowired
private
MicroOpenplatformClient
microOpenplatformClient
;
private
EcologyAdminApplicationClient
ecologyAdminClient
;
// private MicroOpenplatformClient microOpenplatformClient;
/**
* 【ID1028455】 【订单】非码-腾讯有数数据上报V1.0.0
...
...
@@ -56,7 +58,7 @@ public class OrderCountJobHandler extends IJobHandler {
OrderGetPartnerRequest
build1
=
OrderGetPartnerRequest
.
builder
().
type
(
3
).
build
();
// 获取需要 上报的商户号
try
{
BaseResponse
<
GetFilterPartnerResponse
>
filterPartner
=
microOpenplatform
Client
.
getFilterPartner
(
build1
);
BaseResponse
<
GetFilterPartnerResponse
>
filterPartner
=
ecologyAdmin
Client
.
getFilterPartner
(
build1
);
// AppLogUtil.infoLog("上报商户号查询结果", build1, filterPartner == null ? null : JSON.toJSONString(filterPartner));
if
(
filterPartner
==
null
||
filterPartner
.
getResult
()
==
null
...
...
@@ -86,7 +88,7 @@ public class OrderCountJobHandler extends IJobHandler {
// 每次推送 只能 50条 让生态端处理
List
<
OrderCountResp
>
orderCounts
=
result
.
getResult
();
SendOrderCountsMsg
build
=
SendOrderCountsMsg
.
builder
().
partnerRequests
(
orderCounts
).
build
();
BaseResponse
baseResponse
=
microOpenplatform
Client
.
addOrderSum
(
build
);
BaseResponse
baseResponse
=
ecologyAdmin
Client
.
addOrderSum
(
build
);
// AppLogUtil.infoLog("orderCountJobHandlersendreportorderend", JSON.toJSONString(build), JSON.toJSONString(baseResponse));
}
catch
(
Exception
e
)
{
AppLogUtil
.
errorLog
(
"orderCountJobHandlersendreportorderend"
,
null
,
null
,
e
);
...
...
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