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
080d2196
Commit
080d2196
authored
Dec 09, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
c01fa032
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
10 deletions
+32
-10
igirl-channel/app/base/api/impl/action/tmOrder.js
+11
-2
igirl-channel/app/base/db/impl/dbapp/appproductDao.js
+5
-0
igirl-channel/app/base/db/models/dbapp/appproduct.js
+1
-0
igirl-channel/app/base/db/models/dborder/order.js
+1
-0
igirl-channel/app/base/db/models/dborder/ordertmproduct.js
+1
-0
igirl-channel/app/base/service/impl/dborder/orderSve.js
+0
-0
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
+1
-0
igirl-channel/app/base/system.js
+10
-6
igirl-channel/app/base/utils/aliyunClient.js
+2
-2
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
080d2196
...
@@ -52,13 +52,22 @@ class TmOrderAPI extends APIBase {
...
@@ -52,13 +52,22 @@ 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"
,
"updateCustomerInfo"
,
"tmConfirm"
,
"updateTmInfo"
,
"updateNclInfo"
,
"updateContacts"
,
"updateCustomerInfo"
,
"updateCustomerInfo"
].
indexOf
(
action_type
)
>=
0
)
{
"updateCustomerInfo"
,
"addOrderAndDelivery"
].
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"
);
}
}
}
}
switch
(
action_type
)
{
switch
(
action_type
)
{
// sy
// sy
case
"updateOrderStatus"
:
//更新订单状态
opResult
=
await
this
.
orderSve
.
updateOrderStatus
(
action_body
,
req
);
break
;
case
"updateOrderPayStatus"
:
//更新订单付款状态
opResult
=
await
this
.
orderSve
.
updateOrderStatus
(
action_body
,
req
);
break
;
case
"addOrderAndDelivery"
:
//创建订单和交付单
opResult
=
await
this
.
orderSve
.
addOrderAndDelivery
(
action_body
,
pobj
,
req
);
break
;
case
"clearAllCache"
:
case
"clearAllCache"
:
await
this
.
cacheManager
[
"MagCache"
].
clearAll
();
await
this
.
cacheManager
[
"MagCache"
].
clearAll
();
opResult
=
system
.
getResultSuccess
(
null
,
"清理缓存成功"
);
opResult
=
system
.
getResultSuccess
(
null
,
"清理缓存成功"
);
...
@@ -186,7 +195,7 @@ class TmOrderAPI extends APIBase {
...
@@ -186,7 +195,7 @@ class TmOrderAPI extends APIBase {
}
}
break
;
break
;
case
"pushFqBusiness"
:
//推送商机到峰擎
case
"pushFqBusiness"
:
//推送商机到峰擎
opResult
=
await
this
.
orderSve
.
pushFqBusiness
(
action_body
,
pobj
,
req
);
opResult
=
await
this
.
orderSve
.
push
1688
FqBusiness
(
action_body
,
pobj
,
req
);
break
;
break
;
case
"getProductDetail"
:
//根据渠道产品码获取产品详情
case
"getProductDetail"
:
//根据渠道产品码获取产品详情
opResult
=
await
this
.
appProductSve
.
findByChannelItemCode
(
action_body
);
opResult
=
await
this
.
appProductSve
.
findByChannelItemCode
(
action_body
);
...
...
igirl-channel/app/base/db/impl/dbapp/appproductDao.js
View file @
080d2196
...
@@ -17,6 +17,8 @@ class AppProductDao extends Dao {
...
@@ -17,6 +17,8 @@ class AppProductDao extends Dao {
"picUrl"
,
// 产品图片地址
"picUrl"
,
// 产品图片地址
"channelItemCode"
,
// 渠道产品编码
"channelItemCode"
,
// 渠道产品编码
"channelItemName"
,
// 渠道产品名称
"channelItemName"
,
// 渠道产品名称
"serviceItemCode"
,
"pushServiceItemCode"
,
"status"
,
// 状态 0禁用 1启用
"status"
,
// 状态 0禁用 1启用
"verifyPrice"
,
// 是否验证价格 0不验证 1验证
"verifyPrice"
,
// 是否验证价格 0不验证 1验证
"proPrice"
,
// 产品价格
"proPrice"
,
// 产品价格
...
@@ -44,6 +46,8 @@ class AppProductDao extends Dao {
...
@@ -44,6 +46,8 @@ class AppProductDao extends Dao {
"picUrl"
,
// 产品图片地址
"picUrl"
,
// 产品图片地址
"channelItemCode"
,
// 渠道产品编码
"channelItemCode"
,
// 渠道产品编码
"channelItemName"
,
// 渠道产品名称
"channelItemName"
,
// 渠道产品名称
"serviceItemCode"
,
"pushServiceItemCode"
,
"status"
,
// 状态 0禁用 1启用
"status"
,
// 状态 0禁用 1启用
"verifyPrice"
,
// 是否验证价格 0不验证 1验证
"verifyPrice"
,
// 是否验证价格 0不验证 1验证
"proPrice"
,
// 产品价格
"proPrice"
,
// 产品价格
...
@@ -72,6 +76,7 @@ class AppProductDao extends Dao {
...
@@ -72,6 +76,7 @@ class AppProductDao extends Dao {
"channelItemCode"
,
// 渠道产品编码
"channelItemCode"
,
// 渠道产品编码
"channelItemName"
,
// 渠道产品名称
"channelItemName"
,
// 渠道产品名称
"serviceItemCode"
,
"serviceItemCode"
,
"pushServiceItemCode"
,
"deliveryUrl"
,
"deliveryUrl"
,
"status"
,
// 状态 0禁用 1启用
"status"
,
// 状态 0禁用 1启用
"verifyPrice"
,
// 是否验证价格 0不验证 1验证
"verifyPrice"
,
// 是否验证价格 0不验证 1验证
...
...
igirl-channel/app/base/db/models/dbapp/appproduct.js
View file @
080d2196
...
@@ -10,6 +10,7 @@ module.exports = (db, DataTypes) => {
...
@@ -10,6 +10,7 @@ module.exports = (db, DataTypes) => {
channelItemCode
:
DataTypes
.
STRING
(
100
),
// 渠道产品编码
channelItemCode
:
DataTypes
.
STRING
(
100
),
// 渠道产品编码
channelItemName
:
DataTypes
.
STRING
(
100
),
// 渠道产品名称
channelItemName
:
DataTypes
.
STRING
(
100
),
// 渠道产品名称
serviceItemCode
:
DataTypes
.
STRING
(
100
),
// 服务商产品编码
serviceItemCode
:
DataTypes
.
STRING
(
100
),
// 服务商产品编码
pushServiceItemCode
:
DataTypes
.
STRING
(
100
),
// 推送到服务商的产品编码
status
:
DataTypes
.
BOOLEAN
,
// 状态 0禁用 1启用
status
:
DataTypes
.
BOOLEAN
,
// 状态 0禁用 1启用
verifyPrice
:
DataTypes
.
BOOLEAN
,
// 是否验证价格 0不验证 1验证
verifyPrice
:
DataTypes
.
BOOLEAN
,
// 是否验证价格 0不验证 1验证
proPrice
:
DataTypes
.
DOUBLE
,
// 产品价格
proPrice
:
DataTypes
.
DOUBLE
,
// 产品价格
...
...
igirl-channel/app/base/db/models/dborder/order.js
View file @
080d2196
...
@@ -55,6 +55,7 @@ module.exports = (db, DataTypes) => {
...
@@ -55,6 +55,7 @@ module.exports = (db, DataTypes) => {
invoiceApplyStatus
:
DataTypes
.
STRING
(
10
),
// 发票状态:00: 未申请, 10: 已申请,20:已开票
invoiceApplyStatus
:
DataTypes
.
STRING
(
10
),
// 发票状态:00: 未申请, 10: 已申请,20:已开票
channelUserId
:
DataTypes
.
STRING
(
64
),
// 渠道用户ID
channelUserId
:
DataTypes
.
STRING
(
64
),
// 渠道用户ID
needNo
:
DataTypes
.
STRING
(
64
),
// 需求单号
needNo
:
DataTypes
.
STRING
(
64
),
// 需求单号
needNoOrderNo
:
DataTypes
.
STRING
(
64
),
// 需求订单号
sourceType
:
DataTypes
.
STRING
(
10
),
//来源类型:00订单,10需求需要用户确认方案
sourceType
:
DataTypes
.
STRING
(
10
),
//来源类型:00订单,10需求需要用户确认方案
picUrl
:
DataTypes
.
STRING
(
500
),
// 产品图片地址
picUrl
:
DataTypes
.
STRING
(
500
),
// 产品图片地址
productType_id
:
DataTypes
.
INTEGER
,
//产品类型Id
productType_id
:
DataTypes
.
INTEGER
,
//产品类型Id
...
...
igirl-channel/app/base/db/models/dborder/ordertmproduct.js
View file @
080d2196
...
@@ -50,6 +50,7 @@ module.exports = (db, DataTypes) => {
...
@@ -50,6 +50,7 @@ module.exports = (db, DataTypes) => {
channelServiceNo
:
DataTypes
.
STRING
(
64
),
//渠道服务单号
channelServiceNo
:
DataTypes
.
STRING
(
64
),
//渠道服务单号
channelOrderNo
:
DataTypes
.
STRING
(
1024
),
//渠道订单号列表,多个以,隔开
channelOrderNo
:
DataTypes
.
STRING
(
1024
),
//渠道订单号列表,多个以,隔开
needNo
:
DataTypes
.
STRING
(
64
),
//需求单号
needNo
:
DataTypes
.
STRING
(
64
),
//需求单号
needNoOrderNo
:
DataTypes
.
STRING
(
64
),
// 需求订单号
sourceType
:
DataTypes
.
STRING
(
10
),
//来源类型:00订单,10需求需要用户确认方案
sourceType
:
DataTypes
.
STRING
(
10
),
//来源类型:00订单,10需求需要用户确认方案
picUrl
:
DataTypes
.
STRING
(
500
),
//商标图样
picUrl
:
DataTypes
.
STRING
(
500
),
//商标图样
colorizedPicUrl
:
DataTypes
.
STRING
(
500
),
//商标彩色图样
colorizedPicUrl
:
DataTypes
.
STRING
(
500
),
//商标彩色图样
...
...
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
080d2196
This diff is collapsed.
Click to expand it.
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
View file @
080d2196
...
@@ -210,6 +210,7 @@ class OrderTmProductService extends ServiceBase {
...
@@ -210,6 +210,7 @@ class OrderTmProductService extends ServiceBase {
var
orderAmount
=
tm
;
var
orderAmount
=
tm
;
orderAmount
.
salesNum
=
tm
.
nclOneCodes
.
length
;
orderAmount
.
salesNum
=
tm
.
nclOneCodes
.
length
;
orderAmount
.
minitermNum
=
tm
.
nclCount
;
orderAmount
.
minitermNum
=
tm
.
nclCount
;
channelOrder
.
payStatus
=
"dfk"
;
var
orderResult
=
await
self
.
orderDao
.
addOrder
(
ordercode
,
orderType
,
user
,
app
,
productItem
,
channelOrder
,
channelUser
,
apply
,
orderAmount
,
t
);
var
orderResult
=
await
self
.
orderDao
.
addOrder
(
ordercode
,
orderType
,
user
,
app
,
productItem
,
channelOrder
,
channelUser
,
apply
,
orderAmount
,
t
);
if
(
orderResult
.
status
!=
0
)
{
if
(
orderResult
.
status
!=
0
)
{
return
orderResult
;
return
orderResult
;
...
...
igirl-channel/app/base/system.js
View file @
080d2196
...
@@ -141,11 +141,11 @@ class System {
...
@@ -141,11 +141,11 @@ class System {
var
bucketlist
=
notice_count
.
buckets
;
var
bucketlist
=
notice_count
.
buckets
;
var
bucklist
=
[];
var
bucklist
=
[];
bucketlist
.
forEach
(
function
(
d
)
{
bucketlist
.
forEach
(
function
(
d
)
{
var
notice_issue
=
d
.
key
;
var
notice_issue
=
d
.
key
;
var
date
=
d
.
date_max
.
value
;
var
date
=
d
.
date_max
.
value
;
var
data
=
{
var
data
=
{
notice_issue
:
notice_issue
,
notice_issue
:
notice_issue
,
date
:
date
date
:
date
}
}
bucklist
.
push
(
data
);
bucklist
.
push
(
data
);
})
})
...
@@ -200,7 +200,7 @@ class System {
...
@@ -200,7 +200,7 @@ class System {
var
objabspath
=
classpath
+
"/"
+
filename
+
".js"
;
var
objabspath
=
classpath
+
"/"
+
filename
+
".js"
;
if
(
System
.
objTable
[
objabspath
]
!=
null
)
{
if
(
System
.
objTable
[
objabspath
]
!=
null
)
{
console
.
log
(
objabspath
,
"get cached obj...."
);
console
.
log
(
objabspath
,
"get cached obj...."
);
return
System
.
objTable
[
objabspath
];
return
System
.
objTable
[
objabspath
];
}
else
{
}
else
{
console
.
log
(
"no cached..."
);
console
.
log
(
"no cached..."
);
...
@@ -309,4 +309,7 @@ System.signFail = 1300;
...
@@ -309,4 +309,7 @@ System.signFail = 1300;
//获取访问token失败
//获取访问token失败
System
.
getAppInfoFail
=
1130
;
System
.
getAppInfoFail
=
1130
;
//已经存在信息
System
.
existData
=
1400
;
module
.
exports
=
System
;
module
.
exports
=
System
;
\ No newline at end of file
igirl-channel/app/base/utils/aliyunClient.js
View file @
080d2196
...
@@ -2,8 +2,8 @@ const Client = require('aliyun-api-gateway').Client;
...
@@ -2,8 +2,8 @@ const Client = require('aliyun-api-gateway').Client;
var
RPCClient
=
require
(
'@alicloud/pop-core'
).
RPCClient
;
var
RPCClient
=
require
(
'@alicloud/pop-core'
).
RPCClient
;
//
const client = new Client('203756805', 'crkyej0xlmqa6bmvqijun6ltxparllyn');
const
client
=
new
Client
(
'203756805'
,
'crkyej0xlmqa6bmvqijun6ltxparllyn'
);
const
client
=
new
Client
(
'203763771'
,
'e5e2ytnn6nrkr9qnqk4w5e6z0xlhkznu'
);
// const client = new Client('203763771', 'e5e2ytnn6nrkr9qnqk4w5e6z0xlhkznu');//线上
class
aliyunClient
{
class
aliyunClient
{
constructor
()
{
constructor
()
{
// this.aliReqUrl = "https://aliapi.gongsibao.com/tm/springboard";
// this.aliReqUrl = "https://aliapi.gongsibao.com/tm/springboard";
...
...
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