1
This commit is contained in:
@@ -10,18 +10,22 @@ type AddPrintReq struct {
|
||||
}
|
||||
|
||||
type QueryPrintReq struct {
|
||||
AppID int `json:"app_id" form:"app_id" binding:"required"` // appId
|
||||
PrintNo string `json:"print_no" form:"print_no"` //打印机编号
|
||||
Name string `json:"name" form:"name"` //打印机备注,模糊
|
||||
Status int `json:"status" form:"status"` //打印机状态。正常还是缺纸
|
||||
IsOnline int `json:"is_online" form:"is_online"` //在线状态。1在线,0离线
|
||||
Offset int `json:"offset" form:"offset"` // 跳过
|
||||
PageSize int `json:"page_size" form:"page_size" binding:"required"` // 页数
|
||||
AppID int `json:"app_id" form:"app_id" binding:"required"` // appId
|
||||
PrintNo string `json:"print_no" form:"print_no"` // 打印机编号
|
||||
Name string `json:"name" form:"name"` // 打印机备注,模糊
|
||||
Status int `json:"status" form:"status"` // 打印机状态。正常还是缺纸
|
||||
IsOnline int `json:"is_online" form:"is_online"` // 在线状态。1在线,0离线
|
||||
Offset int `json:"offset" form:"offset"` // 跳过
|
||||
PageSize int `json:"page_size" form:"page_size"` // 页数
|
||||
}
|
||||
|
||||
type DeletePrintReq struct {
|
||||
AppID int `json:"app_id" form:"app_id" binding:"required"`
|
||||
PrintNos string `json:"print_nos" form:"print_nos" binding:"required"` //打印机编号s
|
||||
PrintNos string `json:"print_nos" form:"print_nos" binding:"required"` //打印机编号
|
||||
|
||||
Phone string `json:"phone" form:"phone" binding:"required"`
|
||||
Code string `json:"code" form:"code" binding:"required"`
|
||||
BizId string `json:"biz_id" form:"biz_id" binding:"required"`
|
||||
}
|
||||
|
||||
type UpdatePrintReq struct {
|
||||
@@ -48,3 +52,11 @@ type GetPrintMsg struct {
|
||||
Offset int `json:"offset" form:"offset"`
|
||||
PageSize int `json:"page_size" form:"page_size" binding:"required"`
|
||||
}
|
||||
|
||||
type GetPrintIsUse struct {
|
||||
PrintNo string `json:"print_no" form:"print_no" binding:"required"` //打印机编号
|
||||
}
|
||||
|
||||
type QueryPrintBill struct {
|
||||
PrintNo string `json:"print_no" form:"print_no" binding:"required"` //打印机编号
|
||||
}
|
||||
|
||||
10
model/app_model/print_activation.go
Normal file
10
model/app_model/print_activation.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package app_model
|
||||
|
||||
import "time"
|
||||
|
||||
// PrintActivation 打印机激活记录
|
||||
type PrintActivation struct {
|
||||
ID int `orm:"column(id)" json:"id" db:"id"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号
|
||||
}
|
||||
13
model/app_model/print_bill.go
Normal file
13
model/app_model/print_bill.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package app_model
|
||||
|
||||
import "time"
|
||||
|
||||
// PrintBill 打印机账户
|
||||
type PrintBill struct {
|
||||
ID int `orm:"column(id)" json:"id" db:"id"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||||
PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号
|
||||
PrintBalance int64 `orm:"type(int);size(16)" json:"print_balance" db:"print_balance"` // 账户余额
|
||||
UserId string `orm:"type(varchar);size(125)" json:"user_id" db:"user_id"` // 打印机所属用户
|
||||
}
|
||||
47
model/app_model/print_bill_pay.go
Normal file
47
model/app_model/print_bill_pay.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package app_model
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
// PayTypeWX PayType 支付类型
|
||||
PayTypeWX = 1 // 微信支付
|
||||
PayTypeTL = 2 // 通联宝支付
|
||||
|
||||
// PayStatusNo Status 状态值
|
||||
PayStatusNo = 0
|
||||
PayStatusYes = 1
|
||||
PayStatusFailed = 2
|
||||
PayStatusCanceled = 3
|
||||
PayStatusRefund = 4
|
||||
|
||||
PayBody = "京西云打印机余额充值"
|
||||
OrderPayVendorId = 1 // 京西平台
|
||||
)
|
||||
|
||||
type OrderPay struct {
|
||||
ID int `orm:"column(id)" json:"id" db:"id"`
|
||||
CreatedAt time.Time `orm:"type(datetime)" json:"created_at" db:"created_at"` // 创建时间
|
||||
UpdatedAt time.Time `orm:"type(datetime)" json:"updated_at" db:"updated_at"` // 更新时间
|
||||
PayOrderID string `orm:"column(pay_order_id);size(48)" json:"pay_order_id" db:"pay_order_id"` // 京西支付定单号
|
||||
PayType int `orm:"type(int);size(2)" json:"pay_type" db:"pay_type"` // 支付类型[1-微信,2-通联,3-抖音]
|
||||
VendorPayType string `orm:"size(48)" json:"vendorPayType"` //
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48);index" json:"vendor_order_id" db:"vendor_order_id"` // 支付对应的购物订单号
|
||||
PrintNo string `orm:"column(print_no);size(48);index" json:"print_no" db:"print_no"` // 充值打印机编号
|
||||
Status int `orm:"type(int);size(2)" json:"status" json:"status" db:"status"` // 订单支付状态
|
||||
PayCreatedAt time.Time `orm:"type(datetime);index" json:"pay_created_at" db:"pay_created_at"` // 下单时间
|
||||
PayFinishedAt time.Time `orm:"type(datetime)" json:"pay_finished_at" db:"pay_finished_at"` // 支付完成时间
|
||||
TotalFee int `orm:"type(int);size(11)" json:"total_fee" db:"total_fee"` // 支付金额
|
||||
PrepayID string `orm:"column(prepay_id);index;size(48)" json:"prepay_id" db:"prepay_id"` // 下单后,支付前,支付方生成的事务ID
|
||||
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transaction_id" db:"transaction_id"` // 支付成功后,支付方生成的事务ID
|
||||
OriginalData string `orm:"type(text)" json:"-"` // 返回消息
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendor_id" db:"vendor_id"` // 购物订单所属厂商代码(当前只有京西)
|
||||
CodeURL string `orm:"column(code_url);size(3200)" json:"codeURL"` //
|
||||
}
|
||||
|
||||
type PayOrder struct {
|
||||
SubAppID string `json:"sub_app_id" form:"sub_app_id" binding:"required"` // appID
|
||||
PayType int `json:"pay_type" form:"pay_type" binding:"required"` // 支付类型
|
||||
VendorPayType string `json:"vendor_pay_type" form:"vendor_pay_type" binding:"required"` // 平台支付类型
|
||||
TotalFee int `json:"total_fee" form:"total_fee" binding:"required"` // 支付金额
|
||||
PrintNo string `json:"print_no" form:"print_no" binding:"required"` // 打印机编号
|
||||
}
|
||||
15
model/app_model/print_bill_record.go
Normal file
15
model/app_model/print_bill_record.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package app_model
|
||||
|
||||
import "time"
|
||||
|
||||
// PrintBillRecord 打印机充值/小费记录
|
||||
type PrintBillRecord struct {
|
||||
ID int `orm:"column(id)" json:"id" db:"id"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||||
PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号
|
||||
PayType int `orm:"type(int);size(2)" json:"pay_type" db:"pay_type"` // 支付类型[1-充值/2-支出]
|
||||
PayMoney int `orm:"type(int);size(10)" json:"pay_money" db:"pay_money"` // 金额
|
||||
OrderId string `orm:"type(varchar);size(64);index" json:"order_id" db:"order_id"` // 订单号
|
||||
UserId string `orm:"type(varchar);size(125)" json:"user_id" db:"user_id"` // 打印机所属用户
|
||||
}
|
||||
43
model/app_model/print_bind_store.go
Normal file
43
model/app_model/print_bind_store.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package app_model
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
StoreStatusDisabled = -2 // 禁用
|
||||
StoreStatusClosed = -1 // 休息
|
||||
StoreStatusHaveRest = 0 // 临时休息
|
||||
StoreStatusOpened = 1 // 营业
|
||||
StoreStatusLose = -9 // 丢失授权
|
||||
|
||||
StoreBindPrintSuccess = 1 // 绑定成功
|
||||
StoreBindPrintFail = 2 // 解除绑定
|
||||
)
|
||||
|
||||
type PrintBindStore struct {
|
||||
ID int `orm:"column(id)" json:"id" db:"id"`
|
||||
CreatedAt time.Time `orm:"type(datetime)" json:"created_at" db:"created_at"` // 创建时间
|
||||
UpdatedAt time.Time `orm:"type(datetime)" json:"updated_at" db:"updated_at"` // 更新时间
|
||||
StoreID int64 `orm:"column(store_id);type(int);size(11)" json:"store_id" db:"store_id"` // 门店id(为京西创建门店id)唯一
|
||||
StoreName string `orm:"type(varchar);size(255)" json:"store_name" db:"store_name"` // 门店名称
|
||||
StoreVendor int `orm:"type(int);size(2)" json:"store_vendor" db:"store_vendor"` // 门店平台
|
||||
PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号
|
||||
UserId string `orm:"type(varchar);size(125)" json:"user_id" db:"user_id"` // 打印机所属用户
|
||||
StoreStatus int `orm:"type(int);size(2)" json:"store_status" db:"store_status"` // 门店状态
|
||||
BindStatus int `orm:"type(int);size(2)" json:"bind_status" db:"bind_status"` // 绑定状态
|
||||
}
|
||||
|
||||
// AddBindStore 添加门店授权
|
||||
type AddBindStore struct {
|
||||
StoreID int64 `json:"store_id" form:"store_id" binding:"required"` // 门店id(为京西创建门店id)
|
||||
StoreName string `json:"store_name" form:"store_name" binding:"required"` // 门店名称
|
||||
StoreVendor int `json:"store_vendor" form:"store_vendor" binding:"required"` // 门店平台
|
||||
PrintNo string `json:"print_no" form:"print_no" binding:"required"` // 打印机编号
|
||||
StoreStatus int `json:"store_status" form:"store_status" db:"store_status"` // 门店状态
|
||||
}
|
||||
|
||||
// RelieveStore 解除门店授权
|
||||
type RelieveStore struct {
|
||||
UserId string `orm:"type(varchar);size(125)" json:"user_id" db:"user_id"` // 打印机所属用户
|
||||
StoreID int64 `json:"store_id" form:"store_id" binding:"required"` // 门店id(为京西创建门店id)
|
||||
PrintNo string `json:"print_no" form:"print_no" binding:"required"` // 打印机编号
|
||||
}
|
||||
@@ -20,18 +20,18 @@ type PrintSetting struct {
|
||||
}
|
||||
|
||||
type PrintSettingObj struct {
|
||||
ID int
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
DeletedAt time.Time
|
||||
PrintNo string // 打印机编号
|
||||
CallNameSetting int // 称谓设置 [64-默认老板]
|
||||
SystemVoice int // 平台语音开关[1打开]
|
||||
PrintVoiceSetting *PrintVoice // 打印机提示语音设置
|
||||
OrderVoiceSetting *OrderVoice // 订单提示设置
|
||||
RiderVoiceSetting *RiderVoice // 骑手动态提示设置
|
||||
CustomerVoiceSetting *CustomerReceivingGoods // 客户收货提示设置
|
||||
PickingSetting *ShopPickingVoice // 拣货语音设置
|
||||
ID int `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt time.Time `json:"deleted_at"`
|
||||
PrintNo string `json:"print_no"` // 打印机编号
|
||||
CallNameSetting int `json:"call_name_setting"` // 称谓设置 [64-默认老板]
|
||||
SystemVoice int `json:"system_voice"` // 平台语音开关[1打开]
|
||||
PrintVoiceSetting *PrintVoice `json:"print_voice_setting"` // 打印机提示语音设置
|
||||
OrderVoiceSetting *OrderVoice `json:"order_voice_setting"` // 订单提示设置
|
||||
RiderVoiceSetting *RiderVoice `json:"rider_voice_setting"` // 骑手动态提示设置
|
||||
CustomerVoiceSetting *CustomerReceivingGoods `json:"customer_voice_setting"` // 客户收货提示设置
|
||||
PickingSetting *ShopPickingVoice `json:"picking_setting"` // 拣货语音设置
|
||||
}
|
||||
|
||||
// PrintVoice 打印机提示语音设置
|
||||
@@ -93,3 +93,8 @@ type UpdatePrintSetting struct {
|
||||
CustomerVoiceSetting string `json:"customer_voice_setting" form:"customer_voice_setting"`
|
||||
PickingSetting string `json:"picking_setting" form:"picking_setting"`
|
||||
}
|
||||
|
||||
// GetPrintSetting 获取当前打印机设置
|
||||
type GetPrintSetting struct {
|
||||
PrintNo string `json:"print_no" form:"print_no"` // 打印机编号
|
||||
}
|
||||
|
||||
@@ -12,3 +12,8 @@ func TestPrintOrder(t *testing.T) {
|
||||
dd := strings.Replace(cc, "\n", "", -1)
|
||||
fmt.Println(dd)
|
||||
}
|
||||
|
||||
func TestIsNil(t *testing.T) {
|
||||
var data *PrintBindStore
|
||||
fmt.Println(data == nil)
|
||||
}
|
||||
|
||||
@@ -21,33 +21,42 @@ type SystemTemp struct {
|
||||
UpdatedAt *time.Time `json:"updated_at" db:"updated_at"`
|
||||
LastOperator string `json:"last_operator" db:"last_operator"`
|
||||
DeletedAt *time.Time `json:"deleted_at" db:"deleted_at"`
|
||||
TempName string `json:"temp_name" db:"temp_name"` // 模板名称
|
||||
TempRank string `json:"temp_rank" db:"temp_rank"` // 模板顺序
|
||||
Temp string `json:"temp" db:"temp"` // 模板
|
||||
UserId string `json:"user_id" db:"user_id"` // 所属用户
|
||||
TempType string `json:"temp_type" db:"temp_type"` // 模板类型
|
||||
TempSize string `json:"temp_size" db:"temp_size"` // 模板尺寸 big/medium/small
|
||||
PrintSn string `json:"print_sn" db:"print_sn"` // 模板所属打印机
|
||||
IsUse int `json:"is_use" db:"is_use"` // 默认使用 1-使用/2-不使用
|
||||
TempName string `json:"temp_name" db:"temp_name"` // 模板名称
|
||||
TempRank string `json:"temp_rank" db:"temp_rank"` // 模板顺序
|
||||
Temp string `json:"temp" db:"temp"` // 模板
|
||||
UserId string `json:"user_id" db:"user_id"` // 所属用户
|
||||
TempType string `json:"temp_type" db:"temp_type"` // 模板类型 user_store/user_consumer
|
||||
TempSize string `json:"temp_size" db:"temp_size"` // 模板尺寸 big/medium/small
|
||||
PrintSn string `json:"print_sn" db:"print_sn"` // 模板所属打印机
|
||||
IsUse int `json:"is_use" db:"is_use"` // 默认使用 1-使用/2-不使用
|
||||
Properties string `json:"properties" db:"properties"` // 模板字段属性
|
||||
}
|
||||
|
||||
type AddTemp struct {
|
||||
ID int `json:"id" form:"id"` // 修改时传入
|
||||
TempName string `json:"temp_name" form:"temp_name" binding:"required"` // 模板名称
|
||||
Temp string `json:"temp" form:"temp" binding:"required"` // 模板
|
||||
UserId string `json:"user_id" form:"user_id"` // 所属用户
|
||||
TempType string `json:"temp_type" form:"temp_type" binding:"required"` // 模板类型
|
||||
TempSize string `json:"temp_size" form:"temp_size" binding:"required"` // 模板尺寸 big/medium/small
|
||||
PrintSn string `json:"print_sn" db:"print_sn" binding:"required"` // 模板所属打印机
|
||||
IsUse int `json:"is_use" db:"is_use" binding:"required"` // 默认使用 1-使用/2-不使用
|
||||
CreatedAt *time.Time `json:"created_at" form:"created_at"`
|
||||
ID int `json:"id" form:"id"` // 修改时传入
|
||||
TempName string `json:"temp_name" form:"temp_name" binding:"required"` // 模板名称
|
||||
Temp string `json:"temp" form:"temp" binding:"required"` // 模板
|
||||
UserId string `json:"user_id" form:"user_id"` // 所属用户
|
||||
TempType string `json:"temp_type" form:"temp_type" binding:"required"` // 模板类型
|
||||
TempRank string `json:"temp_rank" form:"temp_rank" binding:"required"` // 模板顺序
|
||||
TempSize string `json:"temp_size" form:"temp_size" binding:"required"` // 模板尺寸 big/medium/small
|
||||
PrintSn string `json:"print_sn" form:"print_sn" binding:"required"` // 模板所属打印机
|
||||
IsUse int `json:"is_use" form:"is_use" binding:"required"` // 默认使用 1-使用/2-不使用
|
||||
Properties string `json:"properties" form:"properties" binding:"required"` // 模板字段属性
|
||||
}
|
||||
|
||||
type TempContext struct {
|
||||
Rank int `json:"rank"` // 排序值 1
|
||||
DefinitionName string `json:"definition_name"` // 用户定义字段名称 下单时间
|
||||
MatchContext string `json:"match_context"` // 匹配字段 payOrderTime
|
||||
Rank string `json:"rank"` // 排序值 1
|
||||
MatchContext string `json:"match_context"` // 匹配字段 payOrderTime
|
||||
}
|
||||
|
||||
type DeleteTemp struct {
|
||||
ID int `json:"id" form:"id"` // 修改时传入
|
||||
ID int `json:"id" form:"id"` // 修改时传入
|
||||
PrintSn string `json:"print_sn" form:"print_sn"` // 模板所属打印机
|
||||
}
|
||||
|
||||
type QueryUserTemp struct {
|
||||
UserId string `json:"user_id" form:"user_id"` // 所属用户
|
||||
PrintSn string `json:"print_sn" form:"print_sn"` // 模板所属打印机
|
||||
}
|
||||
|
||||
11
model/app_model/wechat_pay.go
Normal file
11
model/app_model/wechat_pay.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package app_model
|
||||
|
||||
type GetPrinterReportResult struct {
|
||||
WeekPrintCount int `json:"week_print_count"`
|
||||
DayPrintCount int `json:"day_print_count"`
|
||||
DayUnPrintCount int `json:"day_un_print_count"`
|
||||
OnlinePrinterCount int `json:"online_printer_count"`
|
||||
OfflinePrinterCount int `json:"offline_printer_count"`
|
||||
FlowPrinterCount int `json:"flow_printer_count"`
|
||||
PaperPrinterCount int `json:"paper_printer_count"`
|
||||
}
|
||||
@@ -303,3 +303,36 @@ type AutoGenerated struct {
|
||||
AppID string `json:"appId"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type Jxc4UserData struct {
|
||||
UserID string `json:"userID"`
|
||||
UserID2 string `json:"userID2"`
|
||||
Mobile string `json:"mobile"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
Avatar string `json:"avatar"`
|
||||
AuthBindInfo struct {
|
||||
ID int `json:"id"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
LastOperator string `json:"lastOperator"`
|
||||
DeletedAt time.Time `json:"deletedAt"`
|
||||
AuthID string `json:"authID"`
|
||||
BindType int `json:"bindType"`
|
||||
Type string `json:"type"`
|
||||
TypeID string `json:"typeID"`
|
||||
UserID string `json:"userID"`
|
||||
Status int `json:"status"`
|
||||
AuthID2 string `json:"authID2"`
|
||||
Remark string `json:"remark"`
|
||||
DetailData string `json:"detailData"`
|
||||
UserData interface{} `json:"userData"`
|
||||
UserHint interface{} `json:"userHint"`
|
||||
} `json:"authBindInfo"`
|
||||
LoginTime time.Time `json:"loginTime"`
|
||||
ExpiresAt int `json:"expiresAt"`
|
||||
Token string `json:"token"`
|
||||
TokenType int `json:"tokenType"`
|
||||
IsExistOpenID bool `json:"isExistOpenID"`
|
||||
AppID string `json:"appId"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user