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
71200297
Commit
71200297
authored
Dec 14, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
4093ad78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
3 deletions
+47
-3
igirl-channel/app/base/api/impl/action/tmOrder.js
+7
-1
igirl-channel/app/base/db/impl/dborder/ordertmproductDao.js
+34
-0
igirl-channel/app/base/service/impl/dborder/orderSve.js
+6
-2
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
71200297
...
@@ -52,7 +52,7 @@ class TmOrderAPI extends APIBase {
...
@@ -52,7 +52,7 @@ class TmOrderAPI extends APIBase {
var
opResult
=
null
;
var
opResult
=
null
;
if
([
"subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
if
([
"subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
"tmConfirm"
,
"updateTmInfo"
,
"updateNclInfo"
,
"updateContacts"
,
"tmConfirm"
,
"updateTmInfo"
,
"updateNclInfo"
,
"updateContacts"
,
"updateCustomerInfo"
,
"addOrderAndDelivery"
].
indexOf
(
action_type
)
>=
0
)
{
"updateCustomerInfo"
,
"addOrderAndDelivery"
,
"updateOrderPayStatus"
].
indexOf
(
action_type
)
>=
0
)
{
if
(
!
action_body
.
channelUserId
)
{
if
(
!
action_body
.
channelUserId
)
{
return
system
.
getResult
(
null
,
"verify channelUserId is not empty"
);
return
system
.
getResult
(
null
,
"verify channelUserId is not empty"
);
}
}
...
@@ -64,6 +64,11 @@ class TmOrderAPI extends APIBase {
...
@@ -64,6 +64,11 @@ class TmOrderAPI extends APIBase {
break
;
break
;
case
"updateOrderPayStatus"
:
//更新订单付款状态
case
"updateOrderPayStatus"
:
//更新订单付款状态
opResult
=
await
this
.
orderSve
.
updateOrderPayStatus
(
action_body
,
pobj
,
req
);
opResult
=
await
this
.
orderSve
.
updateOrderPayStatus
(
action_body
,
pobj
,
req
);
if
(
opResult
.
status
==
0
)
{
pobj
.
actionBody
[
"deliveryOrderNo"
]
=
opResult
.
data
.
deliveryOrderNo
;
var
url
=
this
.
pushFqbossDataUrl
+
"api/channelaccessApi/updateChannelPayStatus"
;
await
this
.
pushData2
(
opResult
,
req
,
pobj
,
url
);
}
break
;
break
;
case
"addOrderAndDelivery"
:
//创建订单和交付单
case
"addOrderAndDelivery"
:
//创建订单和交付单
opResult
=
await
this
.
orderSve
.
addOrderAndDelivery
(
action_body
,
pobj
,
req
);
opResult
=
await
this
.
orderSve
.
addOrderAndDelivery
(
action_body
,
pobj
,
req
);
...
@@ -250,6 +255,7 @@ class TmOrderAPI extends APIBase {
...
@@ -250,6 +255,7 @@ class TmOrderAPI extends APIBase {
var
user
=
obj
.
user
;
var
user
=
obj
.
user
;
obj
[
"channelUserId"
]
=
obj
.
channelUserId
;
obj
[
"channelUserId"
]
=
obj
.
channelUserId
;
obj
[
"channelCode"
]
=
pobj
.
actionProcess
;
obj
[
"channelCode"
]
=
pobj
.
actionProcess
;
obj
[
"appid"
]
=
"2e787bbaacda4c6488b9fae58fff30ba"
;
var
rtn
=
null
;
var
rtn
=
null
;
try
{
try
{
var
requestId
=
opResult
.
requestId
||
req
.
requestId
;
var
requestId
=
opResult
.
requestId
||
req
.
requestId
;
...
...
igirl-channel/app/base/db/impl/dborder/ordertmproductDao.js
View file @
71200297
...
@@ -21,6 +21,40 @@ class OrderTmProductDao extends Dao {
...
@@ -21,6 +21,40 @@ class OrderTmProductDao extends Dao {
raw
:
true
raw
:
true
});
});
}
}
async
getItemByNeedNoOrderNo
(
needNoOrderNo
,
appId
,
t
)
{
var
sqlWhere
=
{
where
:
{
needNoOrderNo
:
needNoOrderNo
,
app_id
:
appId
},
raw
:
true
};
if
(
t
)
{
sqlWhere
.
transaction
=
t
;
}
sqlWhere
.
attributes
=
[
"id"
,
"deliveryOrderNo"
,
"needNo"
,
"sourceOrderNo"
,
"tmName"
,
"tmType"
,
"tmFormType"
,
"nclOneCodes"
,
"deliveryStatus"
,
"picUrl"
,
"colorizedPicUrl"
,
"sywjUrl"
,
"gzwtsUrl"
,
"nclCount"
,
"smwjUrl"
,
"updateuser_id"
,
"updateuser"
,
"notes"
,
"nclOneCount"
];
return
this
.
model
.
findOne
(
sqlWhere
);
}
async
getItemByChannelServiceNo
(
channelServiceNo
,
appId
,
t
)
{
async
getItemByChannelServiceNo
(
channelServiceNo
,
appId
,
t
)
{
var
sqlWhere
=
{
var
sqlWhere
=
{
where
:
{
where
:
{
...
...
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
71200297
...
@@ -128,10 +128,14 @@ class OrderService extends ServiceBase {
...
@@ -128,10 +128,14 @@ class OrderService extends ServiceBase {
async
updateOrderPayStatus
(
action_body
,
pobj
,
req
)
{
async
updateOrderPayStatus
(
action_body
,
pobj
,
req
)
{
var
payStatus
=
action_body
.
payStatus
||
"dfk"
;
var
payStatus
=
action_body
.
payStatus
||
"dfk"
;
var
self
=
this
;
var
self
=
this
;
var
result
=
await
self
.
ordertmproductDao
.
getItemByNeedNoOrderNo
(
action_body
.
needNoOrderNo
,
req
.
app
.
id
,
t
);
if
(
result
)
{
return
system
.
getResult
(
null
,
"data is empty"
);
}
return
await
this
.
db
.
transaction
(
async
function
(
t
)
{
return
await
this
.
db
.
transaction
(
async
function
(
t
)
{
await
self
.
dao
.
updateByWhere
({
orderPayStatus
:
payStatus
,
buyerMoblie
:
action_body
.
buyerMoblie
||
""
},
{
where
:
{
needNoOrderNo
:
action_body
.
needNoOrderNo
,
app_id
:
req
.
app
.
id
}
},
t
);
await
self
.
dao
.
updateByWhere
({
orderPayStatus
:
payStatus
,
buyerMoblie
:
action_body
.
buyerMoblie
||
""
},
{
where
:
{
needNoOrderNo
:
action_body
.
needNoOrderNo
,
app_id
:
req
.
app
.
id
}
},
t
);
await
self
.
ordertmproductDao
.
updateByWhere
({
payStatus
:
payStatus
},
{
where
:
{
needNoOrderNo
:
action_body
.
needNoOrderNo
,
app_id
:
req
.
app
.
id
}
},
t
);
await
self
.
ordertmproductDao
.
updateByWhere
({
payStatus
:
payStatus
},
{
where
:
{
needNoOrderNo
:
action_body
.
needNoOrderNo
,
app_id
:
req
.
app
.
id
}
},
t
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
(
{
deliveryOrderNo
:
result
.
data
.
deliveryOrderNo
}
);
});
});
}
}
async
op1688ChannelPushOrder
(
action_body
,
pobj
,
req
)
{
async
op1688ChannelPushOrder
(
action_body
,
pobj
,
req
)
{
...
@@ -623,7 +627,7 @@ class OrderService extends ServiceBase {
...
@@ -623,7 +627,7 @@ class OrderService extends ServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} req
* @param {*} req
*/
*/
async
pushFqBusiness
(
pushType
,
item
,
pushServiceItemCode
,
pobj
,
req
)
{
async
pushFqBusiness
(
pushType
,
item
,
pushServiceItemCode
,
pobj
,
req
)
{
//推送商机
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
null
;
var
rtn
=
null
;
// var reqUrl = "https://yunfuapi.gongsibao.com/crm/order/submit";//线上域名
// var reqUrl = "https://yunfuapi.gongsibao.com/crm/order/submit";//线上域名
...
...
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