Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	consume/init.go
order_statistics
dengbiao 5 months ago
parent
commit
f0a238fe27
8 changed files with 29 additions and 7 deletions
  1. +1
    -0
      app/db/model/express_order.go
  2. +1
    -0
      app/db/model/user.go
  3. +1
    -0
      app/db/offical/model/express_agent_money_flow.go
  4. +3
    -0
      consume/canal_mall_ord_for_you_mi_shang.go
  5. +2
    -2
      consume/init.go
  6. +18
    -3
      consume/zhios_express_order_fail.go
  7. +2
    -1
      consume/zhios_installment_payment_auto_repaid_consume.go
  8. +1
    -1
      go.mod

+ 1
- 0
app/db/model/express_order.go View File

@@ -49,5 +49,6 @@ type ExpressOrder struct {
IsAgentSupplementPay int `json:"is_agent_supplement_pay" xorm:"default 0 INT(1)"`
Platform int `json:"platform" 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)"`
}

+ 1
- 0
app/db/model/user.go View File

@@ -27,4 +27,5 @@ type User struct {
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)"`
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)"`
}

+ 1
- 0
app/db/offical/model/express_agent_money_flow.go View File

@@ -13,4 +13,5 @@ type ExpressAgentMoneyFlow struct {
AfterAmount string `json:"after_amount" xorm:"default 0.00 DECIMAL(20,2)"`
Oid string `json:"oid" xorm:"VARCHAR(255)"`
Title string `json:"title" xorm:"VARCHAR(255)"`
Puid int `json:"puid" xorm:"default 0 INT(11)"`
}

+ 3
- 0
consume/canal_mall_ord_for_you_mi_shang.go View File

@@ -89,6 +89,9 @@ func FindUser(eg *xorm.Engine, uid string, dbName string, levelList []*model2.Us
if oneUser == nil {
return
}
if oneUser.IsNotUpLevel == 1 {
return
}
levelWeight := 0
for _, v1 := range levelList {
if v1.Id == oneUser.Level {


+ 2
- 2
consume/init.go View File

@@ -79,7 +79,7 @@ func initConsumes() {
//jobs[consumeMd.CanalUserVirtualCcoinFlowFunName] = CanalUserVirtualCoinFlowConsume

//////////////////////////////////////// oneCircles /////////////////////////////////////////////////////
//
//jobs[consumeMd.OneCirclesSignInGreenEnergyFunName] = OneCirclesSignInGreenEnergyConsume
//jobs[consumeMd.OneCirclesStartLevelDividendFunName] = OneCirclesStartLevelDividendConsume
//jobs[consumeMd.OneCirclesActivityCoinAutoExchangeGreenEnergyFunName] = OneCirclesActivityCoinAutoExchangeGreenEnergyConsume
@@ -96,7 +96,7 @@ func initConsumes() {
//jobs[consumeMd.ZhiosOneCirclesCoinConsumeFunName] = ZhiosOneCirclesCoinConsume //一个圈圈虚拟币变化

//////////////////////////////////////// autoRepaid /////////////////////////////////////////////////////
//jobs[consumeMd.InstallmentPaymentAutoRepaidConsumeFunName] = InstallmentPaymentAutoRepaidConsume //分期付 - 自动扣款
jobs[consumeMd.InstallmentPaymentAutoRepaidConsumeFunName] = InstallmentPaymentAutoRepaidConsume //分期付 - 自动扣款

////////////////////////////////////// SuperCloudIssuance /////////////////////////////////////////////////////
jobs[consumeMd.SuperCloudIssuanceMsgCallBackFunName] = SuperCloudIssuanceMsgCallBackConsume


+ 18
- 3
consume/zhios_express_order_fail.go View File

@@ -79,7 +79,8 @@ func handleZhiosExpressOrderFail(msg []byte) error {
if ord.Status == "已退回" {
return nil
}
base := CommBase(mid)
ordExpressPlatform := utils.IntToStr(ord.ExpressPlatform)
base := CommBase(mid, ordExpressPlatform)
if canalMsg.IsFail != "1" { //查下订单详情
param := map[string]interface{}{
"clientOrderNo": canalMsg.Oid,
@@ -152,6 +153,7 @@ func agentDeduct(oid string, base map[string]string, price string) (error, int)
return e.NewErr(400, "平台预存款扣除失败!"), 0
}
var flow = &model.ExpressAgentMoneyFlow{
Puid: utils.StrToInt(base["puid"]),
Uid: user.Uid,
Type: 0,
Time: time.Now(),
@@ -173,11 +175,24 @@ func AppUserListPuid(mid string) string {
if appList != nil && appList.Puid > 0 {
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
}

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"
stringStr, err := cache.GetString(key)
stringMap := make(map[string]string)


+ 2
- 1
consume/zhios_installment_payment_auto_repaid_consume.go View File

@@ -1,6 +1,7 @@
package consume

import (
"applet/app/cfg"
"applet/app/db"
"applet/app/utils/logx"
"applet/consume/md"
@@ -59,7 +60,7 @@ func handleInstallmentPaymentAutoRepaidConsume(ch *rabbit.Channel, msgData []byt
return err
}
engine := db.DBs[msg.MasterId]
installment_payment.Init(cfg.RedisAddr)
//2、调用 `DealInstallmentPaymentAutoRepaid` 制度方法进行扣款
err = installment_payment.DealInstallmentPaymentAutoRepaid(engine, ch, *msg, msg.MasterId)
return nil


+ 1
- 1
go.mod View File

@@ -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_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_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_third_party_api.git v1.1.21-0.20240611024753-7cd929a03014
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5


Loading…
Cancel
Save