Explorar el Código

Merge remote-tracking branch 'origin/master'

shencaibiao hace 4 años
padre
commit
e5360c4985

+ 4 - 2
go/gopath/src/fohow.com/apps/controllers/cron_controller/sync_balance.go

@@ -121,6 +121,10 @@ func autoTakeCash() {
 			beego.BeeLogger.Error("Take cash User[%d] is not exist", wxUser.UserId)
 			continue
 		}
+
+		//提现成功,剔除队列
+		lib_redis.ThrowOutRedisList(cashKey, takeId)
+
 		var check_state string
 		check_state = wx_mp.PAY_NO_CHECK
 		payCode := sys_config.GetPayConfigByDepart(wxUser.Depart, true)
@@ -133,8 +137,6 @@ func autoTakeCash() {
 			cashRecord.Remark = "提现已打款"
 			cashRecord.PaiedAt = time.Now().Unix()
 			cashRecord.Save()
-			//提现成功,剔除队列
-			lib_redis.ThrowOutRedisList(cashKey, takeId)
 		} else {
 			cashRecord.State = 2
 			cashRecord.Remark = ret["err_code_des"]

+ 1 - 1
go/gopath/src/fohow.com/apps/models/sys_config/sys_config.go

@@ -235,7 +235,7 @@ func GetPayConfigByDepart(depart int64, useCache bool) string {
 	err := o.QueryTable(item).Filter("depart", depart).OrderBy("-id").Limit(1).One(item)
 	if err != nil {
 		beego.BeeLogger.Info("pay_model.GetPayConfigByDepart.depart(%d) err[%s]", depart, err)
-		return CODE_FOHOW
+		return CODE_FOHOW_OUBIAO
 	}
 
 	if item != nil {

+ 8 - 4
go/gopath/src/fohow.com/libs/wx_mp/pay.go

@@ -145,10 +145,14 @@ func GetMechantInfo(mechantCode string) (ret MechantPayInfo) {
 		ret.MchKeyFile = beego.AppConfig.String("OuBiaoMchKeyFile")
 		ret.MchCertFile = beego.AppConfig.String("OuBiaoMchCertFile")
 	default:
-		ret.MchId = mchId
-		ret.ApiKey = apiKey
-		ret.MchKeyFile = beego.AppConfig.String("WxMchKeyFile")
-		ret.MchCertFile = beego.AppConfig.String("MchCertFile")
+		//ret.MchId = mchId
+		//ret.ApiKey = apiKey
+		//ret.MchKeyFile = beego.AppConfig.String("WxMchKeyFile")
+		//ret.MchCertFile = beego.AppConfig.String("MchCertFile")
+		ret.MchId = oubiaoMchId
+		ret.ApiKey = oubiaoApiKey
+		ret.MchKeyFile = beego.AppConfig.String("OuBiaoMchKeyFile")
+		ret.MchCertFile = beego.AppConfig.String("OuBiaoMchCertFile")
 	}
 	return ret