@@ -50,6 +50,7 @@ const ( | |||||
IntegralReleaseGreenCoinGrantByRefundForUserVirtualCoinFlow = "订单退款-绿积分扣除" | IntegralReleaseGreenCoinGrantByRefundForUserVirtualCoinFlow = "订单退款-绿积分扣除" | ||||
IntegralReleaseGreenCoinGrantByOrdTitleForUserVirtualCoinFlow = "积分释放-绿积分发放(订单)" | IntegralReleaseGreenCoinGrantByOrdTitleForUserVirtualCoinFlow = "积分释放-绿积分发放(订单)" | ||||
IntegralReleaseGreenCoinGrantBySignInTitleForUserVirtualCoinFlow = "积分释放-绿积分发放(签到)" | IntegralReleaseGreenCoinGrantBySignInTitleForUserVirtualCoinFlow = "积分释放-绿积分发放(签到)" | ||||
IntegralReleaseServiceRevenueTitleForUserVirtualCoinFlow = "积分释放-服务收益" | |||||
NiuBeiCoinByReleaseNiuBeiCoinTitleForUserVirtualCoinFlow = "牛贝积分-释放牛贝积分" | NiuBeiCoinByReleaseNiuBeiCoinTitleForUserVirtualCoinFlow = "牛贝积分-释放牛贝积分" | ||||
NiuBeiCoinByReleaseNiuBeiDestroyConsumeCoinNumTitleForUserVirtualCoinFlow = "释放牛贝积分-消耗消费积分数量" | NiuBeiCoinByReleaseNiuBeiDestroyConsumeCoinNumTitleForUserVirtualCoinFlow = "释放牛贝积分-消耗消费积分数量" | ||||
@@ -99,6 +100,7 @@ const ( | |||||
IntegralReleaseGreenCoinGrantByOrdRefundTypeForUserVirtualCoinFlow = 140 // 订单退款-绿积分扣除 | IntegralReleaseGreenCoinGrantByOrdRefundTypeForUserVirtualCoinFlow = 140 // 订单退款-绿积分扣除 | ||||
IntegralReleaseRedCoinGrantByOrdTransferTypeDeductForUserVirtualCoinFlow = 141 // 积分释放-红积分发放(订单) | IntegralReleaseRedCoinGrantByOrdTransferTypeDeductForUserVirtualCoinFlow = 141 // 积分释放-红积分发放(订单) | ||||
IntegralReleaseRedCoinGrantBySignInTransferTypeDeductForUserVirtualCoinFlow = 142 // 积分释放-红积分发放(签到) | IntegralReleaseRedCoinGrantBySignInTransferTypeDeductForUserVirtualCoinFlow = 142 // 积分释放-红积分发放(签到) | ||||
IntegralReleaseServiceRevenueTransferTypeForUserVirtualCoinFlow = 143 // 积分释放-服务收益 | |||||
NiuBeiCoinByReleaseNiuBeiCoinTransferTypeForUserVirtualCoinFlow = 145 //牛贝积分-释放牛贝积分 | NiuBeiCoinByReleaseNiuBeiCoinTransferTypeForUserVirtualCoinFlow = 145 //牛贝积分-释放牛贝积分 | ||||
NiuBeiCoinByReleaseNiuBeiDestroyConsumeCoinNumTransferTypeForUserVirtualCoinFlow = 146 //释放牛贝积分-消耗消费积分数量 | NiuBeiCoinByReleaseNiuBeiDestroyConsumeCoinNumTransferTypeForUserVirtualCoinFlow = 146 //释放牛贝积分-消耗消费积分数量 | ||||
@@ -133,8 +135,8 @@ type DealLotteryDrawReq struct { | |||||
} | } | ||||
type OrdParam struct { | type OrdParam struct { | ||||
Uid string `json:"uid"` | |||||
Pvd string `json:"pvd"` | |||||
Uid string `json:"uid"` | |||||
Pvd string `json:"pvd"` | |||||
Amount string `json:"amount"` | Amount string `json:"amount"` | ||||
OrdId string `json:"ord_id"` | |||||
OrdId string `json:"ord_id"` | |||||
} | } |
@@ -467,7 +467,7 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De | |||||
integralReleaseInterpositionUserFlow.BeforeAlreadyAmount = alreadyAmountValue.String() | integralReleaseInterpositionUserFlow.BeforeAlreadyAmount = alreadyAmountValue.String() | ||||
integralReleaseInterpositionUserFlow.AfterAlreadyAmount = alreadyAmountValue.String() | integralReleaseInterpositionUserFlow.AfterAlreadyAmount = alreadyAmountValue.String() | ||||
} else if req.Kind == "sub" { | } else if req.Kind == "sub" { | ||||
integralReleaseInterpositionUserFlow.Kind = 1 | |||||
integralReleaseInterpositionUserFlow.Kind = 2 | |||||
integralReleaseInterpositionUserFlow.BeforeTotalAmount = totalAmountValue.String() | integralReleaseInterpositionUserFlow.BeforeTotalAmount = totalAmountValue.String() | ||||
integralReleaseInterpositionUserFlow.AfterTotalAmount = totalAmountValue.String() | integralReleaseInterpositionUserFlow.AfterTotalAmount = totalAmountValue.String() | ||||
integralReleaseInterpositionUserFlow.BeforeWaiteAmount = waiteAmountValue.String() | integralReleaseInterpositionUserFlow.BeforeWaiteAmount = waiteAmountValue.String() | ||||
@@ -479,7 +479,7 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De | |||||
if req.CoinId == 0 { | if req.CoinId == 0 { | ||||
orderType := enum.FinUserFlowOrderActionString(md.IntegralReleaseServiceRevenueOrderTypeForFinUserFlow) | orderType := enum.FinUserFlowOrderActionString(md.IntegralReleaseServiceRevenueOrderTypeForFinUserFlow) | ||||
var dealUserAmount = md.DealUserAmount{ | var dealUserAmount = md.DealUserAmount{ | ||||
Kind: req.Kind, | |||||
Kind: "add", | |||||
Mid: req.Mid, | Mid: req.Mid, | ||||
Title: md.IntegralReleaseServiceRevenueTitleForFinUserFlow, | Title: md.IntegralReleaseServiceRevenueTitleForFinUserFlow, | ||||
OrderType: orderType, | OrderType: orderType, | ||||
@@ -492,6 +492,18 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De | |||||
if err != nil { | if err != nil { | ||||
return err | return err | ||||
} | } | ||||
} else { | |||||
//释放服务收益 | |||||
err = DealUserCoinForIntegralRelease(session, md.DealUserCoinReq{ | |||||
Kind: "add", | |||||
Mid: req.Mid, | |||||
Title: md.IntegralReleaseServiceRevenueTitleForUserVirtualCoinFlow, | |||||
TransferType: md.IntegralReleaseServiceRevenueTransferTypeForUserVirtualCoinFlow, | |||||
OrdId: req.OrdId, | |||||
CoinId: req.CoinId, | |||||
Uid: req.Uid, | |||||
Amount: req.Amount, | |||||
}) | |||||
} | } | ||||
} else { | } else { | ||||
err = errors.New("错误的kind类型") | err = errors.New("错误的kind类型") | ||||