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 => {
type: STRING,
allowNull: true
},
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
connect_id: {
type: INTEGER,
allowNull: true
......
......@@ -11,10 +11,6 @@ module.exports = app => {
primaryKey: true,
autoIncrement: true,
},
app_type_id: {
type: STRING,
allowNull: true,
},
user_id: {
type: STRING,
allowNull: true
......@@ -23,6 +19,14 @@ module.exports = app => {
type: STRING,
allowNull: true
},
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
connect_id: {
type: INTEGER,
allowNull: true
......
......@@ -19,6 +19,14 @@ module.exports = app => {
type: STRING,
allowNull: true
},
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
connect_id: {
type: INTEGER,
allowNull: true
......
......@@ -19,6 +19,14 @@ module.exports = app => {
type: STRING,
allowNull: true
},
app_id: {
type: STRING,
allowNull: true
},
app_type_id: {
type: STRING,
allowNull: true
},
key_word: {
type: STRING,
allowNull: true
......
......@@ -12,6 +12,10 @@ class AnswerLikeService extends Service {
*/
async like(id) {
const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let filter = {
where: {
answer_id: id,
......
......@@ -12,10 +12,11 @@ class CollectionService extends Service {
*/
async addCollection(inputParams) {
const { ctx } = this;
if (!ctx.appUserId || !ctx.deviceId || !ctx.deviceLoginId || !ctx.userId) {
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return ret;
return false;
}
let filter = {
where: {
state: 1,
......@@ -31,6 +32,8 @@ class CollectionService extends Service {
let data = {
user_id: ctx.userId,
app_user_id: ctx.appUserId,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
house_style: inputParams.type,
connect_id: inputParams.id,
state: 1,
......
......@@ -15,15 +15,15 @@ class FootPrintService extends Service {
const { ctx } = this;
const user_id = ctx.userId;
const app_user_id = ctx.appUserId;
const app_type_id = ctx.appTypeId;
if (!user_id || !app_user_id) {
return false;
}
const data = {
user_id: user_id,
app_type_id: app_type_id,
app_user_id: app_user_id,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
house_style: inputParams.type,
connect_id: inputParams.id,
state: 1,
......
......@@ -12,6 +12,10 @@ class HotQuestionAnswerService extends Service {
*/
async addAnswer(inputParams) {
const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let data = {
user_id: ctx.userId,
app_user_id: ctx.appUserId,
......
......@@ -12,6 +12,10 @@ class HotQuestionPutService extends Service {
*/
async addQuestion(inputParams) {
const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let data = {
user_id: ctx.userId,
app_user_id: ctx.appUserId,
......
......@@ -11,8 +11,11 @@ class OrderService extends Service {
* @param {object} inputParams
*/
async addOrder(inputParams) {
const { ctx, service } = this;
const { ctx } = this;
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let filter = {
where: {
state: 1,
......@@ -33,6 +36,8 @@ class OrderService extends Service {
let data = {
user_id: ctx.userId,
app_user_id: ctx.appUserId,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
house_style: inputParams.type,
connect_id: inputParams.id,
name: inputParams.name,
......
......@@ -12,12 +12,15 @@ class searchHistoryService extends Service {
*/
async addSearchHistory(inputParams) {
const { ctx } = this;
if (!ctx.userId) {
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就不做处理
return false;
}
let data = {
user_id: ctx.userId,
app_user_id: ctx.appUserId,
app_id: ctx.appId,
app_type_id: ctx.appTypeId,
key_word: inputParams.key_word,
house_style: inputParams.type,
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