# Conflicts: # consume/init.goorder_statistics
@@ -49,5 +49,6 @@ type ExpressOrder struct { | |||||
IsAgentSupplementPay int `json:"is_agent_supplement_pay" xorm:"default 0 INT(1)"` | IsAgentSupplementPay int `json:"is_agent_supplement_pay" xorm:"default 0 INT(1)"` | ||||
Platform int `json:"platform" xorm:"default 0 INT(1)"` | Platform int `json:"platform" xorm:"default 0 INT(1)"` | ||||
Own int `json:"own" xorm:"default 0 INT(1)"` | Own int `json:"own" xorm:"default 0 INT(1)"` | ||||
ExpressPlatform int `json:"express_platform" xorm:"default 0 INT(1)"` | |||||
NeedDeduct string `json:"need_deduct" xorm:"default 0.00000000 DECIMAL(20,8)"` | NeedDeduct string `json:"need_deduct" xorm:"default 0.00000000 DECIMAL(20,8)"` | ||||
} | } |
@@ -27,4 +27,5 @@ type User struct { | |||||
IsMarketer int `json:"is_marketer" xorm:"not null default 0 comment('是否市商 0否 1是') TINYINT(1)"` | IsMarketer int `json:"is_marketer" xorm:"not null default 0 comment('是否市商 0否 1是') TINYINT(1)"` | ||||
Zone string `json:"zone" xorm:"not null default '86' comment('区号') VARCHAR(100)"` | Zone string `json:"zone" xorm:"not null default '86' comment('区号') VARCHAR(100)"` | ||||
SalePhone string `json:"sale_phone" xorm:"not null default '' comment('') VARCHAR(100)"` | SalePhone string `json:"sale_phone" xorm:"not null default '' comment('') VARCHAR(100)"` | ||||
IsNotUpLevel int `json:"is_not_up_level" xorm:"not null default 1 comment('()') INT(1)"` | |||||
} | } |
@@ -13,4 +13,5 @@ type ExpressAgentMoneyFlow struct { | |||||
AfterAmount string `json:"after_amount" xorm:"default 0.00 DECIMAL(20,2)"` | AfterAmount string `json:"after_amount" xorm:"default 0.00 DECIMAL(20,2)"` | ||||
Oid string `json:"oid" xorm:"VARCHAR(255)"` | Oid string `json:"oid" xorm:"VARCHAR(255)"` | ||||
Title string `json:"title" xorm:"VARCHAR(255)"` | Title string `json:"title" xorm:"VARCHAR(255)"` | ||||
Puid int `json:"puid" xorm:"default 0 INT(11)"` | |||||
} | } |
@@ -89,6 +89,9 @@ func FindUser(eg *xorm.Engine, uid string, dbName string, levelList []*model2.Us | |||||
if oneUser == nil { | if oneUser == nil { | ||||
return | return | ||||
} | } | ||||
if oneUser.IsNotUpLevel == 1 { | |||||
return | |||||
} | |||||
levelWeight := 0 | levelWeight := 0 | ||||
for _, v1 := range levelList { | for _, v1 := range levelList { | ||||
if v1.Id == oneUser.Level { | if v1.Id == oneUser.Level { | ||||
@@ -79,7 +79,7 @@ func initConsumes() { | |||||
//jobs[consumeMd.CanalUserVirtualCcoinFlowFunName] = CanalUserVirtualCoinFlowConsume | //jobs[consumeMd.CanalUserVirtualCcoinFlowFunName] = CanalUserVirtualCoinFlowConsume | ||||
//////////////////////////////////////// oneCircles ///////////////////////////////////////////////////// | //////////////////////////////////////// oneCircles ///////////////////////////////////////////////////// | ||||
// | |||||
//jobs[consumeMd.OneCirclesSignInGreenEnergyFunName] = OneCirclesSignInGreenEnergyConsume | //jobs[consumeMd.OneCirclesSignInGreenEnergyFunName] = OneCirclesSignInGreenEnergyConsume | ||||
//jobs[consumeMd.OneCirclesStartLevelDividendFunName] = OneCirclesStartLevelDividendConsume | //jobs[consumeMd.OneCirclesStartLevelDividendFunName] = OneCirclesStartLevelDividendConsume | ||||
//jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyConsume | //jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyConsume | ||||
@@ -96,7 +96,7 @@ func initConsumes() { | |||||
//jobs[consumeMd.ZhiosOneCirclesCoinConsumeFunName] = ZhiosOneCirclesCoinConsume //一个圈圈虚拟币变化 | //jobs[consumeMd.ZhiosOneCirclesCoinConsumeFunName] = ZhiosOneCirclesCoinConsume //一个圈圈虚拟币变化 | ||||
//////////////////////////////////////// autoRepaid ///////////////////////////////////////////////////// | //////////////////////////////////////// autoRepaid ///////////////////////////////////////////////////// | ||||
//jobs[consumeMd.InstallmentPaymentAutoRepaidConsumeFunName] = InstallmentPaymentAutoRepaidConsume //分期付 - 自动扣款 | |||||
jobs[consumeMd.InstallmentPaymentAutoRepaidConsumeFunName] = InstallmentPaymentAutoRepaidConsume //分期付 - 自动扣款 | |||||
////////////////////////////////////// SuperCloudIssuance ///////////////////////////////////////////////////// | ////////////////////////////////////// SuperCloudIssuance ///////////////////////////////////////////////////// | ||||
jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume | jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume | ||||
@@ -79,7 +79,8 @@ func handleZhiosExpressOrderFail(msg []byte) error { | |||||
if ord.Status == "已退回" { | if ord.Status == "已退回" { | ||||
return nil | return nil | ||||
} | } | ||||
base := CommBase(mid) | |||||
ordExpressPlatform := utils.IntToStr(ord.ExpressPlatform) | |||||
base := CommBase(mid, ordExpressPlatform) | |||||
if canalMsg.IsFail != "1" { //查下订单详情 | if canalMsg.IsFail != "1" { //查下订单详情 | ||||
param := map[string]interface{}{ | param := map[string]interface{}{ | ||||
"clientOrderNo": canalMsg.Oid, | "clientOrderNo": canalMsg.Oid, | ||||
@@ -152,6 +153,7 @@ func agentDeduct(oid string, base map[string]string, price string) (error, int) | |||||
return e.NewErr(400, "平台预存款扣除失败!"), 0 | return e.NewErr(400, "平台预存款扣除失败!"), 0 | ||||
} | } | ||||
var flow = &model.ExpressAgentMoneyFlow{ | var flow = &model.ExpressAgentMoneyFlow{ | ||||
Puid: utils.StrToInt(base["puid"]), | |||||
Uid: user.Uid, | Uid: user.Uid, | ||||
Type: 0, | Type: 0, | ||||
Time: time.Now(), | Time: time.Now(), | ||||
@@ -173,11 +175,24 @@ func AppUserListPuid(mid string) string { | |||||
if appList != nil && appList.Puid > 0 { | if appList != nil && appList.Puid > 0 { | ||||
uid = utils.IntToStr(appList.Puid) | uid = utils.IntToStr(appList.Puid) | ||||
} | } | ||||
return uid | |||||
} | |||||
func AppUserListPuidNew(mid string, ordExpressPlatform string) string { | |||||
appList := offical.GetUserAppList(mid) | |||||
uid := "0" | |||||
if appList != nil && appList.Puid > 0 { | |||||
uid = utils.IntToStr(appList.Puid) | |||||
} | |||||
expressPlatform := offical.MasterListCfgGetOneData(uid, "express_platform_type") | |||||
if expressPlatform == "1" || ordExpressPlatform == "1" { //如果是1 走智莺官方 | |||||
uid = "0" | |||||
} | |||||
return uid | return uid | ||||
} | } | ||||
func CommBase(mid string) map[string]string { | |||||
puid := AppUserListPuid(mid) | |||||
func CommBase(mid, ordExpressPlatform string) map[string]string { | |||||
puid := AppUserListPuidNew(mid, ordExpressPlatform) | |||||
key := puid + "_official_express_info" | key := puid + "_official_express_info" | ||||
stringStr, err := cache.GetString(key) | stringStr, err := cache.GetString(key) | ||||
stringMap := make(map[string]string) | stringMap := make(map[string]string) | ||||
@@ -1,6 +1,7 @@ | |||||
package consume | package consume | ||||
import ( | import ( | ||||
"applet/app/cfg" | |||||
"applet/app/db" | "applet/app/db" | ||||
"applet/app/utils/logx" | "applet/app/utils/logx" | ||||
"applet/consume/md" | "applet/consume/md" | ||||
@@ -59,7 +60,7 @@ func handleInstallmentPaymentAutoRepaidConsume(ch *rabbit.Channel, msgData []byt | |||||
return err | return err | ||||
} | } | ||||
engine := db.DBs[msg.MasterId] | engine := db.DBs[msg.MasterId] | ||||
installment_payment.Init(cfg.RedisAddr) | |||||
//2、调用 `DealInstallmentPaymentAutoRepaid` 制度方法进行扣款 | //2、调用 `DealInstallmentPaymentAutoRepaid` 制度方法进行扣款 | ||||
err = installment_payment.DealInstallmentPaymentAutoRepaid(engine, ch, *msg, msg.MasterId) | err = installment_payment.DealInstallmentPaymentAutoRepaid(engine, ch, *msg, msg.MasterId) | ||||
return nil | return nil | ||||
@@ -6,7 +6,7 @@ require ( | |||||
code.fnuoos.com/go_rely_warehouse/zyos_go_condition_statistics.git v1.1.2-0.20240607091816-3df1433a2f0d | code.fnuoos.com/go_rely_warehouse/zyos_go_condition_statistics.git v1.1.2-0.20240607091816-3df1433a2f0d | ||||
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.0 | code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.0 | ||||
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | ||||
code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git v1.9.10-0.20240621133142-77a2bc0a37a1 | |||||
code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git v1.9.10-0.20240626081400-7f66164d40c2 | |||||
code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git v1.6.2-0.20231116085701-9ba6e19f877b | code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git v1.6.2-0.20231116085701-9ba6e19f877b | ||||
code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240611024753-7cd929a03014 | code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240611024753-7cd929a03014 | ||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 | github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 | ||||