Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
方斌
51business
Commits
20d975ea
Commit
20d975ea
authored
Jun 13, 2019
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addd
parent
c2c15585
Pipeline
#8870
passed with stage
in 4 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
answer.js
app/controller/house/v2/answer.js
+1
-1
answer_like.js
app/model/realestate/answer_like.js
+1
-1
hot_question_answer.js
app/model/realestate/hot_question_answer.js
+1
-1
hot_question_put.js
app/model/realestate/hot_question_put.js
+1
-1
hot_question_answer.js
app/service/house/v2/hot_question_answer.js
+3
-3
hot_question_put.js
app/service/house/v2/hot_question_put.js
+1
-1
No files found.
app/controller/house/v2/answer.js
View file @
20d975ea
...
@@ -12,7 +12,7 @@ class AnswerController extends Controller {
...
@@ -12,7 +12,7 @@ class AnswerController extends Controller {
let
inputParams
=
ctx
.
request
.
body
;
let
inputParams
=
ctx
.
request
.
body
;
const
rule
=
{
const
rule
=
{
answer
:
{
type
:
'string'
,
required
:
true
},
answer
:
{
type
:
'string'
,
required
:
true
},
id
:
{
type
:
'integer'
,
required
:
true
},
question_
id
:
{
type
:
'integer'
,
required
:
true
},
city_code
:
{
type
:
'string'
,
required
:
true
},
city_code
:
{
type
:
'string'
,
required
:
true
},
};
};
ctx
.
validate
(
rule
,
inputParams
);
ctx
.
validate
(
rule
,
inputParams
);
...
...
app/model/realestate/answer_like.js
View file @
20d975ea
...
@@ -68,7 +68,7 @@ module.exports = app => {
...
@@ -68,7 +68,7 @@ module.exports = app => {
AnswerLike
.
one
=
async
(
data
)
=>
{
AnswerLike
.
one
=
async
(
data
)
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
return
await
SearchHistory
.
findOne
({
return
await
AnswerLike
.
findOne
({
attributes
:
attributes
,
attributes
:
attributes
,
where
:
where
,
where
:
where
,
});
});
...
...
app/model/realestate/hot_question_answer.js
View file @
20d975ea
...
@@ -72,7 +72,7 @@ module.exports = app => {
...
@@ -72,7 +72,7 @@ module.exports = app => {
HotQuestionAnswer
.
one
=
async
(
data
)
=>
{
HotQuestionAnswer
.
one
=
async
(
data
)
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
return
await
SearchHistory
.
findOne
({
return
await
HotQuestionAnswer
.
findOne
({
attributes
:
attributes
,
attributes
:
attributes
,
where
:
where
,
where
:
where
,
});
});
...
...
app/model/realestate/hot_question_put.js
View file @
20d975ea
...
@@ -68,7 +68,7 @@ module.exports = app => {
...
@@ -68,7 +68,7 @@ module.exports = app => {
HotQuestionPut
.
one
=
async
(
data
)
=>
{
HotQuestionPut
.
one
=
async
(
data
)
=>
{
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
attributes
=
data
.
attributes
?
data
.
attributes
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
const
where
=
data
.
where
?
data
.
where
:
{};
return
await
SearchHistory
.
findOne
({
return
await
HotQuestionPut
.
findOne
({
attributes
:
attributes
,
attributes
:
attributes
,
where
:
where
,
where
:
where
,
});
});
...
...
app/service/house/v2/hot_question_answer.js
View file @
20d975ea
...
@@ -19,7 +19,7 @@ class HotQuestionAnswerService extends Service {
...
@@ -19,7 +19,7 @@ class HotQuestionAnswerService extends Service {
app_type_id
:
ctx
.
appTypeId
,
app_type_id
:
ctx
.
appTypeId
,
question_id
:
inputParams
.
question_id
,
question_id
:
inputParams
.
question_id
,
answer
:
inputParams
.
answer
,
answer
:
inputParams
.
answer
,
city
:
inputParams
.
city
,
city
:
inputParams
.
city
_code
,
status
:
'wait'
,
status
:
'wait'
,
};
};
let
retId
=
await
ctx
.
realestateModel
.
HotQuestionAnswer
.
add
(
data
);
let
retId
=
await
ctx
.
realestateModel
.
HotQuestionAnswer
.
add
(
data
);
...
@@ -36,7 +36,7 @@ class HotQuestionAnswerService extends Service {
...
@@ -36,7 +36,7 @@ class HotQuestionAnswerService extends Service {
page
:
condition
.
page
||
1
,
page
:
condition
.
page
||
1
,
limit
:
condition
.
limit
||
10
,
limit
:
condition
.
limit
||
10
,
where
:
{
where
:
{
question_id
:
Number
(
condition
.
id
),
question_id
:
Number
(
condition
.
question_
id
),
status
:
'pass'
,
status
:
'pass'
,
},
},
order
:
[[
'created_at'
,
'desc'
]]
order
:
[[
'created_at'
,
'desc'
]]
...
@@ -46,7 +46,7 @@ class HotQuestionAnswerService extends Service {
...
@@ -46,7 +46,7 @@ class HotQuestionAnswerService extends Service {
for
(
let
i
in
res
)
{
for
(
let
i
in
res
)
{
taskList
[
i
]
=
this
.
formatAnswer
(
res
[
i
]);
taskList
[
i
]
=
this
.
formatAnswer
(
res
[
i
]);
}
}
retList
=
await
Promise
.
all
(
taskList
).
then
(
result
=>
{
let
retList
=
await
Promise
.
all
(
taskList
).
then
(
result
=>
{
return
result
;
return
result
;
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
ctx
.
failed
(
error
);
ctx
.
failed
(
error
);
...
...
app/service/house/v2/hot_question_put.js
View file @
20d975ea
...
@@ -73,7 +73,7 @@ class HotQuestionPutService extends Service {
...
@@ -73,7 +73,7 @@ class HotQuestionPutService extends Service {
limit
:
Number
(
condition
.
limit
)
||
10
,
limit
:
Number
(
condition
.
limit
)
||
10
,
question_id
:
Number
(
condition
.
id
),
question_id
:
Number
(
condition
.
id
),
}
}
let
answerLsit
=
await
ctx
.
service
.
house
.
v2
.
H
otQuestionAnswer
.
answerList
(
answerFliter
);
let
answerLsit
=
await
ctx
.
service
.
house
.
v2
.
h
otQuestionAnswer
.
answerList
(
answerFliter
);
let
ret
=
{
let
ret
=
{
question
:
question
.
question
,
question
:
question
.
question
,
answerList
:
answerLsit
answerList
:
answerLsit
...
...
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