Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
88943fa6
authored
Jan 03, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加操作日志
parent
859d698b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
dal/order/OrderActionLog/OrderActionLog.go
order/sendPurchaseEmail/main.go
order/sendPurchaseEmail/sendEmail/sendEmail.go
util/ding/ding.go
dal/order/OrderActionLog/OrderActionLog.go
View file @
88943fa6
...
...
@@ -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
order/sendPurchaseEmail/main.go
View file @
88943fa6
...
...
@@ -9,7 +9,6 @@ import (
"github.com/ichunt2019/logger"
"sync"
"time"
"go-queue-server/dal/order/OrderActionLog"
)
...
...
order/sendPurchaseEmail/sendEmail/sendEmail.go
View file @
88943fa6
...
...
@@ -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
...
...
util/ding/ding.go
0 → 100644
View file @
88943fa6
package
ding
import
(
"net/http"
"encoding/json"
)
func
send
()
{
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment