Commit ecf80c69 authored by Hsinli's avatar Hsinli

add app

parent 62aba897
Pipeline #9674 passed with stage
in 4 seconds
...@@ -19,6 +19,14 @@ module.exports = app => { ...@@ -19,6 +19,14 @@ module.exports = app => {
type: STRING, type: STRING,
allowNull: true allowNull: true
}, },
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
connect_id: { connect_id: {
type: INTEGER, type: INTEGER,
allowNull: true allowNull: true
......
...@@ -11,10 +11,6 @@ module.exports = app => { ...@@ -11,10 +11,6 @@ module.exports = app => {
primaryKey: true, primaryKey: true,
autoIncrement: true, autoIncrement: true,
}, },
app_type_id: {
type: STRING,
allowNull: true,
},
user_id: { user_id: {
type: STRING, type: STRING,
allowNull: true allowNull: true
...@@ -23,6 +19,14 @@ module.exports = app => { ...@@ -23,6 +19,14 @@ module.exports = app => {
type: STRING, type: STRING,
allowNull: true allowNull: true
}, },
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
connect_id: { connect_id: {
type: INTEGER, type: INTEGER,
allowNull: true allowNull: true
......
...@@ -19,6 +19,14 @@ module.exports = app => { ...@@ -19,6 +19,14 @@ module.exports = app => {
type: STRING, type: STRING,
allowNull: true allowNull: true
}, },
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
connect_id: { connect_id: {
type: INTEGER, type: INTEGER,
allowNull: true allowNull: true
......
...@@ -19,6 +19,14 @@ module.exports = app => { ...@@ -19,6 +19,14 @@ module.exports = app => {
type: STRING, type: STRING,
allowNull: true allowNull: true
}, },
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
key_word: { key_word: {
type: STRING, type: STRING,
allowNull: true allowNull: true
......
...@@ -12,6 +12,10 @@ class AnswerLikeService extends Service { ...@@ -12,6 +12,10 @@ class AnswerLikeService extends Service {
*/ */
async like(id) { async like(id) {
const { ctx } = this; const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let filter = { let filter = {
where: { where: {
answer_id: id, answer_id: id,
......
...@@ -12,10 +12,11 @@ class CollectionService extends Service { ...@@ -12,10 +12,11 @@ class CollectionService extends Service {
*/ */
async addCollection(inputParams) { async addCollection(inputParams) {
const { ctx } = this; const { ctx } = this;
if (!ctx.appUserId || !ctx.deviceId || !ctx.deviceLoginId || !ctx.userId) { if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理 //如果没有登录就不做处理
return ret; return false;
} }
let filter = { let filter = {
where: { where: {
state: 1, state: 1,
...@@ -31,6 +32,8 @@ class CollectionService extends Service { ...@@ -31,6 +32,8 @@ class CollectionService extends Service {
let data = { let data = {
user_id: ctx.userId, user_id: ctx.userId,
app_user_id: ctx.appUserId, app_user_id: ctx.appUserId,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
house_style: inputParams.type, house_style: inputParams.type,
connect_id: inputParams.id, connect_id: inputParams.id,
state: 1, state: 1,
......
...@@ -15,15 +15,15 @@ class FootPrintService extends Service { ...@@ -15,15 +15,15 @@ class FootPrintService extends Service {
const { ctx } = this; const { ctx } = this;
const user_id = ctx.userId; const user_id = ctx.userId;
const app_user_id = ctx.appUserId; const app_user_id = ctx.appUserId;
const app_type_id = ctx.appTypeId;
if (!user_id || !app_user_id) { if (!user_id || !app_user_id) {
return false; return false;
} }
const data = { const data = {
user_id: user_id, user_id: user_id,
app_type_id: app_type_id,
app_user_id: app_user_id, app_user_id: app_user_id,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
house_style: inputParams.type, house_style: inputParams.type,
connect_id: inputParams.id, connect_id: inputParams.id,
state: 1, state: 1,
......
...@@ -12,6 +12,10 @@ class HotQuestionAnswerService extends Service { ...@@ -12,6 +12,10 @@ class HotQuestionAnswerService extends Service {
*/ */
async addAnswer(inputParams) { async addAnswer(inputParams) {
const { ctx } = this; const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let data = { let data = {
user_id: ctx.userId, user_id: ctx.userId,
app_user_id: ctx.appUserId, app_user_id: ctx.appUserId,
......
...@@ -12,6 +12,10 @@ class HotQuestionPutService extends Service { ...@@ -12,6 +12,10 @@ class HotQuestionPutService extends Service {
*/ */
async addQuestion(inputParams) { async addQuestion(inputParams) {
const { ctx } = this; const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let data = { let data = {
user_id: ctx.userId, user_id: ctx.userId,
app_user_id: ctx.appUserId, app_user_id: ctx.appUserId,
......
...@@ -11,8 +11,11 @@ class OrderService extends Service { ...@@ -11,8 +11,11 @@ class OrderService extends Service {
* @param {object} inputParams * @param {object} inputParams
*/ */
async addOrder(inputParams) { async addOrder(inputParams) {
const { ctx, service } = this; const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let filter = { let filter = {
where: { where: {
state: 1, state: 1,
...@@ -33,6 +36,8 @@ class OrderService extends Service { ...@@ -33,6 +36,8 @@ class OrderService extends Service {
let data = { let data = {
user_id: ctx.userId, user_id: ctx.userId,
app_user_id: ctx.appUserId, app_user_id: ctx.appUserId,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
house_style: inputParams.type, house_style: inputParams.type,
connect_id: inputParams.id, connect_id: inputParams.id,
name: inputParams.name, name: inputParams.name,
......
...@@ -12,12 +12,15 @@ class searchHistoryService extends Service { ...@@ -12,12 +12,15 @@ class searchHistoryService extends Service {
*/ */
async addSearchHistory(inputParams) { async addSearchHistory(inputParams) {
const { ctx } = this; const { ctx } = this;
if (!ctx.userId) { if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false; return false;
} }
let data = { let data = {
user_id: ctx.userId, user_id: ctx.userId,
app_user_id: ctx.appUserId, app_user_id: ctx.appUserId,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
key_word: inputParams.key_word, key_word: inputParams.key_word,
house_style: inputParams.type, house_style: inputParams.type,
state: 1, state: 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment