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
1f8d0bbc
Commit
1f8d0bbc
authored
Feb 14, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
10be319b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
160 additions
and
4 deletions
+160
-4
center-order/app/base/api/api.base.js
+1
-1
center-order/app/base/api/impl/action/zcbusinesschanceApi.js
+45
-0
center-order/app/base/db/impl/dbneed/needinfoDao.js
+16
-0
center-order/app/base/db/metadata/apps/platform.js
+2
-0
center-order/app/base/db/models/dbneed/needinfo.js
+49
-0
center-order/app/base/service/impl/dbneed/needinfoSve.js
+44
-0
center-order/app/config/localsettings.js
+3
-3
No files found.
center-order/app/base/api/api.base.js
View file @
1f8d0bbc
const
system
=
require
(
"../system"
);
const
settings
=
require
(
"../../config/settings"
);
const
DocBase
=
require
(
"./doc.base"
);
//
const DocBase = require("./doc.base");
const
uuidv4
=
require
(
'uuid/v4'
);
const
md5
=
require
(
"MD5"
);
class
APIBase
{
...
...
center-order/app/base/api/impl/action/zcbusinesschanceApi.js
0 → 100644
View file @
1f8d0bbc
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
PaymentAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
needinfoSve
=
system
.
getObject
(
"service.dbneed.needinfoSve"
);
}
/**
* 接口跳转-POST请求
* actionProcess 执行的流程
* actionType 执行的类型
* actionBody 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
action_body
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
// sy
case
"needinfo2fq"
:
//pc端订单支付二维码生成
opResult
=
await
this
.
needinfoSve
.
needinfo2fq
(
pobj
);
break
;
// case "flowinfo"://pc端订单支付二维码生成
// opResult = await this.needinfoSve.flowinfo(needinfo);
// break;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
PaymentAPI
;
\ No newline at end of file
center-order/app/base/db/impl/dbneed/needinfoDao.js
0 → 100644
View file @
1f8d0bbc
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
NeedinfoDao
extends
Dao
{
constructor
(){
super
(
Dao
.
getModelName
(
NeedinfoDao
));
}
extraWhere
(
obj
,
w
){
if
(
obj
.
codepath
&&
obj
.
codepath
!=
""
){
if
(
obj
.
codepath
.
indexOf
(
"calculateprice"
)
>
0
){
w
[
"user_id"
]
=
obj
.
uid
;
}
}
return
w
;
}
}
module
.
exports
=
NeedinfoDao
;
center-order/app/base/db/metadata/apps/platform.js
View file @
1f8d0bbc
...
...
@@ -69,6 +69,7 @@ module.exports = {
//凭单类型
"direction_type"
:
{
"sr"
:
"收"
,
"zc"
:
"支"
},
"push_return_type"
:
{
"0"
:
"推送失败"
,
"1"
:
"推送成功"
},
"push_chance_type"
:
{
"wts"
:
"未推送"
,
"yts"
:
"已推送"
,
"ygj"
:
"已跟进"
,
"ycd"
:
"已成单"
},
},
}
}
\ No newline at end of file
center-order/app/base/db/models/dbneed/needinfo.js
0 → 100644
View file @
1f8d0bbc
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"needinfo"
,
{
uapp_id
:
DataTypes
.
INTEGER
,
needNo
:
DataTypes
.
STRING
,
channelUserId
:
DataTypes
.
INTEGER
,
//发布者id
publisherName
:
DataTypes
.
STRING
,
//发布者姓名
publisherOnlyCode
:
DataTypes
.
STRING
(
50
),
//发布者唯一码
publishContent
:
DataTypes
.
STRING
,
//发布内容
publishMobile
:
DataTypes
.
STRING
,
//发布者手机号
followManUserId
:
DataTypes
.
INTEGER
,
//跟进人id
followManName
:
DataTypes
.
STRING
,
//跟进人姓名
followManMobile
:
DataTypes
.
STRING
,
//跟进人手机号(合伙人)
followManOnlyCode
:
DataTypes
.
STRING
(
50
),
//跟进者唯一码
followContent
:
DataTypes
.
STRING
,
//跟进内容
chanceType_code
:
DataTypes
.
STRING
,
// 商机类型
productOneType_id
:
DataTypes
.
STRING
,
//产品大类Id
productType_id
:
DataTypes
.
STRING
,
//产品类型Id
notes
:
DataTypes
.
STRING
,
//备注
disposeNotes
:
DataTypes
.
STRING
,
//处理的备注
status
:{
//wts未推送,yts已推送,ygj已跟进,ycd已成单
type
:
DataTypes
.
ENUM
,
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
push_chance_type
),
set
:
function
(
val
){
this
.
setDataValue
(
"chanceType"
,
val
);
this
.
setDataValue
(
"chanceTypeName"
,
uiconfig
.
config
.
pdict
.
push_chance_type
[
val
]);
}
},
city
:
DataTypes
.
STRING
(
50
),
// 城市
province
:
DataTypes
.
STRING
(
50
),
// 省份
},{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'n_need_info'
,
validate
:
{
},
indexes
:[
]
});
}
center-order/app/base/service/impl/dbneed/needinfoSve.js
0 → 100644
View file @
1f8d0bbc
const
uuidv4
=
require
(
'uuid/v4'
);
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
NeedinfoService
extends
ServiceBase
{
constructor
()
{
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
NeedinfoService
));
this
.
execlient
=
system
.
getObject
(
"util.execClient"
);
}
async
needinfo2fq
(
pobj
)
{
pobj
.
actionBody
.
needNo
=
await
this
.
getBusUid
(
"n"
);
pobj
.
actionBody
.
uapp_id
=
pobj
.
appInfo
.
id
;
var
needinfo
=
await
this
.
dao
.
create
(
pobj
.
actionBody
);
var
pobj
=
{
"idempotentId"
:
needinfo
.
needNo
,
"idempotentSource"
:
needinfo
.
chanceType_code
,
"idempotentSourceName"
:
pobj
.
appInfo
.
app_name
+
"_"
+
pobj
.
actionBody
.
chanceTypeName
,
"phone"
:
needinfo
.
publishMobile
,
"remark"
:
needinfo
.
notes
,
"customerName"
:
needinfo
.
publishName
};
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
rc
.
post
(
"https://yunfuapi-dev.gongsibao.com/crm/opportunity/submit"
,
pobj
);
console
.
log
(
rtn
)
return
system
.
getResultSuccess
();
// var opResultstr = await this.execlient.execPost(pobj, "https://yunfuapi-dev.gongsibao.com/crm/opportunity/submit");
// opResult = JSON.parse(opResultstr.stdout)
// if (opResultstr) {
// return system.getResultSuccess();
// }
}
async
flowinfo
(
obj
)
{
}
}
module
.
exports
=
NeedinfoService
;
var
a
=
new
NeedinfoService
();
a
.
needinfo2fq
();
\ No newline at end of file
center-order/app/config/localsettings.js
View file @
1f8d0bbc
...
...
@@ -6,12 +6,12 @@ var settings={
db
:
8
,
},
database
:{
dbname
:
"center_
channel
"
,
dbname
:
"center_
order
"
,
user
:
"write"
,
password
:
"write"
,
config
:
{
host
:
'
192.168.18.237
'
,
port
:
3306
,
host
:
'
43.247.184.35
'
,
port
:
8899
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
...
...
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