|
@@ -22,6 +22,7 @@ func GetOrderGoodsMakeStockByIpad(eg *xorm.Engine, param map[string]string) (*[] |
|
|
if param["keyword"] != "" { |
|
|
if param["keyword"] != "" { |
|
|
sess.And("goods_title like ?", "%"+param["keyword"]+"%") |
|
|
sess.And("goods_title like ?", "%"+param["keyword"]+"%") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
size := utils.StrToInt(param["limit"]) |
|
|
size := utils.StrToInt(param["limit"]) |
|
|
start := (utils.StrToInt(param["page"]) - 1) * size |
|
|
start := (utils.StrToInt(param["page"]) - 1) * size |
|
|
count, err := sess.Limit(size, start).OrderBy("make_date asc,id asc").FindAndCount(&order) |
|
|
count, err := sess.Limit(size, start).OrderBy("make_date asc,id asc").FindAndCount(&order) |
|
@@ -33,8 +34,10 @@ func GetOrderGoodsMakeStockByIpad(eg *xorm.Engine, param map[string]string) (*[] |
|
|
func GetOrderGoodsMakeStockByBigData(eg *xorm.Engine, param map[string]string) (*[]model.OrderGoodsMakeStock, int64) { |
|
|
func GetOrderGoodsMakeStockByBigData(eg *xorm.Engine, param map[string]string) (*[]model.OrderGoodsMakeStock, int64) { |
|
|
var order []model.OrderGoodsMakeStock |
|
|
var order []model.OrderGoodsMakeStock |
|
|
sess := eg.Where("1=1") |
|
|
sess := eg.Where("1=1") |
|
|
|
|
|
goodsSess := eg.Where("state!=5") |
|
|
if param["now"] != "" { |
|
|
if param["now"] != "" { |
|
|
sess.And("make_date=?", param["now"]) |
|
|
sess.And("make_date=?", param["now"]) |
|
|
|
|
|
goodsSess.And("make_date=?", param["now"]) |
|
|
} |
|
|
} |
|
|
if param["state"] == "1" { |
|
|
if param["state"] == "1" { |
|
|
sess.And("wait_make_num >=0") |
|
|
sess.And("wait_make_num >=0") |
|
@@ -50,6 +53,20 @@ func GetOrderGoodsMakeStockByBigData(eg *xorm.Engine, param map[string]string) ( |
|
|
if param["keyword"] != "" { |
|
|
if param["keyword"] != "" { |
|
|
sess.And("goods_title like ?", "%"+param["keyword"]+"%") |
|
|
sess.And("goods_title like ?", "%"+param["keyword"]+"%") |
|
|
} |
|
|
} |
|
|
|
|
|
var goodsData []model.OrderGoods |
|
|
|
|
|
goodsSess.Find(&goodsData) |
|
|
|
|
|
gids := make([]int64, 0) |
|
|
|
|
|
skuids := make([]int64, 0) |
|
|
|
|
|
gids = append(gids, -1) |
|
|
|
|
|
skuids = append(skuids, -1) |
|
|
|
|
|
if len(goodsData) > 0 { |
|
|
|
|
|
for _, v := range goodsData { |
|
|
|
|
|
gids = append(gids, v.GoodsId) |
|
|
|
|
|
skuids = append(skuids, v.SkuId) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
sess.In("gid", gids) |
|
|
|
|
|
sess.In("sku_id", skuids) |
|
|
count, err := sess.OrderBy("id asc").FindAndCount(&order) |
|
|
count, err := sess.OrderBy("id asc").FindAndCount(&order) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, count |
|
|
return nil, count |
|
|