Commit 52dd3bec by 孙龙

up

parent 14a0c6fe
Showing with 4 additions and 2 deletions
......@@ -3,6 +3,7 @@ package orderTrack
import (
"errors"
"fmt"
"github.com/ichunt2019/logger"
"go-queue-server/dal/db"
"go-queue-server/util"
)
......@@ -62,7 +63,7 @@ func InsertData(trackList OrderTrackList) error{
orderItems := &OrderItems{}
err = db.DB.Get(orderItems,"SELECT order_id,rec_id FROM lie_order_items WHERE erp_rec_id = ?",data.ORDERENTRYID)
if err != nil{
fmt.Println(err)
logger.Error("%s",fmt.Sprintf("没有找到该明细的信息 %d",data.ORDERENTRYID))
return errors.New(fmt.Sprintf("没有找到该明细的信息 %d",data.ORDERENTRYID))
}
create_time = util.ParseTimestrToTimestamp(data.BIZDATE,5)
......@@ -72,6 +73,7 @@ func InsertData(trackList OrderTrackList) error{
sql := " INSERT INTO lie_order_items_tracking (rec_id,order_id,status,msg,status_cn,create_name,create_time) VALUES(?,?,?,?,?,?,?)"
_,err :=db.DB.Exec(sql, orderItems.RecId,orderItems.OrderId,data.STATUS,data.MSG,status_cn,data.CREATOR,create_time)
if err != nil{
logger.Error("%s",err)
return err
}
}
......
......@@ -12,7 +12,7 @@ require (
github.com/ichunt2019/golang-rbmq-sl v0.0.0-20200515075131-59a37ab77d7d
github.com/ichunt2019/logger v1.0.5
github.com/jmoiron/sqlx v1.2.0
github.com/prometheus/common v0.7.0 // indirect
github.com/prometheus/common v0.7.0
github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71
github.com/syyongx/php2go v0.9.4
github.com/tealeg/xlsx v1.0.5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment