From 16e06252079d36be7686a3d006c8b73565973c68 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 18 十二月 2023 21:04:08 +0800
Subject: [PATCH] 全文搜索支持时间查询
---
models/move_history.go | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/models/move_history.go b/models/move_history.go
index 3bd9974..ef75cbd 100644
--- a/models/move_history.go
+++ b/models/move_history.go
@@ -2,7 +2,7 @@
import (
"fmt"
- "google.golang.org/genproto/googleapis/type/decimal"
+ "github.com/shopspring/decimal"
"gorm.io/gorm"
"wms/constvar"
"wms/pkg/mysqlx"
@@ -13,19 +13,21 @@
MoveHistory struct {
WmsModel
Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
- Number string `json:"number" gorm:"column:number;type:varchar(255)"` //鍗曞彿
- BaseOperationType constvar.BaseOperationType `json:"baseOperationType" gorm:"type:tinyint;not null;comment:鍩虹浣滀笟绫诲瀷"` //鍩虹浣滀笟绫诲瀷
- OperationTypeId int `json:"operationTypeId" gorm:"type:int;not null;comment:浣滀笟绫诲瀷id"` //浣滀笟绫诲瀷id
- OperationId int `json:"operationRecordId" gorm:"type:int;not null;comment:鎿嶄綔id"` //鎿嶄綔id
-
- ProductId int `json:"productId" gorm:"type:int;not null;comment:浜у搧id"` //浜у搧id
- ProductName string `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"` //浜у搧鍚嶇О
- Quantity decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);not null;comment:鏁伴噺"` //鏁伴噺
-
- FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d
- FromLocation Location `json:"fromLocation" gorm:"foreignKey:FromLocationId"` //婧愪綅缃�
- ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:鐩爣浣嶇疆id"` //鐩爣浣嶇疆id
- ToLocation Location `json:"toLocation" gorm:"foreignKey:ToLocationId"` //鐩爣浣嶇疆
+ Number string `json:"number" gorm:"column:number;type:varchar(255)"` //鍗曞彿
+ BaseOperationType constvar.BaseOperationType `json:"baseOperationType" gorm:"type:tinyint;not null;comment:鍩虹浣滀笟绫诲瀷"` //鍩虹浣滀笟绫诲瀷
+ OperationTypeId int `json:"operationTypeId" gorm:"type:int;not null;comment:浣滀笟绫诲瀷id"` //浣滀笟绫诲瀷id
+ OperationTypeName string `json:"operationTypeName" gorm:"type:varchar(127);not null;comment:浣滀笟绫诲瀷鍚嶇О"` //浣滀笟绫诲瀷鍚嶇О
+ OperationId int `json:"operationId" gorm:"type:int;not null;comment:鎿嶄綔id"` //鎿嶄綔id
+ ProductId string `json:"productId" gorm:"type:varchar(255);not null;comment:浜у搧id"` //浜у搧id
+ ProductName string `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"` //浜у搧鍚嶇О
+ Amount decimal.Decimal `json:"amount" gorm:"type:decimal(20,2);not null;comment:鏁伴噺"` //鏁伴噺
+ Unit string `json:"unit" gorm:"type:char(10);not null;comment:鍗曚綅"` //鍗曚綅
+ Weight decimal.Decimal `json:"weight" gorm:"type:decimal(20,2);not null;comment:閲嶉噺"` //閲嶉噺
+ FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d
+ FromLocation string `json:"fromLocation" gorm:"type:varchar(255);not null;comment:婧愪綅缃�"` //婧愪綅缃�
+ ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:鐩爣浣嶇疆id"` //鐩爣浣嶇疆id
+ ToLocation string `json:"toLocation" gorm:"type:varchar(255);not null;comment:鐩爣浣嶇疆"` //鐩爣浣嶇疆
+ Operator string `json:"operator" gorm:"type:varchar(255);not null;comment:鎿嶄綔鑰�"` //鎿嶄綔鑰�
}
MoveHistorySearch struct {
--
Gitblit v1.8.0