物流笑嘻嘻
This commit is contained in:
14
business/model/dao/user_delivery_address.go
Normal file
14
business/model/dao/user_delivery_address.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
func GetAddressDetail(id int) (*model.UserDeliveryAddress, error) {
|
||||
param := &model.UserDeliveryAddress{}
|
||||
param.ModelIDCULD.ID = id
|
||||
if err := GetEntity(GetDB(), param, "ID"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return param, nil
|
||||
}
|
||||
@@ -58,7 +58,7 @@ type Order struct {
|
||||
Type int `json:"type"` // 支付还是提现
|
||||
OrderType int `json:"orderType"` // 订单类型,1为发任务,2为冲会员,3为发快递
|
||||
Way string `json:"way"` //weixinapp ,weixinmini
|
||||
Status int `json:"status"` //订单状态,待支付2,已支付5,支付成功110,支付失败115
|
||||
Status int `json:"status"` //订单状态,待支付2,已支付5,支付成功110,支付失败115,150取消
|
||||
PayPrice int `json:"payPrice"` //支付金额
|
||||
TransactionID string `orm:"column(transaction_id);size(48)" json:"transactionID"` // 支付成功后,支付方生成的事务ID
|
||||
PayFinishedAt time.Time `orm:"type(datetime);null" json:"payFinishedAt"` // 支付完成时间
|
||||
|
||||
22
business/model/order_pay_refund.go
Normal file
22
business/model/order_pay_refund.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type OrderPayRefund struct {
|
||||
ModelIDCULD
|
||||
RefundID string `orm:"column(refund_id);unique;size(48)" json:"refundID"` // 三方运单Id
|
||||
VendorRefundID string `orm:"column(vendor_refund_id);unique;size(48)" json:"vendorRefundID"` // 支付方退款成功后生成的退款单号
|
||||
VendorOrderID string `orm:"column(vendor_order_id);index;size(48)" json:"vendorOrderID"`
|
||||
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"` // 支付成功后,支付方生成的事务ID
|
||||
Status int `json:"status"`
|
||||
RefundCreatedAt time.Time `orm:"type(datetime);index" json:"payCreatedAt"`
|
||||
RefundFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
|
||||
RefundFee int `json:"refundFee"`
|
||||
OriginalData string `orm:"type(text)" json:"-"`
|
||||
}
|
||||
|
||||
func (v *OrderPayRefund) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"ID"},
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type UserVendorOrder struct {
|
||||
ModelIDCUL
|
||||
@@ -30,11 +32,20 @@ type UserVendorOrder struct {
|
||||
Bulk float64 `orm:"column(bulk)" json:"bulk"` // 体积抛比系数
|
||||
Increment float64 `orm:"column(increment)" json:"increment"` // 增值(物流)
|
||||
ChannelType int `orm:"size(8);column(channel_type)" json:"channelType"` // 渠道类型(1-快递,2-物流,3-国际物流,4-整车)
|
||||
OrderStatus int `orm:"size(8);column(order_status)" json:"orderType"` // 订单状态(2-待支付,3-支付失败,4-支付成功,5-取件,6-配送,25-取消)
|
||||
OrderStatus int `orm:"size(8);column(order_status)" json:"orderType"` // 订单状态(2-待支付,3-支付失败,4-支付成功,5-待取件,6-配送,110-完成,150-取消)
|
||||
Img string `orm:"column(img)" json:"img"` // 包裹图片
|
||||
IsForward int `orm:"column(is_forward)" json:"isForward"` // 1否,2是 转寄单
|
||||
}
|
||||
|
||||
const (
|
||||
OrderStatusWaitPay = 2 // 待支付
|
||||
OrderStatusFailPay = 3 // 支付失败
|
||||
OrderStatusSuccessPay = 4 // 支付成功
|
||||
OrderStatusWaitPickup = 5 // 待取件
|
||||
OrderStatusCancel = 150 // 取消订单
|
||||
// 。。。。。
|
||||
)
|
||||
|
||||
func (*UserVendorOrder) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"LocalWayBill"},
|
||||
@@ -42,11 +53,11 @@ func (*UserVendorOrder) TableUnique() [][]string {
|
||||
}
|
||||
}
|
||||
|
||||
//func (*UserVendorOrder) TableIndex()[][]string {
|
||||
// return [][]string{
|
||||
// []string{""},
|
||||
// }
|
||||
//}
|
||||
func (*UserVendorOrder) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"CreatedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
// MakeOrderParamReq 下订单请求参数
|
||||
type MakeOrderParamReq struct {
|
||||
@@ -98,3 +109,24 @@ type UserOrderList struct {
|
||||
SenderAddress string `orm:"column(sender_address)" json:"senderAddress"` // 发货城市
|
||||
ReceiveAddress string `orm:"column(receive_address)" json:"receiveAddress"` // 收货城市
|
||||
}
|
||||
|
||||
// OrderListRes 查询订单列表
|
||||
type OrderListRes struct {
|
||||
UserVendorOrder
|
||||
UserName string `orm:"column(user_name)" json:"userName"` // 系统用户
|
||||
SendUserName string `orm:"column(send_user_name)" json:"sendUserName"` // 发货人
|
||||
ReceiveUserName string `orm:"column(receive_user_name)" json:"receiveUserName"` // 收货人
|
||||
SenderAddress string `orm:"column(sender_address)" json:"senderAddress"` // 发货城市
|
||||
ReceiveAddress string `orm:"column(receive_address)" json:"receiveAddress"` // 收货城市
|
||||
}
|
||||
|
||||
// OrderListReq 请求参数
|
||||
type OrderListReq struct {
|
||||
ExpressType int `json:"expressType"` // 快递公司
|
||||
OrderNo string `json:"orderNo"` // 订单Id
|
||||
OrderStatus int `json:"orderStatus"` // 订单状态
|
||||
PageNum int `json:"pageNum"` // 页码
|
||||
PageSize int `json:"pageSize"` // 页数
|
||||
StartTime time.Time `json:"startTime"` // 开始时间
|
||||
EndTime time.Time `json:"endTime"` // 结束时间
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user