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
bd8c7389
Commit
bd8c7389
authored
Sep 24, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-order' of
http://gitlab.gongsibao.com/jiangyong/zhichan
into center-order
parents
949be844
ca6f66ec
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
2 deletions
+106
-2
center-order/app/base/api/impl/action/tmOrder.js
+3
-0
center-order/app/base/api/impl/opaction/opPayOrder.js
+6
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+95
-0
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+1
-1
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
+1
-1
No files found.
center-order/app/base/api/impl/action/tmOrder.js
View file @
bd8c7389
...
@@ -27,6 +27,9 @@ class OrderAPI extends APIBase {
...
@@ -27,6 +27,9 @@ class OrderAPI extends APIBase {
opResult
=
await
this
.
orderinfoSve
.
tmRefuse
(
pobj
);
opResult
=
await
this
.
orderinfoSve
.
tmRefuse
(
pobj
);
break
;
break
;
//--------------------------------ali订单交易 订单操作-----结束
//--------------------------------ali订单交易 订单操作-----结束
case
"getNclByCode"
:
opResult
=
await
this
.
orderinfoSve
.
getNclByCode
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-order/app/base/api/impl/opaction/opPayOrder.js
View file @
bd8c7389
...
@@ -20,5 +20,10 @@ class OpPayOrder extends APIBase {
...
@@ -20,5 +20,10 @@ class OpPayOrder extends APIBase {
var
result
=
await
this
.
orderinfoSve
.
opOrderPayCallBackWX
(
pobj
,
pobj
.
appInfo
);
var
result
=
await
this
.
orderinfoSve
.
opOrderPayCallBackWX
(
pobj
,
pobj
.
appInfo
);
return
result
;
return
result
;
}
}
async
receivePayCallBackNotifyByChannel
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
orderinfoSve
.
opOrderPayCallBackChannel
(
pobj
,
pobj
.
appInfo
);
return
result
;
}
}
}
module
.
exports
=
OpPayOrder
;
module
.
exports
=
OpPayOrder
;
\ No newline at end of file
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
bd8c7389
...
@@ -701,6 +701,12 @@ class OrderInfoService extends ServiceBase {
...
@@ -701,6 +701,12 @@ class OrderInfoService extends ServiceBase {
mobile
:
actionBody
.
orderContact
.
mobile
,
//手机号
mobile
:
actionBody
.
orderContact
.
mobile
,
//手机号
email
:
actionBody
.
orderContact
.
email
||
""
email
:
actionBody
.
orderContact
.
email
||
""
};
};
if
(
actionBody
.
orderContact
.
tel
){
updateFields
[
'tel'
]
=
actionBody
.
orderContact
.
tel
}
if
(
actionBody
.
orderContact
.
fax
){
updateFields
[
'fax'
]
=
actionBody
.
orderContact
.
fax
}
this
.
ordercontactsDao
.
updateByWhere
(
updateFields
,
{
where
:
{
sourceOrderNo
:
actionBody
.
orderNo
}
});
this
.
ordercontactsDao
.
updateByWhere
(
updateFields
,
{
where
:
{
sourceOrderNo
:
actionBody
.
orderNo
}
});
if
(
actionBody
.
notes
)
{
if
(
actionBody
.
notes
)
{
actionBody
.
isGetContact
=
0
;
actionBody
.
isGetContact
=
0
;
...
@@ -935,6 +941,22 @@ class OrderInfoService extends ServiceBase {
...
@@ -935,6 +941,22 @@ class OrderInfoService extends ServiceBase {
itemResult
.
data
.
nclones
=
tempNclList
;
itemResult
.
data
.
nclones
=
tempNclList
;
actionBody
.
nclones
=
tempNclList
;
actionBody
.
nclones
=
tempNclList
;
}
}
let
tmSelectType
=
actionBody
.
tmSelectType
;
if
(
tmSelectType
)
{
var
dbTm
=
itemResult
.
data
.
tmSelectType
;
var
tmKeys
=
Object
.
keys
(
tmSelectType
);
if
(
dbTm
&&
tmKeys
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
tmKeys
.
length
;
i
++
)
{
const
iKey
=
tmKeys
[
i
];
if
(
!
tmSelectType
[
iKey
])
{
tipsMsg
=
"修改失败,"
+
iKey
+
"不能为空,30030"
;
}
if
(
tmSelectType
[
iKey
]
&&
tmSelectType
[
iKey
]
!=
dbTm
[
iKey
])
{
itemResult
.
data
.
tmSelectType
[
iKey
]
=
tmSelectType
[
iKey
].
toString
();
}
}
}
}
this
.
putOrderDelivery
(
itemResult
.
data
,
actionBody
.
orderNo
);
this
.
putOrderDelivery
(
itemResult
.
data
,
actionBody
.
orderNo
);
delete
actionBody
[
"isGetContact"
];
delete
actionBody
[
"isGetContact"
];
actionBody
.
orderStatus
=
orderItem
.
orderStatus
;
actionBody
.
orderStatus
=
orderItem
.
orderStatus
;
...
@@ -1650,6 +1672,67 @@ class OrderInfoService extends ServiceBase {
...
@@ -1650,6 +1672,67 @@ class OrderInfoService extends ServiceBase {
}
}
return
system
.
getResultSuccess
(
resultParams
);
return
system
.
getResultSuccess
(
resultParams
);
}
}
async
opOrderPayCallBackChannel
(
parmas
,
appInfo
)
{
//操作订单付款回调---微信
var
item
=
await
this
.
dao
.
getItemStatusByOrderNo
(
parmas
.
orderNo
)
if
(
!
item
)
{
return
system
.
getResult
(
null
,
"order data is empty!"
);
}
if
(
item
.
orderStatus
>
1
)
{
return
system
.
getResult
(
null
,
"order status is pay!"
);
}
var
self
=
this
;
await
self
.
db
.
transaction
(
async
function
(
t
)
{
await
self
.
dao
.
updateByWhere
({
orderStatus
:
2
,
payTime
:
parmas
.
time_end
},
{
where
:
{
orderNo
:
parmas
.
orderNo
}
},
t
);
var
putFields
=
{
auditStatus
:
"tg"
,
accountType
:
parmas
.
pay_type
,
passTradeNo
:
parmas
.
transaction_id
||
""
,
//通知校验ID
payOrderNo
:
parmas
.
payOrderNo
||
""
,
//支付凭证流水单号,如:微信支付凭证单号--该交易在支付宝系统中的交易流水号。最短16位,最长64位。
busPayOrderCode
:
parmas
.
out_trade_no
||
""
,
//业务支付订单号
buyerOpenId
:
parmas
.
appid
||
""
,
//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
buyerAliLogonId
:
parmas
.
mch_id
||
""
,
//买家支付宝账号
updated_at
:
new
Date
(),
//该笔交易的买家付款时间。格式为yyyy-MM-dd HH:mm:ss。
notes
:
parmas
.
gmt_create
||
""
//该笔交易创建的时间。格式为yyyy-MM-dd HH:mm:ss。
};
await
self
.
orderReceiptVoucherDao
.
updateByWhere
(
putFields
,
{
where
:
{
sourceOrderNo
:
parmas
.
orderNo
}
},
t
);
var
orderLog
=
{
uapp_id
:
appInfo
.
uapp_id
,
sourceOrderNo
:
parmas
.
orderNo
,
opContent
:
"您成功支付了订单,请等待服务商服务"
,
isShow
:
1
};
await
self
.
flowlogDao
.
create
(
orderLog
,
t
);
var
moneyObj
=
{
uapp_id
:
appInfo
.
uapp_id
,
sourceOrderNo
:
parmas
.
orderNo
,
// 来源单号
channelUserId
:
item
.
channelUserId
,
ownerUserId
:
item
.
ownerUserId
,
accountType
:
parmas
.
pay_type
,
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
directionType
:
"sr"
,
//凭单类型,"sr": "收","zc": "支"
voucherDate
:
parmas
.
time_end
||
new
Date
(),
//new Date(),//凭单时间
recvAmount
:
item
.
totalSum
,
//收总额
sourceType
:
"orderinfo"
,
//来源类型 "orderinfo": "订单","expensevoucher": "费用单"
auditStatus
:
"tg"
,
//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
};
await
self
.
moneyJourneyDao
.
create
(
moneyObj
,
t
);
});
item
.
orderStatus
=
2
;
//已付款
var
resultParams
=
{
order_info
:
item
,
delivery_content
:
null
,
//包含订单联系人orderContact
product_info
:
null
};
var
deliveryInfoResult
=
await
this
.
getOrderDeliveryInfo
(
null
,
parmas
);
if
(
deliveryInfoResult
&&
deliveryInfoResult
.
status
==
0
)
{
resultParams
.
delivery_content
=
deliveryInfoResult
.
data
;
}
var
orderProductItem
=
await
this
.
orderproductDao
.
getItemInfoByOrderNo
(
parmas
.
orderNo
);
if
(
orderProductItem
)
{
resultParams
.
product_info
=
JSON
.
parse
(
orderProductItem
.
serviceItemSnapshot
);
}
return
system
.
getResultSuccess
(
resultParams
);
}
//-------------------------------服务商通知订单流程-------------end----------------
//-------------------------------服务商通知订单流程-------------end----------------
//商标方案确认
//商标方案确认
async
tmConfirm
(
pobj
)
{
async
tmConfirm
(
pobj
)
{
...
@@ -1773,5 +1856,16 @@ class OrderInfoService extends ServiceBase {
...
@@ -1773,5 +1856,16 @@ class OrderInfoService extends ServiceBase {
// 注意这里 如果没有返回值 则会在api.base报错,拿不到requestId
// 注意这里 如果没有返回值 则会在api.base报错,拿不到requestId
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
//智能选择、全类保护 尼斯类获取
async
getNclByCode
(
pobj
){
var
sql
=
"select `business_code`,`ncl_content` from b_business_ncl where business_code=:business_code LIMIT 1"
;
var
paramWhere
=
{
business_code
:
pobj
.
actionBody
.
businessCode
};
var
result
=
await
this
.
customQuery
(
sql
,
paramWhere
);
if
(
Object
.
keys
(
result
).
length
==
0
){
return
system
.
getResultFail
(
-
1
,
'find err'
);
}
return
system
.
getResult
(
result
[
0
].
ncl_content
);
}
}
}
module
.
exports
=
OrderInfoService
;
module
.
exports
=
OrderInfoService
;
\ No newline at end of file
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
bd8c7389
...
@@ -564,7 +564,7 @@ class NeedsolutionService extends ServiceBase {
...
@@ -564,7 +564,7 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
}
}
var
ns
=
await
this
.
dao
.
model
.
findAll
({
var
ns
=
await
this
.
dao
.
model
.
findAll
({
where
:
{
needNo
:
needinfo
.
needNo
,
createUserId
:
user
.
id
},
raw
:
true
,
where
:
{
needNo
:
needinfo
.
needNo
},
raw
:
true
,
attributes
:
[
"needNo"
,
"solutionNo"
,
"channelSolutionNo"
,
"orderNo"
,
"solutionContent"
,
"status"
,
"statusName"
]
attributes
:
[
"needNo"
,
"solutionNo"
,
"channelSolutionNo"
,
"orderNo"
,
"solutionContent"
,
"status"
,
"statusName"
]
});
});
return
system
.
getResultSuccess
(
ns
);
return
system
.
getResultSuccess
(
ns
);
...
...
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
View file @
bd8c7389
...
@@ -93,7 +93,7 @@ class AliyunQcService{
...
@@ -93,7 +93,7 @@ class AliyunQcService{
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
}
}
var
ns
=
await
this
.
needsolutionDao
.
model
.
findAll
({
var
ns
=
await
this
.
needsolutionDao
.
model
.
findAll
({
where
:
{
needNo
:
needinfo
.
needNo
,
createUserId
:
user
.
id
},
raw
:
true
,
where
:
{
needNo
:
needinfo
.
needNo
},
raw
:
true
,
attributes
:
[
"needNo"
,
"solutionNo"
,
"channelSolutionNo"
,
"orderNo"
,
"solutionContent"
,
"status"
,
"statusName"
]
attributes
:
[
"needNo"
,
"solutionNo"
,
"channelSolutionNo"
,
"orderNo"
,
"solutionContent"
,
"status"
,
"statusName"
]
});
});
return
system
.
getResultSuccess
(
ns
);
return
system
.
getResultSuccess
(
ns
);
...
...
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