diff --git a/app/svc/svc_deal_commission.go b/app/svc/svc_deal_commission.go index 070eda3..77f3905 100644 --- a/app/svc/svc_deal_commission.go +++ b/app/svc/svc_deal_commission.go @@ -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) + //} } // 分佣表插入获取到的数据 diff --git a/consume/zhios_task_reward_exchange.go b/consume/zhios_task_reward_exchange.go index 8228e4a..c92d056 100644 --- a/consume/zhios_task_reward_exchange.go +++ b/consume/zhios_task_reward_exchange.go @@ -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