Kaynağa Gözat

更新

master
huangjiajun 3 ay önce
ebeveyn
işleme
891cc747f6
9 değiştirilmiş dosya ile 114 ekleme ve 0 silme
  1. +5
    -0
      src/super/dao/sms_money_dao.go
  2. +7
    -0
      src/super/dao/sms_num_list_dao.go
  3. +5
    -0
      src/super/dao/sms_record_dao.go
  4. +14
    -0
      src/super/implement/sms_money_implement.go
  5. +24
    -0
      src/super/implement/sms_num_list_implement.go
  6. +14
    -0
      src/super/implement/sms_record_implement.go
  7. +11
    -0
      src/super/model/sms_money.go
  8. +7
    -0
      src/super/model/sms_num_list.go
  9. +27
    -0
      src/super/model/sms_record.go

+ 5
- 0
src/super/dao/sms_money_dao.go Dosyayı Görüntüle

@@ -0,0 +1,5 @@
package dao

type SmsMoneyDao interface {
//TODO:: You can add specific method definitions here
}

+ 7
- 0
src/super/dao/sms_num_list_dao.go Dosyayı Görüntüle

@@ -0,0 +1,7 @@
package dao

import "code.fnuoos.com/zhimeng/model.git/src/super/model"

type SmsNumListDao interface {
GetSmsNum(uid interface{}) *model.SmsNumList
}

+ 5
- 0
src/super/dao/sms_record_dao.go Dosyayı Görüntüle

@@ -0,0 +1,5 @@
package dao

type SmsRecordDao interface {
//TODO:: You can add specific method definitions here
}

+ 14
- 0
src/super/implement/sms_money_implement.go Dosyayı Görüntüle

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"xorm.io/xorm"
)

func NewSmsMoneyDb(engine *xorm.Engine) dao.SmsMoneyDao {
return &SmsMoneyDb{Db: engine}
}

type SmsMoneyDb struct {
Db *xorm.Engine
}

+ 24
- 0
src/super/implement/sms_num_list_implement.go Dosyayı Görüntüle

@@ -0,0 +1,24 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"xorm.io/xorm"
)

func NewSmsNumListDb(engine *xorm.Engine) dao.SmsNumListDao {
return &SmsNumListDb{Db: engine}
}

type SmsNumListDb struct {
Db *xorm.Engine
}

func (s SmsNumListDb) GetSmsNum(uid interface{}) *model.SmsNumList {
var data model.SmsNumList
get, err := s.Db.Where("uid=? ", uid).Get(&data)
if get == false || err != nil {
return nil
}
return &data
}

+ 14
- 0
src/super/implement/sms_record_implement.go Dosyayı Görüntüle

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"xorm.io/xorm"
)

func NewSmsRecordDb(engine *xorm.Engine) dao.SmsRecordDao {
return &SmsRecordDb{Db: engine}
}

type SmsRecordDb struct {
Db *xorm.Engine
}

+ 11
- 0
src/super/model/sms_money.go Dosyayı Görüntüle

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

type SmsMoney struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Money float64 `json:"money" xorm:"default 0.00 comment('金额') DOUBLE(11,2)"`
Num int `json:"num" xorm:"default 0 comment('短信条数') INT(11)"`
Hide int `json:"hide" xorm:"default 0 comment('0否 1是') INT(1)"`
Sort int `json:"sort" xorm:"default 0 comment('排序') INT(11)"`
UpdateTime int `json:"update_time" xorm:"default 0 comment('修改时间') INT(11)"`
Time int `json:"time" xorm:"default 0 comment('创建时间') INT(11)"`
}

+ 7
- 0
src/super/model/sms_num_list.go Dosyayı Görüntüle

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

type SmsNumList struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uid int `json:"uid" xorm:"default 0 comment('用户') INT(11)"`
Num int `json:"num" xorm:"default 0 comment('短信条数') INT(11)"`
}

+ 27
- 0
src/super/model/sms_record.go Dosyayı Görüntüle

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

import (
"time"
)

type SmsRecord struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
OrdId string `json:"ord_id" xorm:"not null default '' comment('订单id') VARCHAR(100)"`
Uid int `json:"uid" xorm:"not null default 0 comment('主用户id') INT(11)"`
Phone string `json:"phone" xorm:"not null default '0' comment('主账号-手机号码') VARCHAR(20)"`
Nickname string `json:"nickname" xorm:"not null default '' comment('主账号-昵称') VARCHAR(255)"`
Amount string `json:"amount" xorm:"not null default '0' comment('充值金额') VARCHAR(255)"`
CostPrice string `json:"cost_price" xorm:"not null default '0' comment('付费价格') VARCHAR(255)"`
Balance string `json:"balance" xorm:"not null default '0' comment('当前余额(充值完当前余额)') VARCHAR(255)"`
PayWay int `json:"pay_way" xorm:"not null default 1 comment('支付方式(1:支付宝 2:微信 3:余额)') TINYINT(1)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待付款 1:已付款 2:付款失败)') TINYINT(2)"`
Memo string `json:"memo" xorm:"not null default '' comment('备注') VARCHAR(255)"`
CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') DATETIME"`
UpdateAt time.Time `json:"update_at" xorm:"default CURRENT_TIMESTAMP comment('更新时间') DATETIME"`
TradeNo string `json:"trade_no" xorm:"not null default '' comment('支付平台(支付宝/微信)订单号') VARCHAR(100)"`
Type int `json:"type" xorm:"default 0 comment('0收入 1支出') INT(1)"`
OrdType string `json:"ord_type" xorm:"comment('订单类型') VARCHAR(255)"`
SubUid int `json:"sub_uid" xorm:"default 0 INT(11)"`
Fee string `json:"fee" xorm:"VARCHAR(255)"`
Ext string `json:"ext" xorm:"TEXT"`
}

Yükleniyor…
İptal
Kaydet