Ver a proveniência

更新

one_orenge
huangjiajun há 7 meses
ascendente
cometimento
b06d5bf195
2 ficheiros alterados com 22 adições e 20 eliminações
  1. +18
    -19
      app/svc/svc_deal_commission.go
  2. +4
    -1
      consume/zhios_task_reward_exchange.go

+ 18
- 19
app/svc/svc_deal_commission.go Ver ficheiro

@@ -30,25 +30,24 @@ func GetLvUser(engine *xorm.Engine, CommissionParam md2.CommissionFirstParam, oi
}

CommOrderRelateInsert(engine, oid, CommissionParam.Provider, int(time.Now().Unix()), lvUser, mapData)
sql := `SELECT id from user_virtual_coin_flow where ord_id='%d'`
sql = fmt.Sprintf(sql, oid)
nativeString, _ := db2.QueryNativeString(engine, sql)
has := false
if len(nativeString) > 0 && utils.StrToInt(nativeString[0]["id"]) > 0 {
has = true
}
sql1 := `SELECT id from fin_user_flow where ord_id='%d'`
sql1 = fmt.Sprintf(sql1, oid)
nativeString1, _ := db2.QueryNativeString(engine, sql1)
has1 := false
if len(nativeString1) > 0 && utils.StrToInt(nativeString1[0]["id"]) > 0 {
has1 = true
}
fmt.Println("===========任务4=============", masterId, CommissionParam.Uid, oid, has, has1)
if has == false && has1 == false {
fmt.Println("===========任务5=============", masterId, CommissionParam.Uid, oid, has, has1)
SettleDone(engine, CommissionParam.Provider, oid, masterId, mapData)
}
//sql := `SELECT id from user_virtual_coin_flow where ord_id='%d'`
//sql = fmt.Sprintf(sql, oid)
//nativeString, _ := db2.QueryNativeString(engine, sql)
//has := false
//if len(nativeString) > 0 && utils.StrToInt(nativeString[0]["id"]) > 0 {
// has = true
//}
//sql1 := `SELECT id from fin_user_flow where ord_id='%d'`
//sql1 = fmt.Sprintf(sql1, oid)
//nativeString1, _ := db2.QueryNativeString(engine, sql1)
//has1 := false
//if len(nativeString1) > 0 && utils.StrToInt(nativeString1[0]["id"]) > 0 {
// has1 = true
//}
//fmt.Println("===========任务4=============", masterId, CommissionParam.Uid, oid, has, has1)
//if has == false && has1 == false {
SettleDone(engine, CommissionParam.Provider, oid, masterId, mapData)
//}
}

// 分佣表插入获取到的数据


+ 4
- 1
consume/zhios_task_reward_exchange.go Ver ficheiro

@@ -73,13 +73,16 @@ func handleZhiosTaskRewardExchange(msg []byte) error {
CommissionParam.CommissionParam.Commission = canalMsg.Reward
CommissionParam.Uid = uid
CommissionParam.Provider = "task_center"
if canalMsg.RewardType == "2" {
CommissionParam.Provider = "task_reward_new"
}
title := canalMsg.Title
var mapData = map[string]string{
"coin_id_type": canalMsg.CoinIdType,
"mode": canalMsg.Mode,
"title": title,
"device_model": canalMsg.DeviceModel,
"reward": canalMsg.RewardType,
"reward_type": canalMsg.RewardType,
}
svc.GetLvUser(eg, CommissionParam, utils.StrToInt64(canalMsg.Oid), mid, mapData)
return nil


Carregando…
Cancelar
Guardar