1
This commit is contained in:
31
business/dao/print_bind_store.go
Normal file
31
business/dao/print_bind_store.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"time"
|
||||
)
|
||||
|
||||
// QueryPrintBindStore 查询绑定门店
|
||||
func QueryPrintBindStore(printNo string) ([]*model.PrintBindStore, error) {
|
||||
var data []*model.PrintBindStore
|
||||
if err := GetRows(GetDB(), &data, `SELECT * FROM print_bind_store WHERE print_no = ?`, []interface{}{printNo}...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return data, nil
|
||||
}
|
||||
|
||||
// BindStoreList 绑定门店信息
|
||||
func BindStoreList(req *model.AddPrinterParam) error {
|
||||
param := &model.PrintBindStore{
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
StoreID: req.StoreId,
|
||||
StoreName: req.StoreName,
|
||||
StoreVendor: 9, // 绑定平台,全平台
|
||||
PrintNo: req.PrintNo,
|
||||
UserId: "system", // 所属用户
|
||||
StoreStatus: 1, // 门店开启
|
||||
BindStatus: 1, // 绑定状态
|
||||
}
|
||||
return CreateEntity(GetDB(), param)
|
||||
}
|
||||
Reference in New Issue
Block a user