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
e08a9709
Commit
e08a9709
authored
Dec 19, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
f8c0d6e6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
3 deletions
+51
-3
igirl-channel/app/base/api/impl/action/tmOrder.js
+7
-0
igirl-channel/app/base/service/impl/dborder/orderSve.js
+37
-2
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
+7
-1
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
e08a9709
...
...
@@ -59,6 +59,9 @@ class TmOrderAPI extends APIBase {
}
switch
(
action_type
)
{
// sy
case
"againPushFqBusiness"
:
//再次推送商机
opResult
=
await
this
.
orderSve
.
againPushFqBusiness
(
pobj
,
req
);
break
;
case
"updateOrderStatus"
:
//更新订单状态
opResult
=
await
this
.
orderSve
.
updateOrderStatus
(
action_body
,
pobj
,
req
);
break
;
...
...
@@ -145,6 +148,10 @@ class TmOrderAPI extends APIBase {
case
"getTmOrderList"
:
//商标交付列表
opResult
=
await
this
.
ordertmproductSve
.
getTmOrderList
(
action_body
,
pobj
,
req
);
break
;
case
"getTmOrderListAdmin"
:
//商标交付列表
action_body
.
getListType
=
"getTmOrderListAdmin"
;
opResult
=
await
this
.
ordertmproductSve
.
getTmOrderList
(
action_body
,
pobj
,
req
);
break
;
case
"getTmOrderInfo"
:
//商标交付信息
opResult
=
await
this
.
ordertmproductSve
.
getTmOrder
(
action_body
);
break
;
...
...
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
e08a9709
...
...
@@ -12,6 +12,8 @@ class OrderService extends ServiceBase {
this
.
receiptvoucherDao
=
system
.
getObject
(
"db.dborder.receiptvoucherDao"
);
this
.
customercontactsDao
=
system
.
getObject
(
"db.dborder.customercontactsDao"
);
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
fqReqUrl
=
"https://yunfuapi.gongsibao.com/crm/order/submit"
;
//线上域名
// this.fqReqUrl = "https://yunfuapi-dev.gongsibao.com/crm/order/submit";//dev域名
}
async
addOrderAndDelivery
(
action_body
,
pobj
,
req
)
{
...
...
@@ -635,8 +637,7 @@ class OrderService extends ServiceBase {
async
pushFqBusiness
(
pushType
,
item
,
pushServiceItemCode
,
pobj
,
req
)
{
//推送商机
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
null
;
var
reqUrl
=
"https://yunfuapi.gongsibao.com/crm/order/submit"
;
//线上域名
// var reqUrl = "https://yunfuapi-dev.gongsibao.com/crm/order/submit";//域名
var
reqUrl
=
this
.
fqReqUrl
;
try
{
var
body
=
{
...
...
@@ -678,5 +679,39 @@ class OrderService extends ServiceBase {
});
}
}
async
againPushFqBusiness
(
pobj
,
req
)
{
//再次推送商机
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
null
;
var
reqUrl
=
this
.
fqReqUrl
;
var
body
=
pobj
.
actionBody
;
try
{
rtn
=
await
rc
.
post
(
reqUrl
,
body
);
this
.
logCtl
.
info
({
appid
:
req
.
app
.
id
,
appkey
:
req
.
app
.
uappKey
,
requestId
:
req
.
requestId
||
""
,
op
:
"/igirl-channel/zhichan/igirl-channel/app/base/service/impl/dborder/orderSve/againPushFqBusiness"
,
content
:
"请求地址:"
+
reqUrl
+
",参数:"
+
JSON
.
stringify
(
body
)
+
",返回结果:"
+
JSON
.
stringify
(
rtn
),
clientIp
:
pobj
.
clientIp
,
optitle
:
"推送订单商机到FQ信息--again"
,
});
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
req
.
requestId
+
",requestId="
+
rtn
.
requestId
);
}
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
}
catch
(
e
)
{
//日志记录
this
.
logCtl
.
error
({
appid
:
req
.
app
.
id
,
appkey
:
req
.
app
.
uappKey
,
requestId
:
req
.
requestId
||
""
,
op
:
"/igirl-channel/zhichan/igirl-channel/app/base/service/impl/dborder/orderSve/againPushFqBusiness"
,
content
:
"error:"
+
e
.
stack
,
clientIp
:
pobj
.
clientIp
,
optitle
:
"推送订单商机到FQ出错--again"
,
});
}
}
}
module
.
exports
=
OrderService
;
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
View file @
e08a9709
...
...
@@ -574,8 +574,14 @@ class OrderTmProductService extends ServiceBase {
sqlCount
+=
" and o.orderPayStatus=:orderPayStatus"
;;
paramWhere
.
orderPayStatus
=
"yfk"
;
}
if
([
"syaify"
,
"jd_613f2fd04340f"
].
indexOf
(
req
.
user
.
channelUserId
)
<
0
)
{
if
(
req
.
user
)
{
if
(
action_body
.
getListType
&&
action_body
.
getListType
==
"getTmOrderListAdmin"
)
{
if
([
"syaify"
,
"jd_613f2fd04340f"
].
indexOf
(
req
.
user
.
channelUserId
)
<
0
)
{
sql
+=
" and tm.createuser_id=:createuser_id"
;
sqlCount
+=
" and tm.createuser_id=:createuser_id"
;
paramWhere
.
createuser_id
=
req
.
user
.
id
;
}
}
else
{
sql
+=
" and tm.createuser_id=:createuser_id"
;
sqlCount
+=
" and tm.createuser_id=:createuser_id"
;
paramWhere
.
createuser_id
=
req
.
user
.
id
;
...
...
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