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
c283afc9
authored
Jun 23, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
8fb550d2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
config/config.toml.pro.demo
config/db.toml.pro.demo
order/bom_create_order/main.go
order/bom_create_order/service/bom.go
config/config.toml.pro.demo
View file @
c283afc9
...
...
@@ -8,7 +8,7 @@ jingDiao="https://oapi.dingtalk.com/robot/send?access_token=eaeae1253e9c125a053b
tuangou_webhook="https://oapi.dingtalk.com/robot/send?access_token=a13d6128de5f918fc0f0a4cef70cab8b1962fca709649f7856aea4b1ca4dddf5"
erpLabel_webhook="https://oapi.dingtalk.com/robot/send?access_token=ba4ed87924ee03b37d2b96ba0f0cb1a28d476bda3af6b2e75a2458b08b5ae39c"
yaoHaoYou_hook="https://oapi.dingtalk.com/robot/send?access_token=09333ef25d736b34268fff237d58a4f27c7d33b01be37aa5c0c30acf5a7356e4"
bomCreateBom="https://oapi.dingtalk.com/robot/send?access_token=64d1d9d89d51aa66fe5cbbfe5cbdd7595202d43e255fab28adcbe60a9bd5f11d"
[Api_domain]
api_url="http://api.ichunt.com/"
\ No newline at end of file
config/db.toml.pro.demo
View file @
c283afc9
...
...
@@ -6,7 +6,11 @@ dns="huntdbuser:mLssy2@@!!@$#yy@tcp(172.18.137.21:3306)/hunt2016?parseTime=true"
dns="LabxsuT:Plz2#$afsPqmz@#5@tcp(172.18.137.34:3306)/lie_labels?parseTime=true"
[Liexincms_databases]
dns="dtuser:dAtaL#ym2902m2lLX2y33@tcp(172.18.137.21:3306)/icdata?parseTime=true"
dns="dtuser:dAtaL#ym2902m2lLX2y33@tcp(appdb-master.ichunt.db:3306)/icdata?parseTime=true"
[Bom_databases]
dns="BomUserIc:mLssyDxmsymBomy@tcp(172.18.137.21:3306)/liexin_bom?parseTime=true"
[rabbitmq_ichunt]
queue_name="send_buyer_mail"
...
...
@@ -40,3 +44,11 @@ exchange=""
type="direct"
dns="amqp://WmsQue:EizM9I1TAxoO0tmzoOm@172.18.137.33:5672/"
[rabbitmq_bomcreateorder]
queue_name="api_create_order_bom"
routing_key="api_create_order_bom"
exchange=""
type="direct"
dns="amqp://WmsQue:EizM9I1TAxoO0tmzoOm@172.18.137.33:5672/"
order/bom_create_order/main.go
View file @
c283afc9
...
...
@@ -20,7 +20,7 @@ type RecvPro struct {
//// 实现消费者 消费消息失败 自动进入延时尝试 尝试3次之后入库db
func
(
t
*
RecvPro
)
Consumer
(
dataByte
[]
byte
)
error
{
logger
.
Info
(
string
(
dataByte
))
fmt
.
Println
(
string
(
dataByte
))
//
fmt.Println(string(dataByte))
service
.
CreateBomOrder
(
string
(
dataByte
))
//services.YaohaoyouOrder(string(dataByte));
return
nil
...
...
order/bom_create_order/service/bom.go
View file @
c283afc9
...
...
@@ -24,7 +24,7 @@ func CreateBomOrder(bomjson string) error{
data
:=
gjson
.
Get
(
bomjson
,
"data"
)
if
jobname
==
"create_bom_order"
{
fmt
.
Println
(
data
)
//
fmt.Println(data)
//jsonData = gjson.Parse(data.String()).Value().(map[string]interface{})
//处理下单逻辑
err
=
createOrder
(
data
.
String
())
...
...
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