Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	consume/init.go
master
huangjiajun 2 weeks ago
parent
commit
998e456844
4 changed files with 70 additions and 64 deletions
  1. +11
    -10
      app/flexible_employment/svc/svc_fin_withdraw_apply.go
  2. +50
    -52
      consume/init.go
  3. +4
    -1
      consume/withdraw_consume_new_pupiao.go
  4. +5
    -1
      consume/withdraw_consume_pupiao.go

+ 11
- 10
app/flexible_employment/svc/svc_fin_withdraw_apply.go View File

@@ -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


+ 50
- 52
consume/init.go View File

@@ -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 //一个圈圈虚拟币变化


+ 4
- 1
consume/withdraw_consume_new_pupiao.go View File

@@ -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
}


+ 5
- 1
consume/withdraw_consume_pupiao.go View File

@@ -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
}


Loading…
Cancel
Save