作者 tangxvhui

Merge branch 'dev' into test

... ... @@ -97,13 +97,13 @@ func (repository OrderGoodRepository) Find(queryOption domain.OrderGoodFindQuery
if queryOption.Limit > 0 {
query = query.Limit(queryOption.Limit)
} else {
query = query.Limit(50)
query = query.Limit(100)
}
var (
err error
orderGoods = make([]domain.OrderGood, 0)
)
query = query.Order("order_good.id DESC")
query = query.Order("order_good.id")
count, err := query.SelectAndCount()
if err != nil {
return orderGoods, 0, err
... ...
... ... @@ -191,6 +191,9 @@ func (postData postPurposeOrderDetail) Valid() error {
if len(postData.OrderDist) == 0 {
return lib.ThrowError(lib.ARG_ERROR, "订单区域必填")
}
if len(postData.Product) > 50 {
return lib.ThrowError(lib.ARG_ERROR, "货品列表最多50项")
}
for i := range postData.Product {
if err := postData.Product[i].Valid(); err != nil {
return err
... ...