DengBiao 1 rok temu
rodzic
commit
de4dfe3e5b
6 zmienionych plików z 71 dodań i 0 usunięć
  1. +4
    -0
      app/admin/hdl/hdl_enterprise.go
  2. +15
    -0
      app/db/model/factory_identity.go
  3. +9
    -0
      app/db/model/factory_identity_with_user_identity.go
  4. +27
    -0
      app/db/model/factory_ord.go
  5. +13
    -0
      app/db/model/factory_set.go
  6. +3
    -0
      app/enum/enum_enterprise.go

+ 4
- 0
app/admin/hdl/hdl_enterprise.go Wyświetl plik

@@ -60,6 +60,10 @@ func EnterpriseList(c *gin.Context) {
"name": enum.EnterprisePvd(enum.EnterprisePvdForFaceScanPayment).String(),
"value": enum.EnterprisePvdForFaceScanPayment,
},
{
"name": enum.EnterprisePvd(enum.EnterprisePvdForAllPayment).String(),
"value": enum.EnterprisePvdForAllPayment,
},
},
}, nil)
return


+ 15
- 0
app/db/model/factory_identity.go Wyświetl plik

@@ -0,0 +1,15 @@
package model

type FactoryIdentity struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Name string `json:"name" xorm:"not null default '' comment('名称') VARCHAR(255)"`
State int `json:"state" xorm:"not null default 1 comment('状态(1:正常 2:冻结)') TINYINT(1)"`
Memo string `json:"memo" xorm:"not null default '' comment('备注') VARCHAR(255)"`
IsSubsidy int `json:"is_subsidy" xorm:"not null default 0 comment('是否优惠补贴(0:否 1:是)') TINYINT(1)"`
SubsidyAmount string `json:"subsidy_amount" xorm:"not null default 0.00 comment('补贴金额') DECIMAL(8,2)"`
LeastPayAmount string `json:"least_pay_amount" xorm:"not null default 0.00 comment('最少支付金额') DECIMAL(8,2)"`
IsLimitConsumeNum int `json:"is_limit_consume_num" xorm:"not null default 0 comment('是否限制消费次数') TINYINT(1)"`
LimitConsumeNum int `json:"limit_consume_num" xorm:"default 0 comment('限制消费次数/日') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 9
- 0
app/db/model/factory_identity_with_user_identity.go Wyświetl plik

@@ -0,0 +1,9 @@
package model

type FactoryIdentityWithUserIdentity struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
UserIdentityId int `json:"user_identity_id" xorm:"not null default 0 comment('用户身份id') INT(11)"`
FactoryIdentityId int `json:"factory_identity_id" xorm:"not null default 0 comment('工厂身份id') INT(11)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 27
- 0
app/db/model/factory_ord.go Wyświetl plik

@@ -0,0 +1,27 @@
package model

type FactoryOrd struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
EnterpriseId int `json:"enterprise_id" xorm:"not null default 0 comment('所属单位id') INT(11)"`
Uid int `json:"uid" xorm:"not null default 0 comment('用户id') INT(11)"`
UserIdentityId int `json:"user_identity_id" xorm:"not null default 0 comment('用户身份id') INT(11)"`
OutOrderNo string `json:"out_order_no" xorm:"not null default '' comment('外部订单号,设备端产生') VARCHAR(255)"`
TradeNo string `json:"trade_no" xorm:"not null default '' comment('第三方交易号,支付宝,微信,ISV渠道等') VARCHAR(255)"`
BuyerId string `json:"buyer_id" xorm:"not null default '' comment('渠道买家标识') CHAR(100)"`
TerminalId string `json:"terminal_id" xorm:"not null default '' comment('设备编号') CHAR(100)"`
TradeChannel string `json:"trade_channel" xorm:"not null default '' comment('交易渠道') CHAR(100)"`
StoreId string `json:"store_id" xorm:"not null default '' comment('门店编号') CHAR(100)"`
MerchantId string `json:"merchant_id" xorm:"not null default '' comment('商户编码') CHAR(100)"`
GmtPayment string `json:"gmt_payment" xorm:"not null default '' comment('支付成功时间') CHAR(100)"`
OrderStatus int `json:"order_status" xorm:"not null default 1 comment('交易状态 (1:支付成功 2:已退款 3:已关闭)') TINYINT(1)"`
Subject string `json:"subject" xorm:"not null default '' comment('订单主题') CHAR(50)"`
TotalAmount string `json:"total_amount" xorm:"not null default 0.00 comment('订单总金额') DECIMAL(8,2)"`
DiscountAmount string `json:"discount_amount" xorm:"not null default 0.00 comment('支付宝平台优惠金额') DECIMAL(8,2)"`
MdiscountAmount string `json:"mdiscount_amount" xorm:"not null default 0.00 comment('支付宝商家优惠金额') DECIMAL(8,2)"`
ReceiptAmount string `json:"receipt_amount" xorm:"not null default 0.00 comment('实收金额') DECIMAL(8,2)"`
BuyerPayAmount string `json:"buyer_pay_amount" xorm:"not null default 0.00 comment('买家支付金额') DECIMAL(8,2)"`
SubsidyAmount string `json:"subsidy_amount" xorm:"not null default 0.00 comment('补贴金额') DECIMAL(8,2)"`
ServiceFee string `json:"service_fee" xorm:"not null default 0.00 comment('服务费用') DECIMAL(8,2)"`
CreateAt string `json:"create_at" xorm:"not null pk default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 13
- 0
app/db/model/factory_set.go Wyświetl plik

@@ -0,0 +1,13 @@
package model

import (
"time"
)

type FactorySet struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
IsOpenNaturalCustomer int `json:"is_open_natural_customer" xorm:"not null default 0 comment('开启自然顾客(1:开启 2:关闭)') TINYINT(1)"`
NaturalCustomerServiceFee string `json:"natural_customer_service_fee" xorm:"not null default 0.00 comment('自然顾客服务费') DECIMAL(8,2)"`
CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 3
- 0
app/enum/enum_enterprise.go Wyświetl plik

@@ -50,6 +50,7 @@ type EnterprisePvd int32
const (
EnterprisePvdForOnlinePayment = 1
EnterprisePvdForFaceScanPayment = 2
EnterprisePvdForAllPayment = 3
)

func (gt EnterprisePvd) String() string {
@@ -58,6 +59,8 @@ func (gt EnterprisePvd) String() string {
return "在线支付"
case EnterprisePvdForFaceScanPayment:
return "刷脸支付"
case EnterprisePvdForAllPayment:
return "刷脸/刷码/扫码支付"
default:
return "未知"
}


Ładowanie…
Anuluj
Zapisz