diff --git a/app/flexible_employment/svc/svc_fin_withdraw_apply.go b/app/flexible_employment/svc/svc_fin_withdraw_apply.go index 92834c5..54821d0 100644 --- a/app/flexible_employment/svc/svc_fin_withdraw_apply.go +++ b/app/flexible_employment/svc/svc_fin_withdraw_apply.go @@ -90,6 +90,7 @@ func DealFailResult(sess *xorm.Session, apply *model.FinWithdrawApply, masterId, } return nil } + func DealFailResultForPuPiao(sess *xorm.Session, apply *model.FinWithdrawApply, masterId, errMsg string) (err error) { userProfile, err := db.UserFindByIDWithSession(sess, apply.Uid) if err != nil { @@ -106,16 +107,16 @@ func DealFailResultForPuPiao(sess *xorm.Session, apply *model.FinWithdrawApply, if updateAck <= 0 { return errors.New("更新提现单失败") } - updateAck, err = sess.Where("request_id=?", apply.Id).Cols("state", "callback_data_for_trade_result").Update(model2.FlexibleEmploymentOrd{ - State: 3, - CallbackDataForTradeResult: errMsg, - }) - if err != nil { - return err - } - if updateAck <= 0 { - return errors.New("更新工猫记录失败") - } + //updateAck, err = sess.Where("request_id=?", apply.Id).Cols("state", "callback_data_for_trade_result").Update(model2.FlexibleEmploymentOrd{ + // State: 3, + // CallbackDataForTradeResult: errMsg, + //}) + //if err != nil { + // return err + //} + //if updateAck <= 0 { + // return errors.New("更新工猫记录失败") + //} //2、判断类型 加回手续费 var finUserFlow model.FinUserFlow diff --git a/consume/init.go b/consume/init.go index c667b6c..9b6cffd 100644 --- a/consume/init.go +++ b/consume/init.go @@ -19,50 +19,48 @@ func Init() { func initConsumes() { //jobs[consumeMd.ZhiosGuideStoreOrderFunName] = ZhiosGuideStoreOrder - jobs[consumeMd.ZhiosUserRegGiveFunName] = ZhiosUserRegGive - - jobs[consumeMd.ZhiosIntegralProxyRechargeFunName] = ZhiosIntegralProxyRecharge - jobs[consumeMd.ZhiosUserUpLvFunName] = ZhiosUserUpLv - jobs[consumeMd.CanalGuideOrderByUserUpLvConsume] = CanalGuideOrderByUserUpLvConsume - jobs[consumeMd.ZhiosOrderFreeFunName] = ZhiosOrderFree - jobs[consumeMd.ZhiosOrderTotalFunName] = ZhiosOrderTotal - jobs[consumeMd.ZhiosOrderTotalSecondFunName] = ZhiosOrderTotalSecond - - jobs[consumeMd.ZhiosOrderSettleTotalFunName] = ZhiosSettleTotal - jobs[consumeMd.ZhiosOrderHjyFunName] = ZhiosOrderHjy - jobs[consumeMd.ZhiosOrderBuckleFunName] = ZhiosOrderBuckle - - jobs[consumeMd.ZhiosSupplierAfterOrderFunName] = ZhiosSupplierAfterOrder - - jobs[consumeMd.ZhiosAppreciationFunName] = ZhiosAppreciation - jobs[consumeMd.ZhiosValidUserFunName] = ZhiosValidUser - - jobs[consumeMd.ZhiosAcquisitionConditionFunName] = ZhiosAcquisitionCondition - - jobs[consumeMd.DouShenUserRegisterConsumeForOfficialFunName] = DouShenUserRegisterConsumeForOfficial - jobs[consumeMd.DouShenUserRegisterConsumeForOperationCenterFunName] = DouShenUserRegisterConsumeForOperationCenter - jobs[consumeMd.DouShenUserRegisterConsumeForMyRecommenderFunName] = DouShenUserRegisterConsumeForMyRecommender - jobs[consumeMd.DouShenUserRegisterConsumeForMyFansFunName] = DouShenUserRegisterConsumeForMyFans - jobs[consumeMd.DouShenUserRegisterConsumeForUserRegisterUpLvFunName] = DouShenUserRegisterConsumeForUserRegisterUpLv - - jobs[consumeMd.ZhiosFastReturnOrderPayFunName] = ZhiosFastReturnOrderPay - jobs[consumeMd.ZhiosFastReturnOrderSuccessFunName] = ZhiosFastReturnOrderSuccess - jobs[consumeMd.ZhiosFastReturnOrderRefundFunName] = ZhiosFastReturnOrderRefund - jobs[consumeMd.ZhiosFastReturnOrderRefundSecondFunName] = ZhiosFastReturnOrderRefundSecond - - jobs[consumeMd.YoumishangExchangeStoreFunName] = YoumishangExchangeStore - - jobs[consumeMd.ZhiosRechargeOrderFailFunName] = ZhiosRechargeOrderFail - - jobs[consumeMd.CloudIssuanceAsyncMLoginFunName] = CloudIssuanceAsyncMLoginConsume - jobs[consumeMd.ZhiosTikTokUpdateFunName] = ZhiosTikTokUpdate - jobs[consumeMd.ZhiosTikTokAllUpdateFunName] = ZhiosTikTokAllUpdate - - jobs[consumeMd.ZhiosCapitalPoolOrderTotalFunName] = ZhiosCapitalPoolOrderTotal - jobs[consumeMd.ZhiosExpressOrderFail] = ZhiosExpressOrderFail - jobs[consumeMd.ZhiosWithdrawReward] = ZhiosWithdrawReward - jobs[consumeMd.ZhiosTaskTotal] = ZhiosTaskTotal - jobs[consumeMd.ZhiosAutoUnFreeze] = ZhiosAutoUnFreeze + //jobs[consumeMd.ZhiosIntegralProxyRechargeFunName] = ZhiosIntegralProxyRecharge + //jobs[consumeMd.ZhiosUserUpLvFunName] = ZhiosUserUpLv + //jobs[consumeMd.CanalGuideOrderByUserUpLvConsume] = CanalGuideOrderByUserUpLvConsume + //jobs[consumeMd.ZhiosOrderFreeFunName] = ZhiosOrderFree + //jobs[consumeMd.ZhiosOrderTotalFunName] = ZhiosOrderTotal + //jobs[consumeMd.ZhiosOrderTotalSecondFunName] = ZhiosOrderTotalSecond + // + //jobs[consumeMd.ZhiosOrderSettleTotalFunName] = ZhiosSettleTotal + //jobs[consumeMd.ZhiosOrderHjyFunName] = ZhiosOrderHjy + //jobs[consumeMd.ZhiosOrderBuckleFunName] = ZhiosOrderBuckle + // + //jobs[consumeMd.ZhiosSupplierAfterOrderFunName] = ZhiosSupplierAfterOrder + // + //jobs[consumeMd.ZhiosAppreciationFunName] = ZhiosAppreciation + //jobs[consumeMd.ZhiosValidUserFunName] = ZhiosValidUser + // + //jobs[consumeMd.ZhiosAcquisitionConditionFunName] = ZhiosAcquisitionCondition + // + //jobs[consumeMd.DouShenUserRegisterConsumeForOfficialFunName] = DouShenUserRegisterConsumeForOfficial + //jobs[consumeMd.DouShenUserRegisterConsumeForOperationCenterFunName] = DouShenUserRegisterConsumeForOperationCenter + //jobs[consumeMd.DouShenUserRegisterConsumeForMyRecommenderFunName] = DouShenUserRegisterConsumeForMyRecommender + //jobs[consumeMd.DouShenUserRegisterConsumeForMyFansFunName] = DouShenUserRegisterConsumeForMyFans + //jobs[consumeMd.DouShenUserRegisterConsumeForUserRegisterUpLvFunName] = DouShenUserRegisterConsumeForUserRegisterUpLv + // + //jobs[consumeMd.ZhiosFastReturnOrderPayFunName] = ZhiosFastReturnOrderPay + //jobs[consumeMd.ZhiosFastReturnOrderSuccessFunName] = ZhiosFastReturnOrderSuccess + //jobs[consumeMd.ZhiosFastReturnOrderRefundFunName] = ZhiosFastReturnOrderRefund + //jobs[consumeMd.ZhiosFastReturnOrderRefundSecondFunName] = ZhiosFastReturnOrderRefundSecond + // + //jobs[consumeMd.YoumishangExchangeStoreFunName] = YoumishangExchangeStore + // + //jobs[consumeMd.ZhiosRechargeOrderFailFunName] = ZhiosRechargeOrderFail + // + //jobs[consumeMd.CloudIssuanceAsyncMLoginFunName] = CloudIssuanceAsyncMLoginConsume + //jobs[consumeMd.ZhiosTikTokUpdateFunName] = ZhiosTikTokUpdate + //jobs[consumeMd.ZhiosTikTokAllUpdateFunName] = ZhiosTikTokAllUpdate + // + //jobs[consumeMd.ZhiosCapitalPoolOrderTotalFunName] = ZhiosCapitalPoolOrderTotal + //jobs[consumeMd.ZhiosExpressOrderFail] = ZhiosExpressOrderFail + //jobs[consumeMd.ZhiosWithdrawReward] = ZhiosWithdrawReward + //jobs[consumeMd.ZhiosTaskTotal] = ZhiosTaskTotal + //jobs[consumeMd.ZhiosAutoUnFreeze] = ZhiosAutoUnFreeze ////////////////////////////////////// V1 ///////////////////////////////////////////////////// //jobs[consumeMd.CloudIssuanceMsgCallBackFunName] = CloudIssuanceMsgCallBackConsume @@ -96,14 +94,14 @@ func initConsumes() { //jobs[consumeMd.OneCirclesDealUserCoinConsumeFunName] = OneCirclesDealUserCoinConsume //////////////////////////////////////// withdraw ///////////////////////////////////////////////////// - //jobs[consumeMd.WithdrawConsumeFunName] = WithdrawConsume - //jobs[consumeMd.FlexibleEmploymentWithdrawForGongMaoConsumeFunName] = FlexibleEmploymentWithdrawForGongMaoConsume - //jobs[consumeMd.FlexibleEmploymentWithdrawForPupiaoConsumeFunName] = FlexibleEmploymentWithdrawForPupiaoConsume - //jobs[consumeMd.NewFlexibleEmploymentWithdrawForPupiaoConsumeFunName] = NewFlexibleEmploymentWithdrawForPupiaoConsume - //jobs[consumeMd.ServiceAwardDividendRelationConsumeFunName] = ServiceAwardDividendRelationConsume - //jobs[consumeMd.CanalServiceAwardDividendRelationConsumeFunName] = CanalServiceAwardDividendRelationConsume //服务奖消费 - //jobs[consumeMd.DividendRewardConsumeFunName] = DividendRewardConsume //蜂蜜分红 - //jobs[consumeMd.ContributionExchangeConsumeFunName] = ContributionExchangeConsume //蜂蜜分红-兑换贡献值 + jobs[consumeMd.WithdrawConsumeFunName] = WithdrawConsume + jobs[consumeMd.FlexibleEmploymentWithdrawForGongMaoConsumeFunName] = FlexibleEmploymentWithdrawForGongMaoConsume + jobs[consumeMd.FlexibleEmploymentWithdrawForPupiaoConsumeFunName] = FlexibleEmploymentWithdrawForPupiaoConsume + jobs[consumeMd.NewFlexibleEmploymentWithdrawForPupiaoConsumeFunName] = NewFlexibleEmploymentWithdrawForPupiaoConsume + jobs[consumeMd.ServiceAwardDividendRelationConsumeFunName] = ServiceAwardDividendRelationConsume + jobs[consumeMd.CanalServiceAwardDividendRelationConsumeFunName] = CanalServiceAwardDividendRelationConsume //服务奖消费 + jobs[consumeMd.DividendRewardConsumeFunName] = DividendRewardConsume //蜂蜜分红 + jobs[consumeMd.ContributionExchangeConsumeFunName] = ContributionExchangeConsume //蜂蜜分红-兑换贡献值 //jobs[consumeMd.ZhiosMallGreenCoinConsumeFunName] = ZhiosMallGreenCoinConsume //绿色双链积分 //jobs[consumeMd.ZhiosOneCirclesCoinConsumeFunName] = ZhiosOneCirclesCoinConsume //一个圈圈虚拟币变化 diff --git a/consume/withdraw_consume_new_pupiao.go b/consume/withdraw_consume_new_pupiao.go index 529abd2..4025b64 100644 --- a/consume/withdraw_consume_new_pupiao.go +++ b/consume/withdraw_consume_new_pupiao.go @@ -153,8 +153,11 @@ func handleNewFlexibleEmploymentWithdrawForPupiaoConsume(msgData []byte) error { return err } if response.Code != 200 { + fmt.Println("NewFlexibleEmploymentWithdrawForPupiaoCurlERR::::::::::::::::", response) + utils.FilePutContents("NewFlexibleEmploymentWithdrawForPupiaoCurl_ERR", utils.SerializeStr(response)) flexibleEmploymentPupiaoOrd.BatchStatus = 3 - updateAck, err := flexibleEmploymentPupiaoOrdDb.Update(flexibleEmploymentPupiaoOrd.Id, flexibleEmploymentPupiaoOrd, "batch_status") + flexibleEmploymentPupiaoOrd.CallbackData = response.Msg + updateAck, err := flexibleEmploymentPupiaoOrdDb.Update(flexibleEmploymentPupiaoOrd.Id, flexibleEmploymentPupiaoOrd, "batch_status", "callback_data") if err != nil { return err } diff --git a/consume/withdraw_consume_pupiao.go b/consume/withdraw_consume_pupiao.go index 280adda..c2b140c 100644 --- a/consume/withdraw_consume_pupiao.go +++ b/consume/withdraw_consume_pupiao.go @@ -157,9 +157,13 @@ func handleFlexibleEmploymentWithdrawForPupiaoConsume(msgData []byte) error { if err = json.Unmarshal(utils.Serialize(result), &response); err != nil { return err } + utils.FilePutContents("FlexibleEmploymentWithdrawForPupiaoCurl", utils.SerializeStr(response)) if response.IsSuccess == "F" { + fmt.Println("FlexibleEmploymentWithdrawForPupiaoCurlERR::::::::::::::::", response) + utils.FilePutContents("FlexibleEmploymentWithdrawForPupiaoCurl_ERR", utils.SerializeStr(response)) flexibleEmploymentPupiaoOrd.BatchStatus = 1 - updateAck, err := flexibleEmploymentPupiaoOrdDb.Update(flexibleEmploymentPupiaoOrd.Id, flexibleEmploymentPupiaoOrd, "batch_status") + flexibleEmploymentPupiaoOrd.CallbackDataForReceiveOrder = response.ErrorMsg + updateAck, err := flexibleEmploymentPupiaoOrdDb.Update(flexibleEmploymentPupiaoOrd.Id, flexibleEmploymentPupiaoOrd, "batch_status", "callback_data_for_receive_order") if err != nil { return err }