Ver código fonte

update 中基积分

tags/v4.1.4
DengBiao 1 ano atrás
pai
commit
bf84c946fe
2 arquivos alterados com 19 adições e 5 exclusões
  1. +5
    -3
      md/block_star_chain.go
  2. +14
    -2
      rule/integral_release_settlement.go

+ 5
- 3
md/block_star_chain.go Ver arquivo

@@ -50,6 +50,7 @@ const (
IntegralReleaseGreenCoinGrantByRefundForUserVirtualCoinFlow = "订单退款-绿积分扣除"
IntegralReleaseGreenCoinGrantByOrdTitleForUserVirtualCoinFlow = "积分释放-绿积分发放(订单)"
IntegralReleaseGreenCoinGrantBySignInTitleForUserVirtualCoinFlow = "积分释放-绿积分发放(签到)"
IntegralReleaseServiceRevenueTitleForUserVirtualCoinFlow = "积分释放-服务收益"

NiuBeiCoinByReleaseNiuBeiCoinTitleForUserVirtualCoinFlow = "牛贝积分-释放牛贝积分"
NiuBeiCoinByReleaseNiuBeiDestroyConsumeCoinNumTitleForUserVirtualCoinFlow = "释放牛贝积分-消耗消费积分数量"
@@ -99,6 +100,7 @@ const (
IntegralReleaseGreenCoinGrantByOrdRefundTypeForUserVirtualCoinFlow = 140 // 订单退款-绿积分扣除
IntegralReleaseRedCoinGrantByOrdTransferTypeDeductForUserVirtualCoinFlow = 141 // 积分释放-红积分发放(订单)
IntegralReleaseRedCoinGrantBySignInTransferTypeDeductForUserVirtualCoinFlow = 142 // 积分释放-红积分发放(签到)
IntegralReleaseServiceRevenueTransferTypeForUserVirtualCoinFlow = 143 // 积分释放-服务收益

NiuBeiCoinByReleaseNiuBeiCoinTransferTypeForUserVirtualCoinFlow = 145 //牛贝积分-释放牛贝积分
NiuBeiCoinByReleaseNiuBeiDestroyConsumeCoinNumTransferTypeForUserVirtualCoinFlow = 146 //释放牛贝积分-消耗消费积分数量
@@ -133,8 +135,8 @@ type DealLotteryDrawReq struct {
}

type OrdParam struct {
Uid string `json:"uid"`
Pvd string `json:"pvd"`
Uid string `json:"uid"`
Pvd string `json:"pvd"`
Amount string `json:"amount"`
OrdId string `json:"ord_id"`
OrdId string `json:"ord_id"`
}

+ 14
- 2
rule/integral_release_settlement.go Ver arquivo

@@ -467,7 +467,7 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De
integralReleaseInterpositionUserFlow.BeforeAlreadyAmount = alreadyAmountValue.String()
integralReleaseInterpositionUserFlow.AfterAlreadyAmount = alreadyAmountValue.String()
} else if req.Kind == "sub" {
integralReleaseInterpositionUserFlow.Kind = 1
integralReleaseInterpositionUserFlow.Kind = 2
integralReleaseInterpositionUserFlow.BeforeTotalAmount = totalAmountValue.String()
integralReleaseInterpositionUserFlow.AfterTotalAmount = totalAmountValue.String()
integralReleaseInterpositionUserFlow.BeforeWaiteAmount = waiteAmountValue.String()
@@ -479,7 +479,7 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De
if req.CoinId == 0 {
orderType := enum.FinUserFlowOrderActionString(md.IntegralReleaseServiceRevenueOrderTypeForFinUserFlow)
var dealUserAmount = md.DealUserAmount{
Kind: req.Kind,
Kind: "add",
Mid: req.Mid,
Title: md.IntegralReleaseServiceRevenueTitleForFinUserFlow,
OrderType: orderType,
@@ -492,6 +492,18 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De
if err != nil {
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 {
err = errors.New("错误的kind类型")


Carregando…
Cancelar
Salvar