corn

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2019 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USERNAME = "sa"
	PASSWORD = "sqlserver_7F"
	NETWORK  = "tcp"
	SERVER   = "10.62.24.23"
	PORT     = 1433
	DATABASE = "plemis2.0_test"
	DRIVER   = "sqlserver"
)

Variables

View Source
var CornFUncMap cornFuncMap = cornFuncMap{}
View Source
var Cron *cron.Cron = cron.New()

Functions

func AddFunc

func AddFunc(c CornJob)

func AddFuncMap

func AddFuncMap(k string, i CornFunc)

func GetNoB2BOrderID

func GetNoB2BOrderID(db *sql.DB) (*[]Result, error)

func Register

func Register()

Types

type CornFunc

type CornFunc interface {
	// Spec() string
	Before() error
	Run() error
	After() error
}

type CornJob

type CornJob struct {
	JobName string
	JobSpec string
}

type NoB2BOrderID

type NoB2BOrderID struct {
}

func (NoB2BOrderID) Run

func (NoB2BOrderID) Run() (key string, value []byte, err error)

type Result

type Result struct {
	ProductName  string         `json:"productName"`
	BrandName    string         `json:"brandName"`
	OrgName      string         `json:"orgName"`
	TradeOrderId string         `json:"tradeOrderId"`
	OrderDate    string         `json:"orderDate"`
	Remark       string         `json:"remark"`
	B2bOrderId   sql.NullString `json:"b2bOrderId"`
	PurchaseQty  float32        `json:"purchaseQty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL