Преглед на файлове

add 区块星链

tags/v2.0.9
DengBiao преди 2 години
родител
ревизия
6cb1ddbb12
променени са 3 файла, в които са добавени 13 реда и са изтрити 3 реда
  1. +2
    -2
      db/db_block_star_chain_reward_records.go
  2. +5
    -1
      md/block_star_chain.go
  3. +6
    -0
      rule/block_star_chain_settlement.go

+ 2
- 2
db/db_block_star_chain_reward_records.go Целия файл

@@ -21,8 +21,8 @@ func BatchSelectBlockStarChainRewardRecords(Db *xorm.Engine, params map[string]i
}

// BlockStarChainRewardRecordsInsert 插入单条数据
func BlockStarChainRewardRecordsInsert(Db *xorm.Engine, BlockStarChainRewardRecords *model.BlockStarChainRewardRecords) (int64, error) {
_, err := Db.InsertOne(BlockStarChainRewardRecords)
func BlockStarChainRewardRecordsInsert(session *xorm.Session, BlockStarChainRewardRecords *model.BlockStarChainRewardRecords) (int64, error) {
_, err := session.InsertOne(BlockStarChainRewardRecords)
if err != nil {
return 0, err
}


+ 5
- 1
md/block_star_chain.go Целия файл

@@ -26,6 +26,8 @@ const (
OfflineConsumeGroupRewardByBusinessTitleForUserVirtualCoinFlow = "区块星链-线下消费团队奖励(商家)"
OnlineConsumeDirectPushRewardTitleForUserVirtualCoinFlow = "区块星链-线上消费直推奖励"
OnlineConsumeGroupRewardTitleForUserVirtualCoinFlow = "区块星链-线上消费团队奖励"
OfflineConsumeBeRewardTitleForUserVirtualCoinFlow = "区块星链-线下消费被打赏"
OfflineConsumeRewardTitleForUserVirtualCoinFlow = "区块星链-线下消费打赏"
)

const (
@@ -43,7 +45,9 @@ const (
OfflineConsumeGroupRewardByUserTransferTypeForUserVirtualCoinFlow = 110 //区块星链-线下消费团队奖励(用户)
OfflineConsumeGroupRewardByBusinessTransferTypeForUserVirtualCoinFlow = 111 //区块星链-线下消费团队奖励(商家)
OnlineConsumeDirectPushRewardTransferTypeForUserVirtualCoinFlow = 111 //区块星链-线上消费直推奖励
OnlineConsumeGroupRewardTypeForUserVirtualCoinFlow = 112 //区块星链-线上消费团队奖励
OnlineConsumeGroupRewardTransferTypeForUserVirtualCoinFlow = 112 //区块星链-线上消费团队奖励
OfflineConsumeBeRewardTransferTypeForUserVirtualCoinFlow = 113 //区块星链-线下消费被打赏
OfflineConsumeRewardTransferTypeForUserVirtualCoinFlow = 114 //区块星链-线下消费打赏
)

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


+ 6
- 0
rule/block_star_chain_settlement.go Целия файл

@@ -144,6 +144,12 @@ func DailySettlementBlockStarChain(engine *xorm.Engine, mid string) (err error)
_ = session.Rollback()
return err
}

err = session.Commit()
if err != nil {
_ = session.Rollback()
return errors.New("事务提交失败")
}
return nil
}



Зареждане…
Отказ
Запис