添加微信支付支持,重构资源创建逻辑,更新支付宝相关配置,移除账单状态字段
This commit is contained in:
@@ -38,7 +38,6 @@ func newBill(db *gorm.DB, opts ...gen.DOOption) bill {
|
||||
_bill.Type = field.NewInt32(tableName, "type")
|
||||
_bill.BillNo = field.NewString(tableName, "bill_no")
|
||||
_bill.RefundID = field.NewInt32(tableName, "refund_id")
|
||||
_bill.Status = field.NewInt32(tableName, "status")
|
||||
_bill.Amount = field.NewFloat64(tableName, "amount")
|
||||
_bill.Trade = billBelongsToTrade{
|
||||
db: db.Session(&gorm.Session{}),
|
||||
@@ -83,7 +82,6 @@ type bill struct {
|
||||
Type field.Int32
|
||||
BillNo field.String
|
||||
RefundID field.Int32
|
||||
Status field.Int32
|
||||
Amount field.Float64
|
||||
Trade billBelongsToTrade
|
||||
|
||||
@@ -117,7 +115,6 @@ func (b *bill) updateTableName(table string) *bill {
|
||||
b.Type = field.NewInt32(table, "type")
|
||||
b.BillNo = field.NewString(table, "bill_no")
|
||||
b.RefundID = field.NewInt32(table, "refund_id")
|
||||
b.Status = field.NewInt32(table, "status")
|
||||
b.Amount = field.NewFloat64(table, "amount")
|
||||
|
||||
b.fillFieldMap()
|
||||
@@ -135,7 +132,7 @@ func (b *bill) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
||||
}
|
||||
|
||||
func (b *bill) fillFieldMap() {
|
||||
b.fieldMap = make(map[string]field.Expr, 16)
|
||||
b.fieldMap = make(map[string]field.Expr, 15)
|
||||
b.fieldMap["id"] = b.ID
|
||||
b.fieldMap["user_id"] = b.UserID
|
||||
b.fieldMap["info"] = b.Info
|
||||
@@ -147,7 +144,6 @@ func (b *bill) fillFieldMap() {
|
||||
b.fieldMap["type"] = b.Type
|
||||
b.fieldMap["bill_no"] = b.BillNo
|
||||
b.fieldMap["refund_id"] = b.RefundID
|
||||
b.fieldMap["status"] = b.Status
|
||||
b.fieldMap["amount"] = b.Amount
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user