Commit 88943fa6 by 朱继来

添加操作日志

parent 859d698b
......@@ -82,17 +82,17 @@ func Insert(order_id int, operator_id int, operator_type int, event string) (err
panic(err)
}
// id, err := result.LastInsertId()
// if err != nil {
// panic(err)
// }
id, err := result.LastInsertId()
if err != nil {
panic(err)
}
// affected, err := result.RowsAffected()
// if err != nil {
// panic(err)
// }
affected, err := result.RowsAffected()
if err != nil {
panic(err)
}
// fmt.Printf("last insert id:%d affect rows:%d\n", id, affected)
fmt.Printf("last insert id:%d affect rows:%d\n", id, affected)
return err
}
\ No newline at end of file
......@@ -9,7 +9,6 @@ import (
"github.com/ichunt2019/logger"
"sync"
"time"
"go-queue-server/dal/order/OrderActionLog"
)
......
......@@ -7,6 +7,7 @@ import (
"encoding/json"
"strings"
"io/ioutil"
"go-queue-server/dal/order/OrderActionLog"
)
type JosnResp struct {
......@@ -14,7 +15,7 @@ type JosnResp struct {
Errmsg string `json:"msg"`
}
func SendPurchaseEmail(data string) (err error) {
func SendPurchaseEmail(data string) (err error) {
crm_url := util.Configs.Crm_domain.SendMailUrl // CRM发送邮件接口
client := &http.Client{}
......@@ -46,9 +47,11 @@ func SendPurchaseEmail(data string) (err error) {
json.Unmarshal([]byte(data), &data_map)
order_id := data_map["order_id"];
operator_id := data_map["operator_id"];
operator_event := data_map["operator_event"];
// 添加操作日志
OrderActionLog.Insert(order_id, operator_id, 2, operator_event)
// 推送ERP
......
package ding
import (
"net/http"
"encoding/json"
)
func send() {
}
\ No newline at end of file
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