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
d8157718
Commit
d8157718
authored
Feb 10, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
1a62a92f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
52 deletions
+45
-52
center-channel/app/base/api/impl/action/product.js
+4
-7
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+1
-0
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
+13
-18
center-channel/app/config/localsettings.js
+26
-26
center-channel/app/config/routes/api.js
+1
-1
No files found.
center-channel/app/base/api/impl/action/product.js
View file @
d8157718
...
@@ -25,14 +25,11 @@ class ProductAPI extends APIBase {
...
@@ -25,14 +25,11 @@ class ProductAPI extends APIBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"get
CAProductListByTypeOneCode"
:
//获取产品列表(根据产品一类编码获取) ---应用中心
case
"get
ProductList"
:
//通过产品类别编码路径获取产品列表
opResult
=
await
this
.
utilsProductSve
.
findByTypeOneCode
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsProductSve
.
getProductList
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getCAProductListByTypeCode"
:
//获取产品列表(根据父类产品编码获取) ---应用中心
case
"getProductDetail"
:
//根据渠道产品编码获取产品详情
opResult
=
await
this
.
utilsProductSve
.
findByTypeCode
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsProductSve
.
getProductDetail
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getCAProductDetail"
:
//根据渠道产品码获取产品详情 ---应用中心
opResult
=
await
this
.
utilsProductSve
.
getProductDetailByCode
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
d8157718
...
@@ -8,6 +8,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -8,6 +8,7 @@ class UtilsOrderService extends AppServiceBase {
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
};
};
async
addOrder
(
pobj
,
req
)
{
async
addOrder
(
pobj
,
req
)
{
var
url
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
url
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
return
result
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
View file @
d8157718
...
@@ -8,33 +8,27 @@ class UtilsProductSve extends AppServiceBase {
...
@@ -8,33 +8,27 @@ class UtilsProductSve extends AppServiceBase {
}
}
//--------------------------------应用中心获取产品信息-start-----------------------------------------------------
//--------------------------------应用中心获取产品信息-start-----------------------------------------------------
/**
/**
* 根据产品类型码获取产品列表
* 通过产品类别编码路径获取产品列表
* @param {*} actionBody
* @param {*} pobj
*/
* @param {*} actionBody pathCode 为类别编码路径,一级类下产品列表 sbfu,二级类下产品列表sbfu/sbzc
async
findByTypeCode
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
typeCode
)
{
return
system
.
getResult
(
null
,
"actionBody.typeCode can not be empty"
);
}
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
/**
* 根据产品类型码获取产品列表
* @param {*} actionBody
*/
*/
async
findByTypeOneCode
(
pobj
,
actionBody
)
{
async
getProductList
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
typeOne
Code
)
{
if
(
!
actionBody
.
path
Code
)
{
return
system
.
getResult
(
null
,
"actionBody.
typeOne
Code can not be empty"
);
return
system
.
getResult
(
null
,
"actionBody.
path
Code can not be empty"
);
}
}
pobj
.
actionBody
.
pathCode
=
"/"
+
actionBody
.
pathCode
+
"/"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
}
/**
/**
* 获取产品详情
* 获取产品详情
* @param {*} obj
* @param {*} pobj
* @param {*} actionBody channelItemCode 渠道产品编码
*/
*/
async
getProductDetail
ByCode
(
pobj
,
actionBody
)
{
async
getProductDetail
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
channelItemCode
)
{
if
(
!
actionBody
.
channelItemCode
)
{
return
system
.
getResult
(
null
,
"actionBody.channelItemCode can not be empty"
);
return
system
.
getResult
(
null
,
"actionBody.channelItemCode can not be empty"
);
}
}
...
@@ -46,3 +40,4 @@ class UtilsProductSve extends AppServiceBase {
...
@@ -46,3 +40,4 @@ class UtilsProductSve extends AppServiceBase {
}
}
module
.
exports
=
UtilsProductSve
;
module
.
exports
=
UtilsProductSve
;
center-channel/app/config/localsettings.js
View file @
d8157718
var
settings
=
{
var
settings
=
{
redis
:{
redis
:
{
host
:
"43.247.184.32"
,
host
:
"43.247.184.32"
,
port
:
8967
,
port
:
8967
,
password
:
"Gongsibao2018"
,
password
:
"Gongsibao2018"
,
db
:
8
,
db
:
8
,
},
},
database
:{
database
:
{
dbname
:
"igirl_api"
,
dbname
:
"igirl_api"
,
user
:
"
write
"
,
user
:
"
root
"
,
password
:
"
write
"
,
password
:
"
root
"
,
config
:
{
config
:
{
host
:
'
43.247.184
.35'
,
host
:
'
121.36.3
.35'
,
port
:
8899
,
port
:
3306
,
dialect
:
'mysql'
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
operatorsAliases
:
false
,
pool
:
{
pool
:
{
max
:
5
,
max
:
5
,
min
:
0
,
min
:
0
,
acquire
:
90000000
,
acquire
:
90000000
,
idle
:
1000000
idle
:
1000000
},
},
debug
:
false
,
debug
:
false
,
dialectOptions
:
{
dialectOptions
:
{
requestTimeout
:
999999
,
requestTimeout
:
999999
,
// instanceName:'DEV'
// instanceName:'DEV'
}
//设置MSSQL超时时间
}
//设置MSSQL超时时间
}
}
},
},
reqEsDevUrl
:
"http://192.168.4.249:9200/"
,
reqEsDevUrl
:
"http://192.168.4.249:9200/"
,
reqHomePageDevUrl
:
"http://zcchannel.apps.com:4003/"
,
reqHomePageDevUrl
:
"http://zcchannel.apps.com:4003/"
,
reqAuthUrl
:
"http://sj.app.com:4002/auth"
reqAuthUrl
:
"http://sj.app.com:4002/auth"
};
};
module
.
exports
=
settings
;
module
.
exports
=
settings
;
center-channel/app/config/routes/api.js
View file @
d8157718
...
@@ -39,7 +39,7 @@ module.exports = function (app) {
...
@@ -39,7 +39,7 @@ module.exports = function (app) {
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
var
lst
=
[
"
subTm
Order"
,
"getTmOrderList"
,
"
add
Order"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
"tmConfirm"
,
"updateTmInfo"
,
"tmConfirm"
,
"updateTmInfo"
,
...
...
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