Browse Source

add reverse:for v3.9.6 积分释放规则

tags/v3.9.6
huangjiajun 2 years ago
parent
commit
13e63de0b5
3 changed files with 15 additions and 2 deletions
  1. +8
    -0
      db/db_integral_release_interposition_user_flow.go
  2. +3
    -0
      md/block_star_chain.go
  3. +4
    -2
      md/fin_user_flow.go

+ 8
- 0
db/db_integral_release_interposition_user_flow.go View File

@@ -47,6 +47,14 @@ func GetIntegralReleaseInterpositionUserFlowCount(Db *xorm.Engine) int {
}
return int(count)
}
func GetIntegralReleaseInterpositionUserFlowSum(sess *xorm.Session, uid int, coinId int, ordId string) float64 {
var IntegralReleaseInterpositionUserFlow model.IntegralReleaseInterpositionUserFlow
count, err := sess.Where("uid=? and coin_id=? and ord_id=? and kind=?", uid, coinId, ordId, 0).Sum(&IntegralReleaseInterpositionUserFlow, "amount")
if err != nil {
return 0
}
return count
}

// IntegralReleaseInterpositionUserFlowDelete 删除记录
func IntegralReleaseInterpositionUserFlowDelete(Db *xorm.Engine, id interface{}) (int64, error) {


+ 3
- 0
md/block_star_chain.go View File

@@ -44,6 +44,7 @@ const (

IntegralReleaseRedCoinGrantByOrdTitleForUserVirtualCoinFlow = "积分释放-红积分发放(订单)"
IntegralReleaseRedCoinGrantBySignInTitleForUserVirtualCoinFlow = "积分释放-红积分发放(签到)"
IntegralReleaseRedCoinGrantByRefundForUserVirtualCoinFlow = "订单退款-红积分扣除"
IntegralReleaseGreenCoinGrantByOrdTitleForUserVirtualCoinFlow = "积分释放-绿积分发放(订单)"
IntegralReleaseGreenCoinGrantBySignInTitleForUserVirtualCoinFlow = "积分释放-红积分发放(签到)"
)
@@ -84,6 +85,8 @@ const (
IntegralReleaseRedCoinGrantBySignInTransferTypeForUserVirtualCoinFlow = 136 // 积分释放-红积分发放(签到)
IntegralReleaseGreenCoinGrantByOrdTransferTypeForUserVirtualCoinFlow = 137 // 积分释放-绿积分发放(订单)
IntegralReleaseGreenCoinGrantBySignInTransferTypeForUserVirtualCoinFlow = 138 // 积分释放-绿积分发放(签到)
IntegralReleaseRedCoinGrantByOrdRefundTypeForUserVirtualCoinFlow = 139 // 订单退款-红积分扣除

)

const DealUserCoinRequestIdPrefix = "%s:block_star_chain_deal_user_coin:%d:uid:%d"


+ 4
- 2
md/fin_user_flow.go View File

@@ -11,11 +11,13 @@ const (
)

const (
IntegralReleaseServiceRevenueTitleForFinUserFlow = "积分释放-服务收益"
IntegralReleaseServiceRevenueTitleForFinUserFlow = "积分释放-服务收益"
IntegralReleaseServiceRevenueRefundTitleForFinUserFlow = "订单退款-服务收益扣除"
)

const (
IntegralReleaseServiceRevenueOrderTypeForFinUserFlow = 50 // 积分释放-服务收益
IntegralReleaseServiceRevenueOrderTypeForFinUserFlow = 50 // 积分释放-服务收益
IntegralReleaseServiceRevenueOrderRefundTypeForFinUserFlow = 51 // 积分释放-服务收益退款
)

const DealUserAmountRequestIdPrefix = "%s:deal_user_amount:%d"


Loading…
Cancel
Save