充值任务
This commit is contained in:
parent
835b6d5367
commit
10d4df14cf
@ -10,3 +10,11 @@ invite:
|
|||||||
base-url: ${INVITE_CAMPAIGN_GO_URL:}
|
base-url: ${INVITE_CAMPAIGN_GO_URL:}
|
||||||
internal-token: ${GAME_INTERNAL_CALLBACK_SECRET:}
|
internal-token: ${GAME_INTERNAL_CALLBACK_SECRET:}
|
||||||
timeout-millis: ${INVITE_CAMPAIGN_GO_TIMEOUT_MILLIS:10000}
|
timeout-millis: ${INVITE_CAMPAIGN_GO_TIMEOUT_MILLIS:10000}
|
||||||
|
|
||||||
|
task:
|
||||||
|
center:
|
||||||
|
go:
|
||||||
|
enabled: ${TASK_CENTER_GO_ENABLED:true}
|
||||||
|
base-url: ${TASK_CENTER_GO_URL:${LIKEI_GATEWAY_ROUTE_GO_URI:http://golang:2900}}
|
||||||
|
internal-token: ${GAME_INTERNAL_CALLBACK_SECRET:}
|
||||||
|
timeout-millis: ${TASK_CENTER_GO_TIMEOUT_MILLIS:3000}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
|||||||
import com.red.circle.other.inner.endpoint.user.user.UserSvipClient;
|
import com.red.circle.other.inner.endpoint.user.user.UserSvipClient;
|
||||||
import com.red.circle.wallet.app.dto.cmd.FreightDealerToUserShipCmd;
|
import com.red.circle.wallet.app.dto.cmd.FreightDealerToUserShipCmd;
|
||||||
import com.red.circle.wallet.app.common.invite.InviteCampaignGoClient;
|
import com.red.circle.wallet.app.common.invite.InviteCampaignGoClient;
|
||||||
|
import com.red.circle.wallet.app.common.task.TaskCenterGoClient;
|
||||||
import com.red.circle.wallet.domain.gateway.FreightShipGateway;
|
import com.red.circle.wallet.domain.gateway.FreightShipGateway;
|
||||||
import com.red.circle.wallet.domain.gateway.WalletGoldGateway;
|
import com.red.circle.wallet.domain.gateway.WalletGoldGateway;
|
||||||
import com.red.circle.wallet.domain.wallet.WalletReceipt;
|
import com.red.circle.wallet.domain.wallet.WalletReceipt;
|
||||||
@ -84,6 +85,7 @@ public class DealerToUserShipCmdExe {
|
|||||||
private final UserProfileClient userProfileClient;
|
private final UserProfileClient userProfileClient;
|
||||||
private final InviteUserClient inviteUserClient;
|
private final InviteUserClient inviteUserClient;
|
||||||
private final InviteCampaignGoClient inviteCampaignGoClient;
|
private final InviteCampaignGoClient inviteCampaignGoClient;
|
||||||
|
private final TaskCenterGoClient taskCenterGoClient;
|
||||||
|
|
||||||
public BigDecimal execute(FreightDealerToUserShipCmd cmd) {
|
public BigDecimal execute(FreightDealerToUserShipCmd cmd) {
|
||||||
controlSwitch.execute(cmd.requireReqSysOriginChildEnum());
|
controlSwitch.execute(cmd.requireReqSysOriginChildEnum());
|
||||||
@ -169,6 +171,15 @@ public class DealerToUserShipCmdExe {
|
|||||||
|
|
||||||
// 累计充值
|
// 累计充值
|
||||||
incrRechargeQuantity(cmd);
|
incrRechargeQuantity(cmd);
|
||||||
|
taskCenterGoClient.reportSellerAgentRechargeGold(cmd.requireReqSysOrigin(),
|
||||||
|
cmd.getAcceptUserId(),
|
||||||
|
runningWater.getId(),
|
||||||
|
cmd.getQuantity(),
|
||||||
|
getGoldToSUD(cmd),
|
||||||
|
cmd.requiredReqUserId(),
|
||||||
|
freightBalance.getUserId(),
|
||||||
|
freightSeller.getId(),
|
||||||
|
cmd.getReqTraceId());
|
||||||
notifyInviteCampaignRecharge(cmd, runningWater);
|
notifyInviteCampaignRecharge(cmd, runningWater);
|
||||||
|
|
||||||
//累计今日充值,每日累计充值抽奖活动
|
//累计今日充值,每日累计充值抽奖活动
|
||||||
|
|||||||
@ -43,6 +43,43 @@ public class TaskCenterGoClient {
|
|||||||
BigDecimal usdQuantity,
|
BigDecimal usdQuantity,
|
||||||
Long freightUserId,
|
Long freightUserId,
|
||||||
String traceId) {
|
String traceId) {
|
||||||
|
Map<String, Object> payload = new HashMap<>();
|
||||||
|
payload.put("channel", "SHIPPING_AGENT");
|
||||||
|
payload.put("runningWaterId", runningWaterId);
|
||||||
|
payload.put("goldQuantity", goldQuantity);
|
||||||
|
payload.put("usdQuantity", usdQuantity);
|
||||||
|
payload.put("freightUserId", freightUserId);
|
||||||
|
payload.put("traceId", traceId);
|
||||||
|
reportRechargeGold(sysOrigin, userId, runningWaterId, goldQuantity, "SHIPPING_AGENT", payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reportSellerAgentRechargeGold(String sysOrigin,
|
||||||
|
Long userId,
|
||||||
|
Long runningWaterId,
|
||||||
|
BigDecimal goldQuantity,
|
||||||
|
BigDecimal usdQuantity,
|
||||||
|
Long sellerUserId,
|
||||||
|
Long freightUserId,
|
||||||
|
Long sellerId,
|
||||||
|
String traceId) {
|
||||||
|
Map<String, Object> payload = new HashMap<>();
|
||||||
|
payload.put("channel", "SELLER_AGENT");
|
||||||
|
payload.put("runningWaterId", runningWaterId);
|
||||||
|
payload.put("goldQuantity", goldQuantity);
|
||||||
|
payload.put("usdQuantity", usdQuantity);
|
||||||
|
payload.put("sellerUserId", sellerUserId);
|
||||||
|
payload.put("freightUserId", freightUserId);
|
||||||
|
payload.put("sellerId", sellerId);
|
||||||
|
payload.put("traceId", traceId);
|
||||||
|
reportRechargeGold(sysOrigin, userId, runningWaterId, goldQuantity, "SELLER_AGENT", payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void reportRechargeGold(String sysOrigin,
|
||||||
|
Long userId,
|
||||||
|
Long runningWaterId,
|
||||||
|
BigDecimal goldQuantity,
|
||||||
|
String channel,
|
||||||
|
Map<String, Object> payload) {
|
||||||
if (Objects.isNull(userId) || Objects.isNull(runningWaterId) || Objects.isNull(goldQuantity)) {
|
if (Objects.isNull(userId) || Objects.isNull(runningWaterId) || Objects.isNull(goldQuantity)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -51,17 +88,9 @@ public class TaskCenterGoClient {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> payload = new HashMap<>();
|
|
||||||
payload.put("channel", "SHIPPING_AGENT");
|
|
||||||
payload.put("runningWaterId", runningWaterId);
|
|
||||||
payload.put("goldQuantity", goldQuantity);
|
|
||||||
payload.put("usdQuantity", usdQuantity);
|
|
||||||
payload.put("freightUserId", freightUserId);
|
|
||||||
payload.put("traceId", traceId);
|
|
||||||
|
|
||||||
reportEvent(new TaskCenterEventRequest()
|
reportEvent(new TaskCenterEventRequest()
|
||||||
.setSysOrigin(sysOrigin)
|
.setSysOrigin(sysOrigin)
|
||||||
.setEventId("RECHARGE_GOLD:SHIPPING_AGENT:" + runningWaterId)
|
.setEventId("RECHARGE_GOLD:" + channel + ":" + runningWaterId)
|
||||||
.setEventType(EVENT_TYPE_RECHARGE_GOLD)
|
.setEventType(EVENT_TYPE_RECHARGE_GOLD)
|
||||||
.setUserId(userId)
|
.setUserId(userId)
|
||||||
.setDeltaValue(deltaValue)
|
.setDeltaValue(deltaValue)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user