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
5c41e79f
Commit
5c41e79f
authored
Mar 18, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
dead33de
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
20 deletions
+99
-20
center-order/app/base/api/impl/action/need.js
+51
-0
center-order/app/base/db/impl/dbneed/needinfoDao.js
+36
-12
center-order/app/base/service/impl/dbneed/needinfoSve.js
+10
-6
center-order/提示编码使用
+2
-2
No files found.
center-order/app/base/api/impl/action/need.js
0 → 100644
View file @
5c41e79f
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
IcAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
needinfoSve
=
system
.
getObject
(
"service.dbneed.needinfoSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
if
(
pobj
.
actionType
==
'getPolicyNeedList'
||
pobj
.
actionType
==
'submitPolicyNeedNotes'
)
{
if
(
!
pobj
.
userInfo
)
{
return
system
.
getResult
(
system
.
noLogin
,
"user no login!"
);
}
if
(
!
pobj
.
appInfo
)
{
return
system
.
getResult
(
system
.
noLogin
,
"app is null!"
);
}
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"submitNeed"
:
//提交需求
opResult
=
await
this
.
needinfoSve
.
submitNeed
(
pobj
);
break
;
case
"getItemByNeedNo"
:
//获取需求详情
opResult
=
await
this
.
needinfoSve
.
getItemByNeedNo
(
pobj
);
break
;
case
"needClose"
:
//需求关闭
opResult
=
await
this
.
needinfoSve
.
needClose
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
IcAPI
;
\ No newline at end of file
center-order/app/base/db/impl/dbneed/needinfoDao.js
View file @
5c41e79f
const
system
=
require
(
"../../../system"
);
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
class
NeedinfoDao
extends
Dao
{
class
NeedinfoDao
extends
Dao
{
constructor
(){
constructor
()
{
super
(
Dao
.
getModelName
(
NeedinfoDao
));
super
(
Dao
.
getModelName
(
NeedinfoDao
));
}
}
extraWhere
(
obj
,
w
){
async
getItemByNeedNo
(
needNo
)
{
if
(
obj
.
codepath
&&
obj
.
codepath
!=
""
){
return
await
this
.
model
.
findOne
({
if
(
obj
.
codepath
.
indexOf
(
"calculateprice"
)
>
0
){
where
:
{
w
[
"user_id"
]
=
obj
.
uid
;
needNo
:
needNo
}
},
}
attributes
:
[
return
w
;
"id"
,
"uapp_id"
,
"needNo"
,
"channelNeedNo"
,
"channelUserId"
,
"followManUserId"
,
"followManMobile"
,
"city"
,
"province"
,
"publishContent"
,
"publishName"
,
"publishMobile"
,
"notes"
,
"followContent"
,
"disposeNotes"
,
"status"
,
"typeCode"
,
"typeName"
,
"channelTypeCode"
,
"channelTypeName"
,
"publisherOnlyCode"
,
"followManName"
,
"followManOnlyCode"
],
raw
:
true
});
}
}
}
}
module
.
exports
=
NeedinfoDao
;
module
.
exports
=
NeedinfoDao
;
center-order/app/base/service/impl/dbneed/needinfoSve.js
View file @
5c41e79f
...
@@ -7,8 +7,12 @@ class NeedinfoService extends ServiceBase {
...
@@ -7,8 +7,12 @@ class NeedinfoService extends ServiceBase {
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
NeedinfoService
));
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
NeedinfoService
));
this
.
execlient
=
system
.
getObject
(
"util.execClient"
);
this
.
execlient
=
system
.
getObject
(
"util.execClient"
);
}
}
async
getItemByNeedNo
(
pobj
){
async
getItemByNeedNo
(
pobj
)
{
var
item
=
await
this
.
dao
.
getItemByNeedNo
(
pobj
.
actionBody
.
needNo
);
if
(
!
item
)
{
return
system
.
getResult
(
null
,
"需求数据为空,30210"
);
}
return
system
.
getResultSuccess
(
item
);
}
}
async
needinfo2fq
(
pobj
)
{
async
needinfo2fq
(
pobj
)
{
pobj
.
actionBody
.
needNo
=
await
this
.
getBusUid
(
"n"
);
pobj
.
actionBody
.
needNo
=
await
this
.
getBusUid
(
"n"
);
...
@@ -41,7 +45,7 @@ class NeedinfoService extends ServiceBase {
...
@@ -41,7 +45,7 @@ class NeedinfoService extends ServiceBase {
// area
// area
// type
// type
// ext
// ext
async
createicneedinfo
(
pobj
,
actionBody
)
{
async
submitNeed
(
pobj
,
actionBody
)
{
var
needNo
=
await
this
.
getBusUid
(
"n"
);
var
needNo
=
await
this
.
getBusUid
(
"n"
);
if
(
actionBody
.
intentionBizId
)
{
if
(
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"intentionBizId不能为空"
);
return
system
.
getResult
(
null
,
"intentionBizId不能为空"
);
...
@@ -67,15 +71,15 @@ class NeedinfoService extends ServiceBase {
...
@@ -67,15 +71,15 @@ class NeedinfoService extends ServiceBase {
return
await
this
.
dao
.
create
(
nobj
);
return
await
this
.
dao
.
create
(
nobj
);
}
}
async
solution
Close
(
pobj
)
{
async
need
Close
(
pobj
)
{
if
(
actionBody
.
intentionBizId
)
{
if
(
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"intentionBizId不能为空"
);
return
system
.
getResult
(
null
,
"intentionBizId不能为空"
);
}
}
var
needinfo
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
intentionBizId
});
var
needinfo
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
intentionBizId
});
needinfo
.
status
=
"ygb"
;
needinfo
.
status
=
"ygb"
;
var
self
=
this
;
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
await
self
.
update
(
needinfo
,
t
);
await
self
.
update
(
needinfo
,
t
);
var
needsolutioninfo
=
await
self
.
needsolutionDao
.
findOne
({
channelNeedNo
:
pobj
.
actionBody
.
intentionBizId
},
t
)
var
needsolutioninfo
=
await
self
.
needsolutionDao
.
findOne
({
channelNeedNo
:
pobj
.
actionBody
.
intentionBizId
},
t
)
needsolutioninfo
.
status
=
"yzf"
;
needsolutioninfo
.
status
=
"yzf"
;
await
self
.
needsolutionDao
.
update
(
needsolutioninfo
,
t
);
await
self
.
needsolutionDao
.
update
(
needsolutioninfo
,
t
);
...
...
center-order/提示编码使用
View file @
5c41e79f
已经使用的
编码汇总:
已经使用的
编码汇总:
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
30180
30180
30190
30190
30200
30200
30210
========================================================
========================================================
...
...
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