瀏覽代碼

更新

master
huangjiajun 6 月之前
父節點
當前提交
0836d665aa
共有 6 個檔案被更改,包括 13 行新增9 行删除
  1. +7
    -0
      app/admin/svc/order/svc_order_pay.go
  2. +2
    -1
      app/bigData/hdl/hdl_making_data.go
  3. +2
    -5
      app/bigData/svc/svc_data.go
  4. +1
    -1
      app/bigData/svc/svc_making_data.go
  5. +1
    -1
      app/db/db_order_goods_list.go
  6. +0
    -1
      app/ipad/md/md_order.go

+ 7
- 0
app/admin/svc/order/svc_order_pay.go 查看文件

@@ -43,6 +43,13 @@ func GoodsPayCreate(c *gin.Context) {
sess := db.Db.NewSession()
defer sess.Close()
sess.Begin()
sysCfgDb := db.SysCfgDb{}
sysCfgDb.Set()
beforeHourShowOrder, _ := sysCfgDb.SysCfgGetOne("before_hour_show_order")
if utils.StrToInt(beforeHourShowOrder.Val) > time.Now().Hour() {
e.OutErr(c, 400, e.NewErr(400, "请"+beforeHourShowOrder.Val+"点后再下单"))
return
}
today := utils.GetTimeRange("today")
count, _ := sess.Where("create_at>=?", time.Unix(today["start"], 0).Format("2006-01-02 15:04:05")).Count(&model.Order{})
i := utils.IntToStr(int(count + 1))


+ 2
- 1
app/bigData/hdl/hdl_making_data.go 查看文件

@@ -80,7 +80,8 @@ func NewOrderNotice(c *gin.Context) {
}
func NewOrderInfoNotice(c *gin.Context) {
var data []model.OrderGoods
db.Db.Where("is_new=1").Find(&data)
now := svc.CommDate()
db.Db.Where("is_new=1 and make_date=?", now).Find(&data)
sysCfgDb := db.SysCfgDb{}
sysCfgDb.Set()
cfg, _ := sysCfgDb.SysCfgGetOne("new_order_notice")


+ 2
- 5
app/bigData/svc/svc_data.go 查看文件

@@ -464,12 +464,9 @@ func NewSortingData(c *gin.Context) []map[string]string {
}

//1、查找不等于4 5
today := utils.GetTimeRange("today")
if time.Now().Hour() < 2 {
today = utils.GetTimeRange("yesterday")
}
now := CommDate()
var orders []model.Order
err = engine.Where(" state != 4 and state != 5 and create_at>=? and enterprise_id=?", time.Unix(today["start"], 0).Format("2006-01-02 15:04:05"), args["id"]).Find(&orders)
err = engine.Where(" state != 4 and state != 5 and make_date=? and enterprise_id=?", now, args["id"]).Find(&orders)
if err != nil {
return res
}


+ 1
- 1
app/bigData/svc/svc_making_data.go 查看文件

@@ -37,7 +37,7 @@ func CommMakingData(c *gin.Context, args map[string]string) {
tmp["state_str"] = "无需制作"
}
if v.GoodsType == 1 { //判断主单做完了就显示完成
count, _ := eg.Where("gid=? and sku_id=? and goods_type=0 and make_date=?", v.Gid, v.SkuId, v.MakeDate).Count(&model.OrderGoodsMakeStock{})
count, _ := eg.Where("gid=? and sku_id=? and goods_type=0 and make_date=?", v.Gid, v.SkuId, v.MakeDate).Sum(&model.OrderGoodsMakeStock{}, "wait_make_num")
if count == 0 {
tmp["state"] = "4"
tmp["state_str"] = "制作完成"


+ 1
- 1
app/db/db_order_goods_list.go 查看文件

@@ -8,7 +8,7 @@ import (

func GetOrderGoodsListByIpad(eg *xorm.Engine, param map[string]string) (*[]model.OrderGoods, int64) {
var order []model.OrderGoods
sess := eg.Where("state!=5 ")
sess := eg.Where("state!=5 and goods_type=0")
if param["sorting"] == "1" {
sess.And("state!=4")
}


+ 0
- 1
app/ipad/md/md_order.go 查看文件

@@ -7,7 +7,6 @@ type OrderSorting struct {
}
type NewOrderSorting struct {
Gid string `json:"gid"`
Id string `json:"id"`
SkuId string `json:"sku_id"`
AdminId string `json:"admin_id"`
OrderInfo []map[string]string `json:"goods_info"`


Loading…
取消
儲存