Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
54723c5e
Commit
54723c5e
authored
Nov 14, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
e46a7cce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
34 deletions
+79
-34
igirl-channel/app/base/api/impl/action/tmOrder.js
+2
-1
igirl-channel/app/base/api/impl/test/testApi.js
+73
-27
igirl-channel/app/base/db/impl/dborder/orderDao.js
+3
-5
igirl-channel/app/base/service/impl/dborder/orderSve.js
+0
-0
igirl-channel/app/base/utils/execClient.js
+1
-1
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
54723c5e
...
@@ -5,6 +5,7 @@ class TmOrderAPI extends APIBase {
...
@@ -5,6 +5,7 @@ class TmOrderAPI extends APIBase {
constructor
()
{
constructor
()
{
super
();
super
();
this
.
opPlatformUtils
=
system
.
getObject
(
"util.businessManager.opPlatformUtils"
);
this
.
opPlatformUtils
=
system
.
getObject
(
"util.businessManager.opPlatformUtils"
);
this
.
orderSve
=
system
.
getObject
(
"service.dborder.orderSve"
);
this
.
ordertmproductSve
=
system
.
getObject
(
"service.dborder.ordertmproductSve"
);
this
.
ordertmproductSve
=
system
.
getObject
(
"service.dborder.ordertmproductSve"
);
this
.
customerinfoSve
=
system
.
getObject
(
"service.dborder.customerinfoSve"
);
this
.
customerinfoSve
=
system
.
getObject
(
"service.dborder.customerinfoSve"
);
this
.
customercontactsSve
=
system
.
getObject
(
"service.dborder.customercontactsSve"
);
this
.
customercontactsSve
=
system
.
getObject
(
"service.dborder.customercontactsSve"
);
...
@@ -61,7 +62,7 @@ class TmOrderAPI extends APIBase {
...
@@ -61,7 +62,7 @@ class TmOrderAPI extends APIBase {
opResult
=
await
this
.
toolSve
.
decryptStr
(
req
.
app
,
action_body
.
opStr
);
opResult
=
await
this
.
toolSve
.
decryptStr
(
req
.
app
,
action_body
.
opStr
);
break
;
break
;
case
"op1688ChannelPushOrder"
:
//处理渠道订单信息
case
"op1688ChannelPushOrder"
:
//处理渠道订单信息
opResult
=
await
this
.
order
tmproductSve
.
op1688ChannelPushOrder
(
action_body
);
opResult
=
await
this
.
order
Sve
.
op1688ChannelPushOrderTest
(
action_body
,
req
);
if
(
opResult
.
status
==
0
)
{
if
(
opResult
.
status
==
0
)
{
opResult
.
data
=
null
;
opResult
.
data
=
null
;
var
encryptResult
=
await
this
.
toolSve
.
encryptStr
(
req
.
app
,
action_body
.
channelUserId
);
var
encryptResult
=
await
this
.
toolSve
.
encryptStr
(
req
.
app
,
action_body
.
channelUserId
);
...
...
igirl-channel/app/base/api/impl/test/testApi.js
View file @
54723c5e
var
APIBase
=
require
(
"../../api.base"
);
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
system
=
require
(
"../../../system"
);
var
moment
=
require
(
"moment"
);
class
TestAPI
extends
APIBase
{
class
TestAPI
extends
APIBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
orderSve
=
system
.
getObject
(
"service.dborder.orderSve"
);
}
}
async
test
(
pobj
,
query
,
req
)
{
async
test
(
pobj
,
query
,
req
)
{
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
// var rc = system.getObject("util.aliyunClient");
var
param
=
pobj
;
// var param = pobj;
try
{
// try {
var
body
=
{
// var body = {
idempotentId
:
"fzsbzc"
,
// 是 业务 ID
// idempotentId: "fzsbzc",// 是 业务 ID
idempotentSource
:
param
.
appSourceCode
||
"tm_1688"
,
// 是 业务来源(ali、jd)
// idempotentSource: param.appSourceCode || "tm_1688",// 是 业务来源(ali、jd)
idempotentSourceName
:
param
.
name
||
"1688应用"
,
// 是 阿里,京东
// idempotentSourceName: param.name || "1688应用",// 是 阿里,京东
city
:
""
,
// 否 所属城市
// city: "",// 否 所属城市
phone
:
"15010929366"
,
// 是 手机号
// phone:"15010929366",// 是 手机号
userId
:
"channelUserIdtest01"
,
// 否 用户 ID
// userId: "channelUserIdtest01",// 否 用户 ID
companyName
:
""
,
// 否 公司名称
// companyName: "",// 否 公司名称
orderPrice
:
899
,
// 是 订单金额
// orderPrice: 899,// 是 订单金额
productId
:
"5dc936eb296d1572b9bc5b8d"
,
// 是 产品 ID
// productId: "5dc936eb296d1572b9bc5b8d",// 是 产品 ID
productQuantity
:
1
,
// 是 产品数量
// productQuantity: 1,// 是 产品数量
};
// };
var
submitTm
=
await
rc
.
post
(
"https://yunfuapi.gongsibao.com/crm/order/submit"
,
body
);
// var submitTm = await rc.post("https://yunfuapi.gongsibao.com/crm/order/submit", body);
return
{
code
:
200
,
message
:
"ok"
,
data
:
submitTm
};
// return { code: 200, message: "ok", data: submitTm };
}
catch
(
e
)
{
// } catch (e) {
//日志记录
// //日志记录
logCtl
.
error
({
// logCtl.error({
optitle
:
"查询阿里商标状态异常---error"
,
// optitle: "查询阿里商标状态异常---error",
op
:
"base/api/impl/tmsub/queryAliTmStatus"
,
// op: "base/api/impl/tmsub/queryAliTmStatus",
content
:
e
.
stack
,
// content: e.stack,
clientIp
:
""
// clientIp: ""
});
// });
}
// }
var
body
=
{
channelItemCode
:
"1329709"
};
returnRuslt
=
{
"returnValue"
:
[
{
"bizStatusExt"
:
"service"
,
"memberId"
:
"b2b-****02"
,
"productName"
:
"商机**"
,
"gmtCreate"
:
"20171231200252000+0800"
,
"gmtServiceEnd"
:
"20190101000000000+0800"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"W1712*****_1"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[
],
"payCustomerUid"
:
"12345678990000"
,
"signCustomerUid"
:
"12345678990000"
}
],
"successed"
:
true
};
var
tmpreq
=
{
app
:};
this
.
orderSve
.
addOrderNeed
()
return
system
.
getResultSuccess
({
req
:
"ok"
});
return
system
.
getResultSuccess
({
req
:
"ok"
});
}
}
}
}
...
...
igirl-channel/app/base/db/impl/dborder/orderDao.js
View file @
54723c5e
...
@@ -67,9 +67,7 @@ class OrderDao extends Dao {
...
@@ -67,9 +67,7 @@ class OrderDao extends Dao {
channelProfitSum
:
orderAmount
.
channelProfitSum
||
0
,
// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
channelProfitSum
:
orderAmount
.
channelProfitSum
||
0
,
// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
pfSettleProfit
:
0
,
// 平台结算渠道利润,0否,1是
pfSettleProfit
:
0
,
// 平台结算渠道利润,0否,1是
notes
:
apply
.
notes
,
//备注
notes
:
apply
.
notes
,
//备注
appPayType
:
app
.
appPayType
,
// 支付类型:00第三方支付,10平台代收款
appPayType
:
app
.
appPayType
,
// 支付类型:00第三方支付,10平台代收款
// payAccountType: app.appPayType == "00" ? "other" : null,// 帐户类型( 支付类型):cash: 现金, bank: 银行,wx:微信,alipay:支付,other:其它
// payTime: channelOrder.payStatus == "yfk" ? new Date() : null,//支付时间
createuser_id
:
user
.
id
,
createuser_id
:
user
.
id
,
owner_id
:
user
.
id
,
//
owner_id
:
user
.
id
,
//
creator
:
user
.
nickname
,
creator
:
user
.
nickname
,
...
@@ -79,8 +77,8 @@ class OrderDao extends Dao {
...
@@ -79,8 +77,8 @@ class OrderDao extends Dao {
channelUserId
:
channelUser
.
channelUserId
,
// 渠道用户id
channelUserId
:
channelUser
.
channelUserId
,
// 渠道用户id
needNo
:
channelOrder
.
needNo
||
null
,
//需求单号
needNo
:
channelOrder
.
needNo
||
null
,
//需求单号
picUrl
:
productItem
.
picUrl
,
//
picUrl
:
productItem
.
picUrl
,
//
productType_id
:
productItem
.
p
icUrl
,
//产品类型Id
productType_id
:
productItem
.
p
roductType_id
,
//产品类型Id
productOneType_id
:
productItem
.
p
icUrl
,
//产品大类Id
productOneType_id
:
productItem
.
p
roductOneType_id
,
//产品大类Id
serviceItemSnapshot
:
JSON
.
stringify
(
productItem
),
//产品快照
serviceItemSnapshot
:
JSON
.
stringify
(
productItem
),
//产品快照
};
};
var
order
=
await
this
.
create
(
orderObj
,
t
);
var
order
=
await
this
.
create
(
orderObj
,
t
);
...
...
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
54723c5e
This diff is collapsed.
Click to expand it.
igirl-channel/app/base/utils/execClient.js
View file @
54723c5e
...
@@ -4,7 +4,7 @@ const exec = util.promisify(require('child_process').exec);
...
@@ -4,7 +4,7 @@ const exec = util.promisify(require('child_process').exec);
class
ExecClient
{
class
ExecClient
{
constructor
()
{
constructor
()
{
this
.
cmdPostPattern
=
"curl -
-user admines:adminGSBes. -
k -H 'Content-type: application/json' -d '{data}' {url}"
;
this
.
cmdPostPattern
=
"curl -k -H 'Content-type: application/json' -d '{data}' {url}"
;
this
.
cmdGetPattern
=
"curl -G -X GET '{url}'"
;
this
.
cmdGetPattern
=
"curl -G -X GET '{url}'"
;
this
.
cmdPushDataPostPattern
=
"curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}"
;
this
.
cmdPushDataPostPattern
=
"curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}"
;
...
...
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