From 1c29cbbc362479752b00b61a173a7d31028cd417 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 13 Nov 2024 10:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/db/model/online_merchant_income_info.go | 42 +++++++++++++++++++++ consume/yibao_order_share_money_mall.go | 3 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 app/db/model/online_merchant_income_info.go diff --git a/app/db/model/online_merchant_income_info.go b/app/db/model/online_merchant_income_info.go new file mode 100644 index 0000000..1772690 --- /dev/null +++ b/app/db/model/online_merchant_income_info.go @@ -0,0 +1,42 @@ +package model + +import ( + "time" +) + +type OnlineMerchantIncomeInfo struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + ZyosMerchantId int `json:"zyos_merchant_id" xorm:"not null comment('智莺商家id') INT(11)"` + FbMerchantCode string `json:"fb_merchant_code" xorm:"not null comment('乐刷商户账号') VARCHAR(255)"` + SalesMan int `json:"sales_man" xorm:"comment('授理商编号') INT(11)"` + BaseInfo string `json:"base_info" xorm:"not null comment('乐刷商户基本信息') TEXT"` + LegalPerson string `json:"legal_person" xorm:"not null comment('乐刷法人信息,个人类型填联系人信息') TEXT"` + AddressInfo string `json:"address_info" xorm:"not null comment('乐刷店铺地址信息') TEXT"` + LicenseInfo string `json:"license_info" xorm:"comment('乐刷(营业资质信息)注:小微进件不要传此对象') TEXT"` + AccountInfo string `json:"account_info" xorm:"comment('乐刷结算信息') TEXT"` + ShopInfo string `json:"shop_info" xorm:"comment('乐刷门店信息') TEXT"` + RateInfo string `json:"rate_info" xorm:"comment('乐刷费率') TEXT"` + OtherInfo string `json:"other_info" xorm:"comment('乐刷其它信息') TEXT"` + CreateTime time.Time `json:"create_time" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') DATETIME"` + UpdateTime time.Time `json:"update_time" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') DATETIME"` + DeletedTime time.Time `json:"deleted_time" xorm:"comment('删除时间') DATETIME"` + FbMerchantId int `json:"fb_merchant_id" xorm:"comment('乐刷商户号') INT(11)"` + FbStoreId int `json:"fb_store_id" xorm:"comment('乐刷门店ID') INT(11)"` + IncomeSuccessInfo string `json:"income_success_info" xorm:"comment('乐刷入驻成功后返回的信息') TEXT"` + LegalIdCardFrontPhoto string `json:"legal_id_card_front_photo" xorm:"comment('法人身份证正面二进制数据源') TEXT"` + LegalIdCardBackPhoto string `json:"legal_id_card_back_photo" xorm:"comment('法人身份证反面二进制数据源') TEXT"` + HandHoldIdCardPhoto string `json:"hand_hold_id_card_photo" xorm:"comment('手持身份证照二进制数据源') TEXT"` + LicensePhoto string `json:"license_photo" xorm:"comment('营业执照照片二进制数据源') TEXT"` + StoreEnvPhoto string `json:"store_env_photo" xorm:"comment('经营场所内设照片二进制数据源') TEXT"` + StoreFrontPhoto string `json:"store_front_photo" xorm:"comment('门头照二进制数据源') TEXT"` + StoreCashPhoto string `json:"store_cash_photo" xorm:"comment('收银台照片二进制数据源') TEXT"` + OperatingLicensePhoto string `json:"operating_license_photo" xorm:"comment('经营许可证图片二进制数据源') TEXT"` + BankCardPhoto string `json:"bank_card_photo" xorm:"comment('银行卡正面二进制数据源') TEXT"` + IdCardFrontPhoto string `json:"id_card_front_photo" xorm:"comment('结算人身份证正面二进制数据源') TEXT"` + IdCardBackPhoto string `json:"id_card_back_photo" xorm:"comment('结算人身份证反面二进制数据源') TEXT"` + GroupCreateState int `json:"group_create_state" xorm:"comment('创建分账组是否成功') INT(11)"` + GroupCreateResp string `json:"group_create_resp" xorm:"comment('创建分账组返回结果') TEXT"` + GroupId string `json:"group_id" xorm:"comment('分账组id') VARCHAR(255)"` + AppSupplementInfo string `json:"app_supplement_info" xorm:"comment('app补充信息') TEXT"` + AgreementImg string `json:"agreement_img" xorm:"not null comment('') VARCHAR(600)"` +} diff --git a/consume/yibao_order_share_money_mall.go b/consume/yibao_order_share_money_mall.go index 03f41e2..96a02b3 100644 --- a/consume/yibao_order_share_money_mall.go +++ b/consume/yibao_order_share_money_mall.go @@ -144,8 +144,9 @@ func fbShare(eg *xorm.Engine, dbName string, payMethod int, total float64, payOi return } var ( - merchantIncomeInfo model.MerchantIncomeInfo + merchantIncomeInfo model.OnlineMerchantIncomeInfo ) + _, err = eg.Where("zyos_merchant_id = ? AND group_create_state = ?", 0, 1).Get(&merchantIncomeInfo) if merchantIncomeInfo.FbStoreId == 0 || merchantIncomeInfo.FbMerchantId == 0 { err = errors.New("付呗支付暂未开通") utils.FilePutContents("GetMerchantIncomeInfoErr", "err:"+err.Error())