models

package
v0.0.0-...-c4624cd Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

@Time : 2019-09-02 15:25 @Author : Frank @Email : [email protected] @File : models.go @Software: GoLand

Index

Constants

This section is empty.

Variables

View Source
var (
	Objects map[string]*Object
)
View Source
var (
	UserList map[string]*User
)

Functions

func AddOne

func AddOne(object Object) (ObjectId string)

func AddUser

func AddUser(u User) string

func CompareFileList

func CompareFileList(newV, oldV interface{}) (fileList []string)

func CompareIntList

func CompareIntList(newV, oldV interface{}) (oldInvoice []int)

func Delete

func Delete(ObjectId string)

func DeleteUser

func DeleteUser(uid string)

func GetAll

func GetAll() map[string]*Object

func GetAllUsers

func GetAllUsers() map[string]*User

func GetAttrValueName

func GetAttrValueName(normal interface{}) (attrValue []string, err error)

根据属性id,获取属性值展示

func GetCatInfo

func GetCatInfo(quote *SpSellerQuotedBuyer) ([]string, error)

func GetCatName

func GetCatName(a interface{}, data *[]string)

func GetOneCat

func GetOneCat(cat_id int) (data interface{}, err error, msg string)

func Login

func Login(username, password string) bool

func TimeStampToLocalString

func TimeStampToLocalString(t int64) string

func Update

func Update(ObjectId string, Score int64) (err error)

Types

type BackstageEdit

type BackstageEdit struct {
	ExpressDesc         string `orm:"column(express_desc)" description:"运费说明"`
	PackingRequirements string `orm:"column(packing_requirements)" description:"包装要求"`
	OtherSupports       string `orm:"column(other_supports)" description:"其它服务"`
}

type ChangeOwnerReq

type ChangeOwnerReq struct {
	QuoteId       int `valid:"Required"`
	ReceiveUserId int `valid:"Required"`
	OperatorId    int `valid:"Required"`
}

@Title change purchase owner

type ChangeQuoteOrderStatusReq

type ChangeQuoteOrderStatusReq struct {
	Id      int `valid:"Required"`
	Status  int `valid:"Required"`
	BuyerId int `valid:"Required"`
}

修改采购单状态

type CompanyPrintEditDetailResp

type CompanyPrintEditDetailResp struct {
	QuoteCommon
	History map[string]interface{}
	User    interface{}
}

type CreateAndUpdateTime

type CreateAndUpdateTime struct {
	CreateTime int64 `orm:"column(create_time);null" description:"采购单创建时间"`
	UpdateTime int64 `orm:"column(update_time);null" description:"采购单更新时间"`
}

type EditDetailResp

type EditDetailResp struct {
	Template TmpPurchaseCategory `json:"Template"`
	Purchase QuoteCommon         `json:"Purchase"`
	CatList  []string
	AttrName []string
	History  map[string]interface{}
	User     interface{}
}

获取采购单编辑详情

type ExchangeDetailResp

type ExchangeDetailResp struct {
	QuoteCommon
	QuoteCount   int
	MobileNumber string
	AttrName     []string
	BuyerId      int
	CatList      []string
	User         interface{}

	QuotedEndTimes   string
	DeliveryEndTimes string
	CreateTimes      string
}

type ExchangeListResp

type ExchangeListResp struct {
	Id               int
	QuoteId          int
	PurchaseSn       string
	PurchaseType     int
	GoodsQty         int
	QuotedEndTimes   string
	DeliveryEndTimes string
	ExchangeTimes    string
	CatName          string
	OperatorId       int
	User             interface{}
	OriginalUser     interface{}
}

type HistorySellerQuoted

type HistorySellerQuoted struct {
	Id           int                  `orm:"column(history_quoted_id);auto"`
	SellerQuoted *SpSellerQuoted      `orm:"rel(fk);" description:"商家报价单"`
	Quoted       *SpSellerQuotedBuyer `orm:"rel(fk);" description:"用户报价id"`
	ShopId       int                  `orm:"column(shop_id)" description:"店铺id"`
	UnitPrice    float64              `orm:"column(unit_price);digits(10);decimals(3)" description:"单价"`
	TotalPrice   float64              `orm:"column(total_price);digits(10);decimals(2)" description:"总价"`
	Remark       string               `orm:"column(remark);null" description:"备注"`
	File         string               `orm:"column(file);size(128)" description:"上传文件"`
	FileName     string               `orm:"column(file_name);size(128)" description:"文件名"`
	Status       int8                 `orm:"column(status)" description:"状态0已报价,1抢单成功,2抢单失败"`
	QuotedTime   int                  `json:"quoted_time" orm:"column(quoted_time)" description:"报价时间"`
}

func (*HistorySellerQuoted) TableName

func (t *HistorySellerQuoted) TableName() string

type M

type M struct {
	Map map[string]interface{}
	// contains filtered or unexported fields
}

M

func (*M) Set

func (m *M) Set(key string, value interface{})

Set ...

type Object

type Object struct {
	ObjectId   string
	Score      int64
	PlayerName string
}

func GetOne

func GetOne(ObjectId string) (object *Object, err error)

type OperationListResp

type OperationListResp struct {
	Id               int
	PurchaseSn       string
	BuyerId          int
	PurchaseType     int
	GoodsQty         int
	QuoteCount       int
	Status           int
	OrderSn          string
	QuotedEndTimes   string
	DeliveryEndTimes string
	CreateTimes      string
	FixtureDates     string
	CatName          string
	User             interface{}
}

type Profile

type Profile struct {
	Gender  string
	Age     int
	Address string
	Email   string
}

type PurchaseAuditReq

type PurchaseAuditReq struct {
	AuditStatus  int `valid:"Required"`
	PurchaseId   int `valid:"Required"`
	AuditMessage string
}

修改采购单审核状态

type PurchaseListNumResp

type PurchaseListNumResp struct {
	Invalid   int64
	Available int64
	Traded    int64
}

type PurchaseOrder

type PurchaseOrder struct {
	SuccessSellerId int    `orm:"column(success_seller_id);null" description:"成交的商家报价id"`
	FixtureDate     int64  `orm:"column(fixture_date)" description:"成交日期"`
	OrderSn         string `orm:"column(order_sn);null" description:"订单号"`
}

type QuoteCommon

type QuoteCommon struct {
	QuoteResp
	TransCommon
}

type QuoteDetail

type QuoteDetail struct {
	QuoteCommon
	PurchaseOrder
	Status       int
	QuoteCount   int
	MobileNumber string
	AttrName     []string
	BuyerId      int
	CatList      []string
	User         interface{}

	QuotedEndTimes   string
	DeliveryEndTimes string
	CreateTimes      string
	FixtureDates     string
	PurchaseStatus   int
}

@Title 查询采购单详情

func GetPurchaseDetail

func GetPurchaseDetail(quoteId, quoteType int) (data QuoteDetail, err error)

type QuoteReq

type QuoteReq struct {
	Template Template    `json:"Template"`
	Purchase QuoteCommon `json:"Purchase"`
	BuyerId  int         `json:"BuyerId"`
}

创建采购单

func (*QuoteReq) PurchasePreSave

func (q *QuoteReq) PurchasePreSave(now int64) (err error)

type QuoteResp

type QuoteResp struct {
	PurchaseSn       string  `orm:"column(purchase_sn);size(128)" description:"采购编号"`
	City             string  `orm:"column(city);size(255);null" description:"采购城市"`
	GoodsName        string  `orm:"column(goods_name);size(255);null" description:"采购商品"`
	GoodsQty         int     `orm:"column(goods_qty)" valid:"Required" description:"采购总数量"`
	QuotedEndTime    int64   `orm:"column(quoted_end_time);null" valid:"Required" description:"报价截止"`
	DeliveryEndTime  int64   `orm:"column(delivery_end_time);null" valid:"Required" description:"交货日期"`
	DetailsDesc      string  `orm:"column(details_desc);size(255);null" description:"详情描述"`
	Code             string  `orm:"column(code);size(255);null" description:"物料编码"`
	MaterielName     string  `orm:"column(materiel_name);size(255);null" description:"物料名称"`
	NormsRequirement string  `orm:"column(norms_requirement);size(255);null" description:"规格要求(产品类别)"`
	GoodsPicture     string  `orm:"column(goods_picture)" description:"商品图片"`
	Documents        string  `orm:"column(documents)" valid:"Required" description:"印刷文件"`
	SpecialNote      string  `orm:"column(special_note);size(255);null" description:"特别说明"`
	Price            float64 `orm:"column(price);null;digits(10);decimals(3)" description:"报价"`
	Remark           string  `orm:"column(remark);size(512);null" description:"备注"`
	MobileNumber     string  `orm:"column(mobile_number);size(20);null" valid:"Required" json:"-" description:"手机号"`
	Include          string  `orm:"column(include);size(128);null" description:"报价包含0含税,1含运费,2含打样"`
	AddressId        int     `orm:"column(address_id);null" valid:"Required" description:"地址id"`
	PurchaseList     string  `orm:"column(purchase_list);size(128)" description:"采购清单"`
	PurchaseType     int     `orm:"column(purchase_type)" description:"采购单类型 1 单商品  2 多商品 3 企业购"`
	AuditMessage     string  `orm:"column(audit_message);null" description:"审核未通过原因"`
	Unit             string  `orm:"column(unit);null" description:"商品单位"`
	AddressInfo      string  `orm:"column(address_info);null" description:"地址信息"`
	Invoice          int     `orm:"column(invoice)" description:"是否需要发票0不需要,1普通,2增值税"`
	QQ               string  `orm:"column(qq)" description:"用户qq"`
	PurchaseListDesc string  `orm:"column(purchase_list_desc)" description:"企业印采购清单描述"`
	BackstageEdit
}

func (*QuoteResp) TransWithSave

func (quoteResp *QuoteResp) TransWithSave(quoteResp1 TransCommon)

type QuoteRespList

type QuoteRespList struct {
	Id int `json:"Id"`
	QuoteCommon
}

采购单列表返回

type SpCatLinkAttr

type SpCatLinkAttr struct {
	Id        int                 `orm:"column(id);auto"`
	Cat       *SpPurchaseCategory `valid:"Required" orm:"rel(fk);column(cat_id)" description:"分类id"`
	Attr      *SpPurchaseAttr     `valid:"Required" orm:"rel(fk);column(attr_id)" description:"属性id"`
	Sort      int                 `orm:"column(sort)"`
	IsMust    int                 `orm:"column(is_must)" description:"是否必填 0 不是 1是"`
	IsDeleted int8                `orm:"column(is_deleted)" description:"是否删除 0 不是 1是"`
}

func (*SpCatLinkAttr) TableName

func (t *SpCatLinkAttr) TableName() string

type SpExchangePurchaseLog

type SpExchangePurchaseLog struct {
	QuoteResp
	Id         int                  `orm:"column(log_id);auto"`
	TmpCatId   *TmpPurchaseCategory `orm:"column(tmp_cat_id);null;rel(fk)" json:"-" description:"tmp表分类模板id"`
	BuyerId    int                  `orm:"column(buyer_id)" valid:"Required" description:"原采购单买家id"`
	QuoteId    int                  `orm:"column(quote_id)" valid:"Required" description:"采购单id"`
	OperatorId int                  `orm:"column(operator_id)" valid:"Required" description:"转单操作人id"`
	CreateAndUpdateTime
	ExchangeTime   int64 `orm:"column(exchange_time);null" description:"转单时间"`
	OriginalUserId int   `orm:"column(original_buyer_id)" valid:"Required" description:"接受转单买家id"`
}

func (*SpExchangePurchaseLog) GetDetail

func (s *SpExchangePurchaseLog) GetDetail() (data ExchangeDetailResp, err error)

func (*SpExchangePurchaseLog) TableName

func (t *SpExchangePurchaseLog) TableName() string

type SpPurchaseAttr

type SpPurchaseAttr struct {
	Id            int                    `json:"id" orm:"column(attr_id);auto"`
	AttrName      string                 `json:"attr_name" orm:"column(attr_name);size(255)" description:"属性名称"`
	AttrAliasName string                 `json:"attr_alias_name" orm:"column(attr_alias_name);size(255)" description:"属性别名"`
	AttrType      int8                   `json:"attr_type" orm:"column(attr_type)" description:"属性类型 0.名片,1.装订,2.海报"`
	AttrStatus    int8                   `json:"attr_status" orm:"column(attr_status)" description:"属性状态 0.启用,1.停用"`
	AddUserId     int                    `json:"add_user_id" orm:"column(add_user_id)" description:"添加人id"`
	Remark        string                 `json:"remark" orm:"column(remark);size(255);null" description:"备注"`
	UpdateTime    int                    `json:"update_time" orm:"column(update_time)" description:"修改时间"`
	CreateTime    int                    `json:"create_time" orm:"column(create_time)" description:"新建时间"`
	Desc          int                    `json:"desc" orm:"column(desc)" description:"排序"`
	IsDeleted     int8                   `json:"is_deleted" orm:"column(is_deleted)" description:"0:未删除      1:已删除"`
	IsLimitUser   int8                   `json:"is_limit_user" orm:"column(is_limit_user)" description:"是否允许用户自定义0不允许1允许"`
	ShopId        int                    `json:"shop_id" orm:"column(shop_id)" description:"店铺id"`
	Category      []*SpPurchaseCategory  `orm:"reverse(many)"`
	AttrValue     []*SpPurchaseAttrValue `orm:"reverse(many)"`
}

func (*SpPurchaseAttr) TableName

func (t *SpPurchaseAttr) TableName() string

type SpPurchaseAttrValue

type SpPurchaseAttrValue struct {
	Id         int             `orm:"column(attr_value_id);auto"`
	AttrValue  string          `orm:"column(attr_value);size(255)" description:"属性值"`
	UnitTypeId int8            `orm:"column(unit_type_id)" description:"单位:0mm,1米,2吋"`
	Sort       int32           `orm:"column(sort)" description:"排序"`
	Customize  int             `orm:"column(customize)" description:"是否自定义属性值"`
	Remark     string          `orm:"column(remark);size(128)" description:"备注"`
	CreateTime int             `orm:"column(create_time)" description:"创建时间"`
	UpdateTime int             `orm:"column(update_time)" description:"更新时间"`
	IsDeleted  int             `orm:"column(is_deleted)" description:"0:未删除 1:已删除"`
	Attr       *SpPurchaseAttr `valid:"Required" orm:"rel(fk);column(attr_id)" description:"属性id"`
}

func (*SpPurchaseAttrValue) TableName

func (t *SpPurchaseAttrValue) TableName() string

type SpPurchaseCategory

type SpPurchaseCategory struct {
	Id           int    `json:"category_id" orm:"column(category_id);pk;auto"`
	CategoryName string `json:"category_name" valid:"Required;MaxSize(128);",orm:"column(category_name);size(128)" description:"分类名称"`
	//ParentId       int    `orm:"column(parent_id);" description:"父级id"`
	Parent         *SpPurchaseCategory   `json:"parent_id" valid:"Required" orm:"rel(fk)" description:"父级id"`
	CategoryStatus int8                  `json:"category_status" orm:"column(category_status)" description:"状态 0.在用,1.停用"`
	Sort           int32                 `json:"sort" orm:"column(sort);" description:"排序字段"`
	PurchaseCatId  int8                  `json:"purchase_cat_id" orm:"column(purchase_cat_id)" description:"关联采购使用分类表id"`
	Remark         string                `json:"remark" valid:"MaxSize(255)",orm:"column(remark);size(512);null" description:"备注"`
	UpdateTime     int                   `json:"update_time" orm:"column(update_time)" description:"更新时间"`
	CreateTime     int                   `json:"create_time" orm:"column(create_time)" description:"创建时间"`
	IsEnd          int8                  `json:"is_end" orm:"column(is_end);default(1)" description:"是否为最后一级 0不是1是"`
	IsDeleted      int8                  `json:"is_deleted" orm:"column(is_deleted)" description:"是否删除 0 不是 1是"`
	Level          int                   `json:"level" orm:"column(level);" description:"父级id"`
	Unit           string                `json:"unit" orm:"column(unit);" description:"单位"`
	Ch             []*SpPurchaseCategory `json:"children" orm:"reverse(many)" useDefaultRelsDepth:"3"`
	SpPurchaseAttr []*SpPurchaseAttr     `orm:"rel(m2m)"`
}

func (*SpPurchaseCategory) TableName

func (t *SpPurchaseCategory) TableName() string

type SpPurchaseEditLog

type SpPurchaseEditLog struct {
	Id         int    `orm:"column(id);auto"`
	QuoteId    int    `orm:"column(quote_id)" valid:"Required" description:"采购单id"`
	LogDetail  string `orm:"column(log_detail)" valid:"Required" description:"代编辑记录"`
	CreateTime int64  `orm:"column(create_time);null" description:"创建时间"`
	UpdateTime int64  `orm:"column(update_time);null" description:"更新时间"`
	IsDeleted  int    `orm:"column(is_deleted)" description:"是否删除 0 未删除, 1 已删除"`
}

func (*SpPurchaseEditLog) TableName

func (t *SpPurchaseEditLog) TableName() string

type SpSellerQuoted

type SpSellerQuoted struct {
	Id         int                  `orm:"column(seller_quoted_id);auto"`
	Quoted     *SpSellerQuotedBuyer `orm:"rel(fk);" description:"用户报价id"`
	ShopId     int                  `orm:"column(shop_id)" description:"店铺id"`
	UnitPrice  float64              `orm:"column(unit_price);digits(10);decimals(3)" description:"单价"`
	TotalPrice float64              `orm:"column(total_price);digits(10);decimals(2)" description:"总价"`
	Remark     string               `orm:"column(remark);null" description:"备注"`
	File       string               `orm:"column(file);size(128)" description:"上传文件"`
	FileName   string               `orm:"column(file_name);size(128)" description:"文件名称"`
	Status     int8                 `orm:"column(status)" description:"状态0已报价,1抢单成功,2抢单失败"`
	QuotedTime int                  `json:"update_time" orm:"column(quoted_time)" description:"报价时间"`
}

func (*SpSellerQuoted) TableName

func (t *SpSellerQuoted) TableName() string

type SpSellerQuotedBuyer

type SpSellerQuotedBuyer struct {
	QuoteResp
	Id          int                  `orm:"column(quoted_id);auto"`
	TmpCatId    *TmpPurchaseCategory `orm:"column(tmp_cat_id);null;rel(fk)" json:"-" description:"tmp表分类模板id"`
	AuditStatus int                  `orm:"column(audit_status);null" description:"审核状态0平台审核中,审核通过,审核不通过"`
	Status      int                  `orm:"column(status);null" description:"报价状态0报价中,1已成交,2已暂停,3已取消"`
	BuyerId     int                  `orm:"column(buyer_id)" valid:"Required" description:"买家id"`
	QuoteCount  int                  `orm:"column(quote_count)" description:"报价数量统计"`
	CreateAndUpdateTime
	AuditTime         int    `orm:"column(audit_time);null" description:"采购单审核时间"`
	VirtualOrderUser  string `orm:"column(virtual_order_user)" description:"虚拟订单添加人id"`
	VirtualShop       string `orm:"column(virtual_shop)" description:"虚拟店铺名"`
	BackstageEdit     int    `orm:"column(backstage_edit)" description:"代编辑状态"`
	BackstageEditTime int64  `orm:"column(backstage_edit_time)" description:"代编辑时间"`
	QuoteStatus       int    `` /* 149-byte string literal not displayed */
	PurchaseOrder
	SpSellerQuotedSet []*SpSellerQuoted `json:"-" orm:"reverse(many)"`
}

func (*SpSellerQuotedBuyer) BackstageEditDetail

func (s *SpSellerQuotedBuyer) BackstageEditDetail(newQuote SpSellerQuotedBuyer, o orm.Ormer, oldValueList []string) (err error)

check where has changed when backstage edit happened

func (*SpSellerQuotedBuyer) GetQuoteById

func (q *SpSellerQuotedBuyer) GetQuoteById(id int) (err error)

func (*SpSellerQuotedBuyer) GetQuoteByIdAndBuyerId

func (s *SpSellerQuotedBuyer) GetQuoteByIdAndBuyerId(id, buyerId int) (err error)

func (*SpSellerQuotedBuyer) IsBackstageEdit

func (s *SpSellerQuotedBuyer) IsBackstageEdit(now int64, status int) (result bool)

func (*SpSellerQuotedBuyer) IsInReview

func (s *SpSellerQuotedBuyer) IsInReview(now int64, status int) (result bool)

func (*SpSellerQuotedBuyer) IsOnAudit

func (s *SpSellerQuotedBuyer) IsOnAudit(now int64, status int) (result bool)

func (*SpSellerQuotedBuyer) IsOnPurchase

func (s *SpSellerQuotedBuyer) IsOnPurchase(now int64, status int) (result bool)

func (*SpSellerQuotedBuyer) IsPaused

func (s *SpSellerQuotedBuyer) IsPaused(now int64, status int) (result bool)

func (*SpSellerQuotedBuyer) IsTraded

func (s *SpSellerQuotedBuyer) IsTraded(status int) (result bool)

func (*SpSellerQuotedBuyer) IsUnApprove

func (s *SpSellerQuotedBuyer) IsUnApprove(now int64, status int) (result bool)

func (*SpSellerQuotedBuyer) IsValid

func (s *SpSellerQuotedBuyer) IsValid(now int64, status int) (result bool)

func (*SpSellerQuotedBuyer) TableName

func (t *SpSellerQuotedBuyer) TableName() string

func (*SpSellerQuotedBuyer) UpdateQuote

func (quote *SpSellerQuotedBuyer) UpdateQuote(reqBody UpdateQuoteReq, now int64, backstage int) (purchaseId int, err error)

type Template

type Template struct {
	TmpPurchaseCategory
	TmpCatId int `valid:"Required"`
}

type TmpPurchaseAttr

type TmpPurchaseAttr struct {
	Id            int                     `orm:"column(attr_id);auto"`
	AttrName      string                  `orm:"column(attr_name);size(255)" description:"属性名称"`
	AttrAliasName string                  `orm:"column(attr_alias_name);size(255)" description:"属性别名"`
	IsLimitUser   int8                    `orm:"column(is_limit_user)" description:"是否允许用户自定义0不允许1允许"`
	IsMust        int                     `orm:"column(is_must)" description:"是否必选字段 0 否 1 是"`
	Cat           *TmpPurchaseCategory    `orm:"rel(fk)" json:"-"`
	AttrValues    []*TmpPurchaseAttrValue `orm:"reverse(many)" json:"AttrValues"`
}

func (*TmpPurchaseAttr) TableName

func (t *TmpPurchaseAttr) TableName() string

type TmpPurchaseAttrValue

type TmpPurchaseAttrValue struct {
	Id         int                  `orm:"column(attr_value_id);auto"`
	AttrValue  string               `orm:"column(attr_value);size(255)" description:"属性值"`
	UnitTypeId int                  `orm:"column(unit_type_id)" description:"单位:0mm,1米,2吋"`
	Sort       int                  `orm:"column(sort)" description:"排序"`
	Customize  int                  `orm:"column(customize)" description:"是否自定义属性值"`
	PurchaseSn string               `orm:"column(purchase_sn)" description:"关联采购单"`
	ValueId    int                  `orm:"column(sp_attr_value_id)" json:"ValueId" description:"运营后台属性id"`
	Attr       *TmpPurchaseAttr     `orm:"rel(fk)" json:"omitempty"`
	Cat        *TmpPurchaseCategory `orm:"rel(fk)" json:"omitempty"`
}

func (*TmpPurchaseAttrValue) TableName

func (t *TmpPurchaseAttrValue) TableName() string

type TmpPurchaseCategory

type TmpPurchaseCategory struct {
	CatId   int                `orm:"column(cat_id);auto"`
	CatName string             `orm:"column(cat_name);size(255)" valid:"Required" description:"分类名称"`
	SpCatId int                `orm:"column(sp_cat_id)" valid:"Required" description:"运营后台分类id"`
	Attr    []*TmpPurchaseAttr `orm:"reverse(many)" json:"Attr"`
}

func GetTmpCat

func GetTmpCat(id int) (t *TmpPurchaseCategory, err error)

func (*TmpPurchaseCategory) TableName

func (t *TmpPurchaseCategory) TableName() string

type TransCommon

type TransCommon struct {
	Include          []int                  `json:"Include"`
	GoodsPicture     []map[string]string    `json:"GoodsPicture"`
	Documents        []map[string]string    `json:"Documents"`
	PurchaseList     []map[string]string    `json:"PurchaseList"`
	NormsRequirement []int                  `json:"NormsRequirement"`
	MobileNumber     string                 `json:"MobileNumber" valid:"Required"`
	AddressInfo      map[string]interface{} `json:"AddressInfo"`
}

出入参数据结构转换struct

func (*TransCommon) TransWithGet

func (resp2 *TransCommon) TransWithGet(resp1 QuoteResp)

列表字段处理

type UpdateOrderReq

type UpdateOrderReq struct {
	OrderSn         string
	SuccessSellerId int
	PurchaseId      int `valid:"Required"`
	BuyerId         int `valid:"Required"`
	Price           float64
	Status          int `valid:"Required"`
}

修改采购单相关订单信息

type UpdateQuoteReq

type UpdateQuoteReq struct {
	QuoteReq
	Id int `json:"Id"`
}

采购单编辑入参

type UpdateQuoteReq struct {
	Template TmpPurchaseCategory    `json:"Template"`
	Purchase QuoteCommon
	BuyerId          int       `json:"BuyerId"`
	Id               int       `json:"Id"`
}

func (*UpdateQuoteReq) UpdatePurchase

func (reqBody *UpdateQuoteReq) UpdatePurchase() (purchaseId int, err error)

func (*UpdateQuoteReq) UpdateQuote

func (reqBody *UpdateQuoteReq) UpdateQuote() (purchaseId int, purchaseSn string, err error)

type UploadFileReq

type UploadFileReq struct {
	QuoteId   int                    `valid:"Required"`
	Documents map[string]interface{} `valid:"Required"`
	UserId    int                    `valid:"Required"`
}

订单上传文件

type User

type User struct {
	Id       string
	Username string
	Password string
	Profile  Profile
}

func GetUser

func GetUser(uid string) (u *User, err error)

func UpdateUser

func UpdateUser(uid string, uu *User) (a *User, err error)

type UserPurchaseList

type UserPurchaseList struct {
	SpSellerQuotedBuyer
	TransCommon
	AttrName []string
}

个人中心采购单列表

type UserPurchaseListResp

type UserPurchaseListResp struct {
	Include      []int                  `json:"Include"`
	MobileNumber string                 `json:"MobileNumber"`
	AddressInfo  map[string]interface{} `json:"AddressInfo"`

	PurchaseSn        string  `orm:"column(purchase_sn);size(128)" description:"采购编号"`
	City              string  `orm:"column(city);size(255);null" description:"采购城市"`
	GoodsName         string  `orm:"column(goods_name);size(255);null" description:"采购商品"`
	QuotedEndTime     int64   `orm:"column(quoted_end_time);null" valid:"Required" description:"报价截止"`
	DeliveryEndTime   int64   `orm:"column(delivery_end_time);null" valid:"Required" description:"交货日期"`
	Price             float64 `orm:"column(price);null;digits(10);decimals(3)" description:"报价"`
	AddressId         int     `orm:"column(address_id);null" valid:"Required" description:"地址id"`
	PurchaseType      int     `orm:"column(purchase_type)" description:"采购单类型 1 单商品  2 多商品"`
	Id                int     `orm:"column(quoted_id);auto"`
	AuditStatus       int     `orm:"column(audit_status);null" description:"审核状态0平台审核中,审核通过,审核不通过"`
	Status            int     `orm:"column(status);null" description:"报价状态0报价中,1已成交,2已暂停,3已取消"`
	SuccessSellerId   int     `orm:"column(success_seller_id);null" description:"成交的商家报价id"`
	BuyerId           int     `orm:"column(buyer_id)" valid:"Required" description:"买家id"`
	QuoteCount        int     `orm:"column(quote_count)" description:"报价数量统计"`
	CreateTime        int64   `orm:"column(create_time);null" description:"采购单创建时间"`
	UpdateTime        int64   `orm:"column(update_time);null" description:"采购单更新时间"`
	AuditTime         int64   `orm:"column(audit_time);null" description:"采购单审核时间"`
	AttrName          []string
	AuditMessage      string
	OrderSn           string
	PurchaseStatus    int
	PurchaseListDesc  string
	Invoice           int
	BackstageEdit     int
	BackstageEditTime int64
}

Jump to

Keyboard shortcuts

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